Skip to content
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

Merged
merged 11 commits into from
Jun 11, 2024
Merged

Fix Meta.enso_project #10192

merged 11 commits into from
Jun 11, 2024

Conversation

Akirathan
Copy link
Member

@Akirathan Akirathan commented Jun 6, 2024

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:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    TypeScript,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • Unit tests have been written where possible.

@Akirathan Akirathan added the CI: No changelog needed Do not require a changelog entry for this PR. label Jun 6, 2024
@Akirathan Akirathan self-assigned this Jun 6, 2024
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"
Copy link
Member Author

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

Copy link
Member

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?

Copy link
Member Author

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

Copy link
Member

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??

Copy link
Member Author

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, great

Copy link
Member

@radeusgd radeusgd left a 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

@Akirathan Akirathan added the CI: Clean build required CI runners will be cleaned before and after this PR is built. label Jun 7, 2024
@Akirathan Akirathan added the CI: Ready to merge This PR is eligible for automatic merge label Jun 11, 2024
@mergify mergify bot merged commit 5fa29c5 into develop Jun 11, 2024
37 checks passed
@mergify mergify bot deleted the wip/akirathan/9845-enso-proj-fix branch June 11, 2024 08:31
Akirathan added a commit that referenced this pull request Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: Clean build required CI runners will be cleaned before and after this PR is built. CI: No changelog needed Do not require a changelog entry for this PR. CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enso_Project.enso_project does not work as advertised
4 participants