-
Notifications
You must be signed in to change notification settings - Fork 391
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
Rename compiler headers #4062
Rename compiler headers #4062
Conversation
494862a
to
30b989a
Compare
@genie-omr build all |
ping @Leonardo2718 and @0xdaryl |
@Leonardo2718 and I were hemming and hawing over this because the choice of the name. We use the We thought about some other solutions but nothing is really going to work in the framework that we have at the moment. Rather than make it appear like an extensible class, could you rename it to |
30b989a
to
013d3c9
Compare
@genie-omr build aix plinux |
See eclipse/omr#4062 Signed-off-by: Devin Nakamura <devinn@ca.ibm.com>
ping @Leonardo2718 @0xdaryl |
@@ -0,0 +1,394 @@ | |||
/******************************************************************************* |
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.
Perhaps this file should be named GenerateOMRInstructions.hpp
- all other files in that folder start with a capital; or better yet, OMRGenerateInstructions.hpp
to follow the apparent pattern of using the OMR
prefix.
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 agree with capitalizing the name: GenerateOMRInstructions.hpp
. However, using OMR
as a prefix was deliberately not chosen because that typically indicates the file is part of an extensible class, which GenerateInstructions.hpp
is not (see @0xdaryl's comment above).
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.
OpenJ9 does treat the header file as extensible: it want to include the OMR header file and add extra declarations which supports my suggestion of OMRGenerateInstructions.hpp
.
I feel like this file is a little strange. To me it is extensible but just not a class. If in the future a class definition was added the name would have to change again. It is so close to fitting the extensible class mould why not just go with that? |
When @0xdaryl and I discussed this, the conclusion we came to is that the file looks "extensible" when it really shouldn't. The fact that the In fact, I think that the extensible structure of these files can make the code more confusing because figuring out what may or may not be defined requires looking across multiple files and projects, a big problem with extensible classes in general. In addition, being able to quickly determin whether a file belongs to an extensible entity or not reduces the cognitive load of reading and reviewing code. If a file is clearly part of an extensible entity, it's an immediate sign that additional effort will be required for checking the code in the other files, namespaces, different architecture specializations, downstream projects, etc. Conversly, if a file is clearly not part of an extensible entiry, there is no need to check for the possible existence of extensions or overrides, reducing the number of "distractions" when reading the code. As a result, I strongly prefer extensible files to be clearly distinguishable from non-extensible ones. Given the above, I think it makes sense for |
See eclipse-openj9/openj9#3725 Signed-off-by: Devin Nakamura <devinn@ca.ibm.com>
Signed-off-by: Devin Nakamura <devinn@ca.ibm.com>
013d3c9
to
372d247
Compare
@genie-omr build all |
Can this PR be merged without breaking anything downstream? e.g., is eclipse-openj9/openj9#6212 dependent on this PR? |
@@ -1,5 +1,5 @@ | |||
/******************************************************************************* | |||
* Copyright (c) 2000, 2019 IBM Corp. and others | |||
* Copyright (c) 2019, 2019 IBM Corp. and others |
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.
The copyright date should not be changed.
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 believe the copyright is correct. Git is doing a poor job of showing it in the diff, but this is actually a new file. It just happens to have the same name as a file that's also renamed so git thinks the contents were moved. Looking at the diffs for each commit individually makes it easier to follow what actually happened.
@0xdaryl yes this is ready to go without breaking downstream consumers |
Resolves breakage for out of tree builds. For details see eclipse-openj9/openj9#3725 & #3189