-
Notifications
You must be signed in to change notification settings - Fork 59
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
Eclipse compiler does not process multiple --add-exports correctly #111
Comments
Good catch. Here's what I'd do:
|
Hi @tomaswolf , I just had some time for doing the proposed refactoring and changes. Also have some unit tests, though I had to place them in a the plexus-compiler-eclipse module instead in the api module due to accessing EclipseJavaCompiler class. As stated earlier, I have my changes in a local branch. How can I upload the stuff and create a PR for a review??? Thanks, |
Start with: Fork a repo |
Hi Marc, that commit looks pretty good. Just the indentation on You should now create a PR from that commit, so that it can be reviewed and eventually merged. See Creating a pull request from a fork for how to do that. |
Hi @tomaswolf , I fixed the formatting issue and did a minor refactoring concerning the usage of the option and optionValue inside the loop. There are some problems with the build, but for me, it seems to be a problem with JDK16, and not really with my changes. |
…dd-exp… (#113) * #111 - Refactor and add unit tests for support for multiple --add-exports custom compiler arguments * #111 - Minor formatting and variable refactoring Co-authored-by: maei <[email protected]>
Hi,
I experienced a problem with mulitple --add-exports during my Maven build and created an issue in the Maven compiler plugin (see https://issues.apache.org/jira/browse/MCOMPILER-279).
Since the plugin works with the normal Java compiler and also the Eclipse compiler itself understands multiple add-exports arguments, he pointed me to the EclipseJavaCompiler here.
The problem is that in line https://github.com/codehaus-plexus/plexus-compiler/blob/master/plexus-compilers/plexus-compiler-eclipse/src/main/java/org/codehaus/plexus/compiler/eclipse/EclipseJavaCompiler.java#L179, the custom compiler arguments are processed as entries of a map. But here, the entries should be processed as real entry pairs. Therefore the method config.getCustomCompilerArgumentsEntries() should be used. But there is also a failing test thus a further change becomes necessary. Thus the change for line #179 would be following:
I don't know exactly how to provide a patch or a pull request and I'm totally unsure of how to provide a unit test verifying the correct behaviour after the fix. I had a look at the existing unit tests but didn't find anything I could really base a new test case upon.
But I would give a PR a try if someone can point me to a howto, etc....
The text was updated successfully, but these errors were encountered: