-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MSHADE-326] Hide shaded dependencies from the rest of the reactor build #26
base: master
Are you sure you want to change the base?
Conversation
It's great that you created pull request but unfortunately you should make a separate PR for each JIRA you are trying to solve....also squash your commits into a single commit...that makes it easier to merge it and review it....many thanks for your support. |
Yes, normally I fully agree. |
Squashing commits hides details of the history. |
... in addition to coupling otherwise independent commits, which hurts ability to cherry pick or rebase commits away before merge. |
Have you taken a look in the apache maven projects? We use single commit setup and don't want to merge a number of 2-n commits into the history to fix/add a single feature. Single commits makes it easier to understand the history and make it easier to undo changes if needed.... Can you make the PR for MSHADE-36 (single commit) which means to be applied first and afterwards we can apply MSHADE-326 .... |
Working on it. |
691331f
to
75463c5
Compare
I've updated #25 to be a single commit as requested. Because these two changes are dependent this pull request will look like 'two commits' but it is actually a single commit that requires #25 to be already applied. I hope this is what you meant. Please review (especially the code changes for both of these proposals themselves). |
FYI: I did some additional testing in my own project and these changes work as I expect them to work. |
75463c5
to
8f3858b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still under consideration/development or should we close it?
@elharo I would like to see this problem fixed. If there is anything I need to change then I'm happy to do that. Just say what the desired solution is. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nielsbasjes This PRs suffers from the same issues as #25, please modify.
8f3858b
to
16cbe06
Compare
@michael-o And I double checked and my test fails if I remove the new flag. |
Will first try to understand the problem and then get back to you. |
} | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this entire block is redudant because it duplicates the same test as in the previous PR. Where is the benefit here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes you are right. This is essentially the same test, yet here it is in a multi module project.
In cases where I really want to be sure it is going right I'm in the "Check, check, double check" mindset.
This is one of those cases because of the multi-module situation.
So I reviewed this PR, the JIRA issue as well as MSHADE-206 and MNG-5899 and I see a few issues here:
I would like to ask the following: Please branch off Maven master, drop the hacky cache and retry w/o this PR and let me know whether this fixes the issue already for you. If so, we need to reconsider the cache. Maybe this new parameter can be introduced, but only as @rfscholte Since you left a new comments on MNG-5899, do you think we could safely drop the cache and see whether we will see complains about performance drop? |
A friendly reminder, I want to start the release by mid of next week. |
@michael-o I'm trying to see what happens. Will report here what I find. |
@michael-o @rfscholte What I think you meant: Side note: This comment was removed in this commit apache/maven@d3ace78 What I did:
This last build fails over this test:
Underlying error:
Most notably the test I created (which fails on maven 3.8.1) now passed.
So apparently without this hack indeed my test does what I want. Please advise how to proceed. |
I will reintroduce the comment about the hack because it remains what it is: a hack! |
So I tracked down the cause of this 340 test failing and fixed it. Now this version of the plugin ONLY passes (because of the extra test I created) when built using maven that includes this change apache/maven#483 So I expect this build to fail at this point. |
Just to clarify the current status as I understand it:
One thing that worries me right now is the potential impact of existing projects. I do not know if this is a significant impact or just that existing configuration problems now surface. @michael-o @rfscholte is there anything additional I can do to help make all of this a success? |
I build several of my own projects with this updated maven version and they all passed without any hickups. |
I have now reintroduced the hack comment in master and 3.8.x. Will process your message later. |
See also objections in apache/maven#69. We need to please both, invalidate cache when necessary, but use it as often as possible. The "hack" shouldn't stay forever. A better approach should be discussed after 4.0.0-alpha-1. @nielsbasjes Can you work out a Maven IT which exposes the correct behavior and will fail for now. Then we will drop the hacks in a branch and will see how it performs? |
I read in the comments that someone had a single project with over 5000 modules which in my experience sounds very extreme. So my main question is to what extend should maven support so many modules? I'll see what I can do at the maven end to make a test for this.
|
My personal opinion: A broken cache should be removed or improved. @rfscholte Remove or try to solve. |
IIUC this is caused by Maven 3 using the pom.xml of the reactor for both build and consume. With Maven 4 we've started to separate this, but currently not inside the reactor. As long as Maven can ensure that the consumer-pom won't introduce new reactor dependencies, it should be possible inside Maven. |
Hi @michael-o & @rfscholte, |
As said, I expect this needs to be fixed in Maven Core. We're still working on this very tricky piece of code. I'd suggest to close this PR, close MSHADE-326 and create a ticket for MNG referring to MSHADE-326. |
Let's keep this and the ticket open until we are able to fix this in Maven. This PR will remind us that something is broken in Maven. As @rfscholte said, This isn't trivial, and cannot be addressed before 4.0.0-alpha-2 given that it takes time to understand, implement, test and not cause regressions. |
Jira: https://issues.apache.org/jira/browse/MSHADE-326
In several multi module projects I have created I ran into the same problems with shading dependencies. See https://yauaa.basjes.nl/NOTES-shading-dependencies.html
This is a proposed change to fix those problems.
==============
Following this checklist to help us incorporate your contribution quickly and easily:
mvn clean verify
to make sure basic checks pass. A more thorough check willbe performed on your pull request automatically.
mvn -Prun-its clean verify
).To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.
I hereby declare this contribution to be licenced under the Apache License Version 2.0, January 2004
I'm a Committer and PMC for Apache Avro. So the Contributor License Agreement is on file.