I'm working on an nf-core pipeline in VS Code and ...
# nostupidquestions
i
I'm working on an nf-core pipeline in VS Code and I get this error in every
meta.yml
(both local and nf-core modules):
Copy code
Schema '<https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json>' is not valid: expected a JSON Schema object or boolean, got "string".
Everything works correctly, but having lots of files marked in red is a bit annoying. Has anyone encountered this and knows of a solution?
👀 1
m
We did recently update that file
i
Looks like it has to be
meta-schema.json
instead,
yaml-schema.json
returns the string "meta-schema.json" instead of the content
👀 1
m
oh, nice catch
@mashehu any idea there?
m
we symlinked it, and worked fine until now...
i
Symlinks on GitHub have a propensity for breaking, it can ususally be fixed by recreating the symlink though
m
yep, that's what I am doing now 😁
nothing to update, and looks fine on the website... https://github.com/nf-core/modules/blob/master/modules/yaml-schema.json maybe the language server doesn't follow symlinks anymore?
i
The link you sent looks wrong to me as well, weird
m
yeah, it just says meta-schema.json
m
but it says symlink on top
m
m
that's how symlinks look on github
👍 1
i
The raw content looks wrong and I assume that's what the language server sees (unless there's some dark magic involved that lets the language server see things the browser cannot)
m
symlinks are just files with the path to the source, so that's what you see in the raw file
i
Makes sense
It would seem that the language server tries to use the path as the schema instead of following it
m
how did you set up the schema for the meta.yml files in your vs code?
i
Copy code
# yaml-language-server: $schema=<https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json>
Works fine with
meta-schema.json
, fails with
yaml-schema
m
looked a bit into https://github.com/redhat-developer/yaml-language-server/ and don't see any solution there... for now fix them manually to the new path and I will publish the schema to the schema-store so we actually can skip this comment
m
do we need similar things for subworkflows?
m
ah, yes, thanks
extreme teamwork 1
m
What about cross-org sub-workflows, which have a different schema ?
m
good point. will limit it to
**/modules/nf-core/
only
ah, sorry thought you meant modules @Matthieu Muffato. cross-org subworkflows will not be touched, because I only look at **/subworklfows/nf-core/**/meta.yml which shouldn't include subworkflows (plus one can always override the behaviour with the comment we used before)
👍 1
m
oki. Thank you !