-
Notifications
You must be signed in to change notification settings - Fork 323
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
Refactor Scala definitions containing deeply nested classes to mitigate problems when accessing them from Java #7017
Comments
Same situation with Runtime.scala |
Hubert Plociniczak reports a new STANDUP for yesterday (2023-08-28): Progress: Started refactoring IR so that we have a more a shallow hierarchy of classes. Sadly IDE refactoring didn't give too much support in this case. Added more debugging info to #7624, will wait for feedback. Waiting on PR review for logging. Some planning discussions. It should be finished by 2023-08-30. Next Day: Next day I will be working on the #7017 task. Continue with refactoring. |
Hubert Plociniczak reports a new STANDUP for yesterday (2023-08-29): Progress: More refactoring work. It should be finished by 2023-08-30. Next Day: Next day I will be working on the #7017 task. Continue with refactoring. |
Refactoring deeply nested IR classes to shallow nesting. Fixes #7017 # Important Notes It's a big PR but fairly consistent. Split multiple hierarchy levels into subpackages.
Hubert Plociniczak reports a new STANDUP for yesterday (2023-08-30): Progress: Finished refactoring while waiting on CI to stabilize. It should be finished by 2023-08-30. Next Day: Next day I will be working on the #7017 task. Wait on CI to resolve its problems and merge PR. Come back to logging PR. |
Hubert Plociniczak reports a new 🔴 DELAY for yesterday (2023-08-31): Summary: There is 1 day delay in implementation of the Refactor Scala definitions containing deeply nested classes to mitigate problems when accessing them from Java (#7017) task. Delay Cause: Extra day to finish refactoring all classes |
Hubert Plociniczak reports a new STANDUP for yesterday (2023-08-31): Progress: Took some extra time to make sure that everything works as expected and cleaned up remaining craft (and waiting on CI to be sane again). Started looking at the logging PR feedback. It should be finished by 2023-08-31. Next Day: Next day I will be working on the #7253 task. Back to addressing logging feedback |
Makes it clear that those IR entries are not needed for executing native runner. # Important Notes Follow up on #7017
TreeToIr translates from new AST to Enso's internal IR. The class has been written in Java, by design and on purpose (reasons omitted), but it had to make use of the existing class hierarchy defined in IR.
While Scala and Java can co-exist, calling the former from the latter is not pleasant when dealing with nested classes. And Scala code often makes use nested classes. This is easily demonstrable just by looking at the imports of
TreeToIr
:i.e. we can't use the typical "dot" syntax for nested classes. This makes it apparently impossible to recognize for IDE's, as demonstrated in the screenshot.
There are possible solutions (most of them hard to enforce because out of our control):
InnerClasses
attribute for deeply (2+ level) nested inner classes. Not sure if this is even possible given the rather complex interop logic (e.g. https://discord.com/channels/@me/959434339182067712/1116738522003550269). Will file a ticket in the Scala compiler.javac
understand that nested classes belonging to companion objects are calledFoo$Bar$Baz
and notFoo$Bar$$Baz
. Also unlikely to happen because most of the implementation follow blindly the$
pattern.IR
to multiple classes.Due to the lack of other alternatives, this ticket proposes to pursue option 4. This bug slows down developer productivity quite significantly.
The text was updated successfully, but these errors were encountered: