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

The language server should be updated to use the latest compiled modules when recoverable errors occur #3121

Closed
Acepie opened this issue May 10, 2024 · 1 comment · Fixed by #3171
Assignees
Labels
help wanted Contributions encouraged priority:high
Milestone

Comments

@Acepie
Copy link
Contributor

Acepie commented May 10, 2024

Now that we have more fault tolerance in the module analysis, we have a number of cases where there can be type errors in a module but still have valid typed ASTs for those modules. Currently we are discarding those ASTs and bubbling up the error. We should instead update the compile step to use the new error filled ASTs and return without doing codegen https://github.com/gleam-lang/gleam/blob/main/compiler-core/src/build/package_compiler.rs#L140

By doing this, the language server should be able to use those modules and give a better editor experience when there are errors

The error is returned here. This can probably just be bubbled up into the return with a slight return type change
https://github.com/gleam-lang/gleam/blob/main/compiler-core/src/build/package_compiler.rs#L442

@lpil lpil added this to the LS01 milestone May 14, 2024
@lpil lpil added help wanted Contributions encouraged priority:high labels May 14, 2024
@lpil
Copy link
Member

lpil commented May 14, 2024

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Contributions encouraged priority:high
Projects
Status: Implemented
Development

Successfully merging a pull request may close this issue.

2 participants