Skip to content

Fix exception handling in compiler #106

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

Open
bentsherman opened this issue Mar 23, 2025 · 0 comments
Open

Fix exception handling in compiler #106

bentsherman opened this issue Mar 23, 2025 · 0 comments

Comments

@bentsherman
Copy link
Member

The compiler currently catches all CompilationFailedExceptions and ignores them:

https://github.com/nextflow-io/nextflow/blob/0f588576e193f4df81dcf7ffd7e0412f89540636/modules/nf-lang/src/main/java/nextflow/script/control/Compiler.java#L73-L82

This is so that parsing errors don't crash the language server. However, if an exception occurs for some other reason, like a bug, it is also ignored, and typically leads to the AST not being built and no errors reported.

The problem is that some legitimate parsing errors are being collected by the error collector and still being thrown. If I can remove that unnecessary throw, I should be able to remove these no-op catch clauses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant