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

Resolve transitive imports in grammar #1113

Merged
merged 2 commits into from
Jul 7, 2023

Conversation

spoenemann
Copy link
Contributor

Fixes #924.

@spoenemann spoenemann added this to the v2.0.0 milestone Jul 6, 2023
Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

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

Looks good to me. I believe there's some room for optimization (we currently recompute all imports on every scope computation), but that's something for another PR.

@msujew msujew added grammar Grammar language related issue scoping Scoping related issue labels Jul 6, 2023
Copy link
Contributor

@dhuebner dhuebner left a comment

Choose a reason for hiding this comment

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

Works really good!
We could also change the requirements grammar to reflect the new feature by removing
https://github.com/langium/langium/blob/main/examples/requirements/src/language-server/tests.langium#L2

@dhuebner
Copy link
Contributor

dhuebner commented Jul 7, 2023

I was trying to test the requirements example with a proposed change, but getting an error Error: Undefined rule type: RuleCall at 4:13 when running npm run langium:generate .
Maybe I misconfigured my setup... Could somebody check that it works using cli?

@dhuebner
Copy link
Contributor

dhuebner commented Jul 7, 2023

Works now, thanks @msujew.

@spoenemann spoenemann merged commit 079eccf into main Jul 7, 2023
3 checks passed
@spoenemann spoenemann deleted the spoenemann/support-transitive-imports-924 branch July 7, 2023 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
grammar Grammar language related issue scoping Scoping related issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support transitive imports
3 participants