GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||
GeezerVison is showing github.com — [MSHADE-400] Self-minimisation with custom entry points by kriegaex · Pull Request #110 · apache/maven-shade-plugin Conversation
|
|
The merge conflicts during the rebase were pretty ugly, because both in MSHADE-391 as well as here there was refactoring in the default shader. I hope I did not mess up anything. At least, locally the project compiles and some selected key tests for both issues are passing. Let us see what the CI builds say, before I add a specific integration test for self-minimisation. Update: CI build looks good, both before and after adding my integration test. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@JanMosigItemis, would you mind if I squashed your commits (and my early one too)? The original workaround incl. unit test is no longer necessary, nor is my refactoring of it. Only a little bit of structural test refactoring is left over. @rmannibucau, I can squash your "basic dir handling in default shader" commit too, but also try to retain it, even though Tibor is not going to like it and probably going to squash before the merge anyway. Please also be so kind as to review this PR. I think it is as far as we should go before the next major release, for which you are planning more general refactoring. Thank you. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Do it. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
OK, I squashed into one commit, using |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Rebased on master, as requested by @michael-o. Actually, after 1.5 years of code rot, this was a pain in the neck to rebase with lots of nasty conflicts. I am not even remembering exactly what I did back then and why exactly I did it the way I you see here. It was hard enough to understand the inner workings of this plugin back then, you cannot expect me to remember everything now after such a long time. As a contributor who does not know the code base well, I would appreciate more timely responses and reviews, because repeatedly rebasing stuff is difficult and error-prone. The tests are still green, but I am not 100% sure if that means the patch is as perfect as it used to be. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Just those two and I will merge. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@michael-o, I pushed my educated guess about what you asked me to do in a separate commit to be more conveniently reviewable. If it looks OK for you and you want me to squash and force-push once more, just let me know. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Also add self-minimisation + SPI services IT. Remove MinijarFilterTest.removeServicesShouldIgnoreDirectories, because now removing services precisely does **not** ignore directories anymore. Co-authored-by: Romain Manni-Bucau <[email protected]> Co-authored-by: Jan Mosig <[email protected]> This closes apache#110
There was an error while loading. Please reload this page.
|
Um, sorry @michael-o, what was the rationale behind first asking me for improvements, me consequently doing them and you then not merging them but deciding for the code without the cove review improvements instead? I mean these: Subject: [PATCH] [MSHADE-400] Code review findings --- --- a/src/main/java/org/apache/maven/plugins/shade/filter/MinijarFilter.java (revision 1cee035ebcce0376fc1c4e726b18f7a15edb8d76) +++ b/src/main/java/org/apache/maven/plugins/shade/filter/MinijarFilter.java (revision 131d4ae37eeb25895bdbf54a2b9acb5df2b918c4) @@ -35,6 +35,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; +import java.nio.file.Files; import java.util.Collections; import java.util.Enumeration; import java.util.HashSet; @@ -228,14 +229,15 @@ } try ( final BufferedReader configFileReader = new BufferedReader( - new InputStreamReader( new FileInputStream( serviceProviderConfigFile ), UTF_8 ) ) ) + new InputStreamReader( Files.newInputStream( serviceProviderConfigFile.toPath() ), UTF_8 ) ) ) { // check whether the found classes use services in turn repeatScan |= scanServiceProviderConfigFile( cp, configFileReader ); } catch ( final IOException e ) { - log.warn( e.getMessage() ); + log.warn( "Failed to scan service provider config file " + serviceProviderConfigFile ); + log.debug( e ); } } return repeatScan; @@ -269,7 +271,8 @@ } catch ( final IOException e ) { - log.warn( e.getMessage() ); + log.warn( "Failed to scan service provider config file " + jarEntry + " in jar " + jar.getName() ); + log.debug( e ); } } } --- a/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java (revision 1cee035ebcce0376fc1c4e726b18f7a15edb8d76) +++ b/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java (revision 131d4ae37eeb25895bdbf54a2b9acb5df2b918c4) @@ -996,8 +996,7 @@ { entryPoints = new HashSet<>(); } - getLog().info( "Minimizing jar " + project.getArtifact() - + ( entryPoints.isEmpty() ? "" : ", entry points = " + entryPoints ) ); + getLog().info( "Minimizing jar " + project.getArtifact() ); try { |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
It was faster to do it myself at the end than explaning how I expect it to be. For improvement of consistency followup PRs can be created any time. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I won't create a new PR after having the work you explicitly asked me to do here already. Too much micro-management. Besides, I did the work before you committed. Why didn't you just commit on top of my PR? Please take my changes and commit them yourself. My branch still exists, you can cherry-pick the commit. Thank you. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Resolve #418 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Resolve #418 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@michael-o I just found this PR again, because it is related to the recently closed #108. A quick check in the current source code reveals that my improvements from #110 (comment), which you had explicitly requested in your code review but then left unmerged, are still missing in the code base. Would you mind committing them? I see no reason why we would both agree on the benefit of a change and then not bring it into the product. Thank you very much. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
I don't exactly remember. If they apply cleanly I'd happily merge them. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@michael-o There is no need to remember, I quoted the exact diff above, and you even re-quoted and commented on it. If after this long time the diff would still apply cleanly, I have no idea. But it would not be rocket science to apply those few lines. You had a chance to just merge my PR back then without any hassle. Instead, you created your own commit without the changes you had requested yourself. I am not going to do the same work one more time. I think, the ball is in your court. And please don't say, you are too busy. If your review comment expected those small improvements from me, I hold you to the same standard. Please take a few minutes and finish an unfinished job. Thank you so much. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I have starred this PR and will try to process as soon as I can. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Here it is: #854 Please review |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.