Skip to content

Fix false error in v2 parser when including config file from http url#6753

Merged
bentsherman merged 1 commit intomasterfrom
fix-config-include-http-url
Jan 23, 2026
Merged

Fix false error in v2 parser when including config file from http url#6753
bentsherman merged 1 commit intomasterfrom
fix-config-include-http-url

Conversation

@bentsherman
Copy link
Member

Close #6749

Signed-off-by: Ben Sherman <bentshermann@gmail.com>
@netlify
Copy link

netlify bot commented Jan 23, 2026

Deploy Preview for nextflow-docs-staging canceled.

Name Link
🔨 Latest commit 0bf966e
🔍 Latest deploy log https://app.netlify.com/projects/nextflow-docs-staging/deploys/6973a9ed6d9ed400087827ac

@bentsherman bentsherman merged commit 1732562 into master Jan 23, 2026
25 checks passed
@bentsherman bentsherman deleted the fix-config-include-http-url branch January 23, 2026 19:07
Comment on lines +81 to +83
var sourceUri = new URI(source);
if( sourceUri.getScheme() != null )
return sourceUri;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is not enough. It should be used FileHelper.asPath otherwise it will not be able to resolve paths against Git resources and above all uri that requires authentication (e.g platform provided)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This class is just a pre-flight check, and it only checks local includes to make sure they actually exist. It doesn't bother checking remote includes for precisely the reasons you mentioned

Honestly we could just move this class back to the language server. It doesn't provide much benefit here since all includes will be validated when the config is loaded:

protected static String readConfigFile(Path includePath) {
try {
return includePath.getText()
}
catch (NoSuchFileException | FileNotFoundException ignored) {
throw new NoSuchFileException("Config file does not exist: ${includePath.toUriString()}")
}
catch (IOException e) {
throw new IOException("Cannot read config file include: ${includePath.toUriString()}", e)
}
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But it is nice for the language server and nextflow lint to report the same errors as much as possible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Strict syntax: HTTPS links do not work in config includes

3 participants