nextflow-io / nextflow-io/language-server
Fix exception handling in compiler
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 31
- Forks
- 8
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 2
Description
The compiler currently catches all CompilationFailedExceptions and ignores them:
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with modules/nf-lang/src/main/java/nextflow/script/control/Compiler.java around lines 73-82 and trace how CompilationFailedException is handled. Check how the error collector records and rethrows legitimate parsing errors. Done means parsing errors remain available to the language server while unexpected compiler failures are no longer silently ignored.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100