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

Keep syntax constrained to the Nextflow Language Specification #28

Open
samuell opened this issue Nov 20, 2024 · 2 comments
Open

Keep syntax constrained to the Nextflow Language Specification #28

samuell opened this issue Nov 20, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@samuell
Copy link
Contributor

samuell commented Nov 20, 2024

Background

Seqera, the company behind Nextflow, has released a new much improved developer experience for VS Code, using a new Language Server, with features such as auto-completion, error checking and much more, that can greatly improve coding productivity. See this blog post for details, and the docs here

The problem

The caveat is that, just as they mention here, the plugin will parse the Nextflow code according to the Nextflow language specification, which is a more strict set of syntax compared to what is technically allowed to run via the nextflow CLI command.

Currently, the VS Code plugin and language server can not run on the gms_16S codebase due to code constructs that are outside the more strict rules in the language specification, causing the plugin to either crash VS Code completely, or just hinder the code intelligence tools to run (based on my own testing).

Proposed solution

The proposed solution is to refactor the gms_16S codebase to only use code constructs in the Nextflow language specification, as this should allow the new VS Code plugin and language server tool to run properly, and help us develop the project more efficiently.

@samuell samuell added the enhancement New feature or request label Nov 20, 2024
@samuell
Copy link
Contributor Author

samuell commented Nov 20, 2024

I'm currently investigating if there is some way to run a linter on the code to have the deviations from the language spec pointed out.

They are apparently working on incorporating such a tool in the nextflow command itself, but there is also a 3rd party tool that I haven't managed to install just yet though (the installation procedure is a little broken atm).

@samuell
Copy link
Contributor Author

samuell commented Nov 22, 2024

A pre-built jar for the nf-linter tool can now be downloaded from the latest github actions build (click the "Package" link in the bottom).

After unpacking it can be run with:

java -jar nf-linter.jar <nextflow-file>

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

No branches or pull requests

1 participant