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

Nextflow target version #67

Open
bentsherman opened this issue Jun 11, 2024 · 1 comment · May be fixed by #68
Open

Nextflow target version #67

bentsherman opened this issue Jun 11, 2024 · 1 comment · May be fixed by #68

Comments

@bentsherman
Copy link
Member

The user should be able to specify a "target version" of Nextflow, either through client configuration or the manifest.nextflowVersion config option. Language features in the Nextflow codebase can then be annotated with a minimum version, so that if the user tries to use a feature with an older target version, the language server emits an error.

The same pattern can be followed for deprecating features, i.e. providing a deprecation warning and eventually an error when the feature is removed.

It could even be used to identify common mistakes or pitfalls with specific versions, although we should be careful not to add too much static analysis in the background and hurt performance.

Since the language server imports Nextflow as a library, I think the best approach would be for Nextflow itself to start having some level of backward compatibility, so that it can i.e. parse and understand deprecated features enough to emit an error. Then the language server can just use the latest version of Nextflow. I don't think we need to extend all the way back to DSL1, maybe just 23.10 or 22.10.

Since we are moving away from "DSL" as a way to describe Nextflow, we will simply use the Nextflow version to track both the language and the runtime.

@bentsherman
Copy link
Member Author

Another idea from @ewels that's actually much simpler: bake the language server into Nextflow (e.g. nextflow lsp), then each Nextflow version has a corresponding language server version out of the box

Of course this would couple the language server development to Nextflow which could create a bottleneck

A less intrusive approach would be for the vscode plugin to download a specific language server version based on a "target version" user setting. This would be implemented in the TypeScript vscode client

Or we could implement this logic in the Nextflow launcher, so that nextflow lsp actually downloads the language server JAR and launches it instead of the Nextflow JAR. Then we can bundle the two while maintaining separate codebases

@bentsherman bentsherman transferred this issue from nextflow-io/language-server Dec 14, 2024
@bentsherman bentsherman linked a pull request Dec 14, 2024 that will close this issue
3 tasks
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

Successfully merging a pull request may close this issue.

1 participant