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 definition handler for external dtos and enums #10

Merged
merged 1 commit into from
Oct 11, 2023

Conversation

bryankenote
Copy link
Contributor

@bryankenote bryankenote commented Oct 9, 2023

Based on how the extern keyword works (FacilityApi/Facility#41 (comment)):

... it's sort of like a C extern. Facility does not resolve the type when generating source files. It trusts that what you put in as an extern type will exist. It's up to the project to ensure the specified types exist at build time.

It may not make sense to jump to another fsd file, which is what I originally hoped to accomplish. However, the definition handler should still at least jump to the definition with the extern keyword within the current file.

This is a simple fix, the language server is just resolving the name of the member with some internal code that was never updated after the extern keyword was added to the parser.

@bryankenote bryankenote requested a review from ddunkin October 10, 2023 00:42
@bryankenote

This comment was marked as resolved.

@bryankenote bryankenote added the bug Something isn't working label Oct 10, 2023
@bryankenote bryankenote mentioned this pull request Oct 11, 2023
Copy link
Contributor

@ddunkin ddunkin left a comment

Choose a reason for hiding this comment

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

Testing this out in VS Code, I a "no definition found" error.
Screenshot 2023-10-11 at 2 50 10 PM

Does it work for you and I'm not testing it right?

@bryankenote
Copy link
Contributor Author

bryankenote commented Oct 11, 2023

Copy link
Contributor

@ddunkin ddunkin left a comment

Choose a reason for hiding this comment

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

I figured out what I was doing wrong.

@bryankenote bryankenote merged commit 2fafff1 into FacilityApi:master Oct 11, 2023
3 checks passed
@bryankenote bryankenote deleted the extern-definition branch October 11, 2023 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants