-
Notifications
You must be signed in to change notification settings - Fork 64
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 bugs in name mangling #1816
Conversation
The assignment of mangled names is too complex when compiling several distinct programs in the same JAR execution because it causes them to interact with each other by changing the number of reactors that have the same name. We can patch this up, but it is safer and easier to just eliminate the global variables. It will make the generated code uglier, but maybe life is too short to worry about that.
cd4b98b
to
c3e69e1
Compare
I do not want to stop running tests when one category fails. I would also like to experiment with increasing the amount of parallelism.
4514374
to
091f995
Compare
091f995
to
79fe178
Compare
This PR includes some changes in CI that were necessary in order to make CI output more useful. I can move them into a separate PR if needed, but this is not a big PR anyway so maybe it is OK. Note that there is a commit cherry-picked between this and #1814. |
I'm not sure I agree those CI changes are a good idea. What motives them? |
|
I realize that if we want these changes, we would need to update the "required jobs" in the repo settings, which can be done. |
This reverts commit 05ba9c5.
The CI changes are too controversial and do not belong in this PR, so I reverted them. @lhstrh, I think we should merge this soon so that master does not continue to be broken. |
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.
This generally looks good and I agree we should merge it. Please add the missing JavaDoc and this should be ready to to go...
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.
This file has some undocumented methods.
The intent is to reduce confusion with the language feature "generics."
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.
LGTM!
There is something wacky happening in the Rust tests. The test framework is throwing an NPE and I am not sure why. |
3ecf820
to
cae0d1e
Compare
OK, fixed. The problem was that there already was a test for generics, but it was called |
The assignment of mangled names is too complex when compiling several distinct programs in the same JAR execution because it causes the different programs to interact with each other by changing the number of reactors that have the same name. We can patch this up (by parameterizing theuniqueName
function by the currentFileConfig
, for example), but it is safer and easier to just eliminate the global variables. It will make the generated code uglier, but maybe life is too short to worry about that.This PR fixes the assignment of unique names mechanism so that it does not use global variables, which could result in interactions between multiple distinct compilation processes that affect the names used in generated code. This ensures that if one compilation only uses one reactor class with a certain name, then no numbers will be appended to the reactor class's name. It also appends the concrete types used to the reactor class's name, which may be useful for debugging.
The order in which reactor classes with the same name are numbered is based on the alphabetical ordering of the string representations of their URIs. Since different reactor classes with the same name cannot appear in the same file, I believe that this should work properly.
Here are some examples of unique names produced by the method implemented in this PR: