-
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
Fix Meta.enso_project #10192
Fix Meta.enso_project #10192
Conversation
src.take (Last loc.length) . should_equal loc | ||
|
||
group_builder.specify "should allow to get qualified type names of values" <| | ||
x = 42 | ||
y = My_Type.Value 1 2 3 | ||
Meta.get_qualified_type_name x . should_equal "Standard.Base.Data.Numbers.Integer" | ||
Meta.get_simple_type_name x . should_equal "Integer" | ||
Meta.get_qualified_type_name y . should_equal "enso_dev.Base_Tests.Semantic.Meta_Location_Spec.My_Type" | ||
Meta.get_qualified_type_name y . should_end_with "Meta_Location_Spec.My_Type" |
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.
Unrelated change. It ensures that one can run this test as standalone with enso --run test/Base_Tests/src/Semantic/Meta_Location_Spec.enso
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.
Won't the tests below break if run without --in-project
anyway?
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.
There is no need to specify --in-project
anymore since #8775
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.
So why was the standalone run ever failing? It should always return enso_dev.Base_Tests.Semantic.Meta_Location_Spec.My_Type
as the qualified name, no?
If not, what does it return instead??
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.
If not, what does it return instead??
It incorrectly returns Meta_Location_Spec.My_Type
.
Meta.get_qualified_type_name
seems broken. Tracked in #10228. In that issue, there is a task to revert this change once that is fixed.
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.
Ok, great
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.
Looks great, I especially appreciate the ensoProjectWorksInTwoProjects
test.
Thanks for fixing this and unblocking #9875
Fixes #9845
Pull Request Description
Fixes
Standard.Base.Meta.Enso_Project.enso_project
to return a project descriptor for the main project, i.e., the one configured as a root for the engine.Important Notes
enso_project
builtin no longer iterates the stack frames to infer the project descriptor. It derives it from the default package repository.Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,
TypeScript,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.