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

Legacy validator published to NPM seems broken #2124

Open
effigies opened this issue Sep 6, 2024 · 4 comments
Open

Legacy validator published to NPM seems broken #2124

effigies opened this issue Sep 6, 2024 · 4 comments
Labels

Comments

@effigies
Copy link
Collaborator

effigies commented Sep 6, 2024

From https://github.com/bids-standard/bids-examples/actions/runs/10725357726/job/29742986200?pr=466:

Validating dataset 2d_mb_pcasl/: Running  bids-validator 2d_mb_pcasl --config /home/runner/work/bids-examples/bids-examples/legacyconfig.json --ignoreNiftiHeaders
bids-validator@1.14.12
(node:1840) Warning: Closing directory handle on garbage collection
(Use `node --trace-warnings ...` to show where the warning was created)
strict mode: missing type "number" for keyword "minimum" at "#/properties/RepetitionTimePreparation/anyOf/1" (strictTypes)
strict mode: missing type "number" for keyword "minimum" at "#/properties/LabelingDuration/anyOf/1" (strictTypes)
strict mode: missing type "number" for keyword "minimum" at "#/properties/PostLabelingDelay/anyOf/1" (strictTypes)
strict mode: missing type "number" for keyword "minimum" at "#/properties/BolusCutOffDelayTime/anyOf/1" (strictTypes)
Unhandled rejection (
  reason: Error: strict mode: unknown keyword: "dependency-definitions"
    at checkStrictMode (/opt/hostedtoolcache/node/18.20.4/x64/lib/node_modules/bids-validator/dist/commonjs/cli.js:89219:15)
    at checkUnknownRules (/opt/hostedtoolcache/node/18.20.4/x64/lib/node_modules/bids-validator/dist/commonjs/cli.js:89092:11)
    at checkKeywords (/opt/hostedtoolcache/node/18.20.4/x64/lib/node_modules/bids-validator/dist/commonjs/cli.js:90443:36)
    at validateFunctionCode (/opt/hostedtoolcache/node/18.20.4/x64/lib/node_modules/bids-validator/dist/commonjs/cli.js:90346:9)
    at Ajv2.compileSchema (/opt/hostedtoolcache/node/18.20.4/x64/lib/node_modules/bids-validator/dist/commonjs/cli.js:90944:45)
    at Ajv2._compileSchemaEnv (/opt/hostedtoolcache/node/18.20.4/x64/lib/node_modules/bids-validator/dist/commonjs/cli.js:92601:35)
    at Ajv2.compile (/opt/hostedtoolcache/node/18.20.4/x64/lib/node_modules/bids-validator/dist/commonjs/cli.js:92309:37)
    at validateSchema (/opt/hostedtoolcache/node/18.20.4/x64/lib/node_modules/bids-validator/dist/commonjs/cli.js:104315:28)
    at checkUnits (/opt/hostedtoolcache/node/18.20.4/x64/lib/node_modules/bids-validator/dist/commonjs/cli.js:104231:28)
    at json_default2 (/opt/hostedtoolcache/node/18.20.4/x64/lib/node_modules/bids-validator/dist/commonjs/cli.js:104223:30)
).

