-
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
Enso_Project.enso_project
does not work as advertised
#9845
Comments
Moreover, the
This is problematic for my use-case as I need to report some audit logs directly from the Java helper libraries. Can we maybe initialize the project info somewhere during Context initialization to ensure that we can guarantee it is also accessible to Java code? |
@radeusgd Can you provide a reproducer for that? I have tried to run just the test in enso/test/Base_Tests/src/Semantic/Meta_Location_Spec.enso Lines 41 to 44 in aa24564
enso --run test/Base_Tests/src/Semantic/Meta_Location_Spec.enso "enso_project can be called from Java code" and it succeeds.
|
@radeusgd Feel free to ignore my previous message. I have already implemented a reproducer in f50e6e1 |
Pavel Marek reports a new STANDUP for today (2024-06-07): Progress: - ydoc merged
|
The documentation says that it
however in practice, which can be easily confirmed by checking the code - it returns the project associated with the immediate call site.
That means that if I call
Enso_Project.enso_project
from within theStandard.Base
library, it will actually return the project forBase
, not the project that is currently running and only calling intoBase
.Moreover, the result is cached, so the behaviour of this method depends on where it was called first, for example:
Base/0.0.0-dev/src/My_Test.enso
:Main.enso
method:The first run yields:
and the second run yields:
The result depends only on the place where
Enso_Project.enso_project
was called first.The text was updated successfully, but these errors were encountered: