-
Notifications
You must be signed in to change notification settings - Fork 140
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
Fix GH-954: module binding error message not rendering correctly. #955
Conversation
Can you add a test here, or provide a reproducer? Something like this:
Note that the above test passes without the change here. I'm not sure how to run into #954. |
@trancexpress outside of a project that is invoking this, I am not sure of the best way of reproducing it, since my use case is building from a custom diagnostic listener and file manager. #958 seems to suggest to me that this uses a totally different code flow to the standard configuration, as there are branches that detect if the default components are being used elsewhere that I can spot. However, inspecting the existing source code:
...the message arguments are being provided correctly (third param, being passed as an array), but not the problem arguments (second param, being passed as It seems that the output ECJ is emitting usually makes use of the formatted string using the message arguments, but using the JSR-199 API with a DiagnosticListener, calling This appears tobe because Line 354 of EclipseCompilerImpl defines the code for JSR-199's Which shows it is using the empty array that has been changed in this PR, rather than the messageArguments that appears to be the intent. Given that the message localisation string is hardcoded to My guess is that If you can advise of a good way to replicate this environment in a test pack, I'll be happy to try and push a test for this, however, since I am unfamiliar with this codebase, I am not sure exactly what the conventions are for testing components via the JSR-199 interface with custom implementations of components rather than the standard tooling ECJ provides. |
I see, please add this test:
|
For the ECA, can you try adding a line like this at the end of the commit message:
E.g. if I were signing the commit, the line would look like this:
If you are using the Eclipse Git Staging view, you can amend the commit and use the "Add Signed-off-by" view button (assuming you have set I'm not sure what hooks there are to try to identify your email, but it should be possible to use the line above too (unless I'm out of touch with the GitHub contribution process). It could also be that GitHub needs some time to "see" the ECA is signed, I'm not sure. |
@trancexpress updated the commit with your patch. Also looks like the signoff worked as well, which is good. Thanks for all the help! |
@iloveeclipse this looks like a simple enough change. Can you review it? |
Simeon, "signed of" was only used by gerrit, and is useless in github.
That was most likely the reason. |
Signed-off-by: Ashley Scooes <[email protected]>
Thanks for the fix @ascopes ! |
What it does
Fixes GH-954: a message rendering issue for module resolution issues.
How to test
Right now, I am integrating with the compiler from a project of mine, and I am coming across
the following diagnostic being output:
I am still looking for the actual trigger of this error in my code, but it appears that the
log message is misconfigured.
Author checklist