Validating dataset 7t_trt/: Running  bids-validator 7t_trt --config /home/runner/work/bids-examples/bids-examples/legacyconfig.json --ignoreNiftiHeaders
bids-validator@1.14.12
(node:1851) Warning: Closing directory handle on garbage collection
(Use `node --trace-warnings ...` to show where the warning was created)
Unhandled rejection (
  reason: Error: strict mode: unknown keyword: "dependency-definitions"
    at checkStrictMode (/opt/hostedtoolcache/node/18.20.4/x64/lib/node_modules/bids-validator/dist/commonjs/cli.js:89219:15)
    at checkUnknownRules (/opt/hostedtoolcache/node/18.20.4/x64/lib/node_modules/bids-validator/dist/commonjs/cli.js:89092:11)
    at checkKeywords (/opt/hostedtoolcache/node/18.20.4/x64/lib/node_modules/bids-validator/dist/commonjs/cli.js:90443:36)
    at validateFunctionCode (/opt/hostedtoolcache/node/18.20.4/x64/lib/node_modules/bids-validator/dist/commonjs/cli.js:90346:9)
    at Ajv2.compileSchema (/opt/hostedtoolcache/node/18.20.4/x64/lib/node_modules/bids-validator/dist/commonjs/cli.js:90944:45)
    at Ajv2._compileSchemaEnv (/opt/hostedtoolcache/node/18.20.4/x64/lib/node_modules/bids-validator/dist/commonjs/cli.js:92601:35)
    at Ajv2.compile (/opt/hostedtoolcache/node/18.20.4/x64/lib/node_modules/bids-validator/dist/commonjs/cli.js:92309:37)
    at validateSchema (/opt/hostedtoolcache/node/18.20.4/x64/lib/node_modules/bids-validator/dist/commonjs/cli.js:104315:28)
    at checkUnits (/opt/hostedtoolcache/node/18.20.4/x64/lib/node_modules/bids-validator/dist/commonjs/cli.js:104231:28)
    at json_default2 (/opt/hostedtoolcache/node/18.20.4/x64/lib/node_modules/bids-validator/dist/commonjs/cli.js:104223:30)
).

I can reproduce locally on examples:

$ npx bids-validator@v1.14.12 7t_trt
bids-validator@1.14.12
(node:392192) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:392192) Warning: Closing directory handle on garbage collection
Unhandled rejection (
  reason: Error: unknown format "uri" ignored in schema at path "#/definitions/TermURL"
    at unknownFormat (/home/chris/.npm/_npx/9bab3c1b0bc57784/node_modules/bids-validator/dist/commonjs/cli.js:94348:19)
    at validateFormat (/home/chris/.npm/_npx/9bab3c1b0bc57784/node_modules/bids-validator/dist/commonjs/cli.js:94335:13)
    at Object.code (/home/chris/.npm/_npx/9bab3c1b0bc57784/node_modules/bids-validator/dist/commonjs/cli.js:94310:11)
    at keywordCode (/home/chris/.npm/_npx/9bab3c1b0bc57784/node_modules/bids-validator/dist/commonjs/cli.js:90779:13)
    at /home/chris/.npm/_npx/9bab3c1b0bc57784/node_modules/bids-validator/dist/commonjs/cli.js:90540:13
    at CodeGen.code (/home/chris/.npm/_npx/9bab3c1b0bc57784/node_modules/bids-validator/dist/commonjs/cli.js:88803:11)
    at CodeGen.block (/home/chris/.npm/_npx/9bab3c1b0bc57784/node_modules/bids-validator/dist/commonjs/cli.js:88930:16)
    at iterateKeywords (/home/chris/.npm/_npx/9bab3c1b0bc57784/node_modules/bids-validator/dist/commonjs/cli.js:90537:11)
    at groupKeywords (/home/chris/.npm/_npx/9bab3c1b0bc57784/node_modules/bids-validator/dist/commonjs/cli.js:90520:11)
    at /home/chris/.npm/_npx/9bab3c1b0bc57784/node_modules/bids-validator/dist/commonjs/cli.js:90512:11
).

Does not appear on the CI running from master.

@effigies effigies added the legacy label Sep 6, 2024
@sappelhoff
Copy link
Member

I see the same issues on mne-bids CI for the stable (but not master) validator.

@sappelhoff
Copy link
Member

@effigies @rwblair @nellh do you have any idea about what the problem might be?

@effigies
Copy link
Collaborator Author

No. I doubt I have the skills to debug this.

@effigies
Copy link
Collaborator Author

If you revert to 1.14.10, there should be no changes in the actual validation.

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

No branches or pull requests

2 participants