-
-
Notifications
You must be signed in to change notification settings - Fork 171
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
nbgv install creates version.json with potentially incompatible schema reference #897
Comments
I'm sorry for your bad experience here. I believe newer I do understand the issue and frustration with the schema not matching the version of the tool you are using. I don't know how to fix it without creating a worse problem though. We could certainly create the schema URI in your version.json file to point to the exact commit (or perhaps the tag) that matches the nbgv tool used to install it. However I don't think anyone will ever update it. And most NB.GV users don't use the I don't think any user I've met would ever think to update the URI to get a newer schema. But they do periodically update the package/tool they use to the latest version. If I had to choose between the risk of occasionally having the schema be too new vs. be chronically too old, I think the first option is the lesser of two evils. I suppose though, that we could at least reduce the pain by maintaining some 'shipped' branch in the repo and have the schema URI point at that. At least then, folks won't see unreleased schema, which won't be good for anyone. They still might see schema newer than their tool, but at least then they'd have a mitigation of updating the tool. Thoughts? |
I've been updating it. |
What needed updating, @KalleOlaviNiemitalo? Did you use a URL that was version specific instead of |
Yes, I put the commit ID in so that it cannot break if you ever move the schema to a different directory. Originally like this
but more recently, I've been using tags
|
A prudent step, but ya... I'll never move the file as that would break virtually everyone (except you). :) |
When using
nbgv install
, the URL for the$schema
field in the generatedversion.json
is hardcoded to reference theversion.schema.json
in themaster
branch (which seems to be redirected to themain
branch). This can be confusing as it may guide the user to editversion.json
in a manner that is incompatible with the installed version of nbgv, if the schema has been changed since the release was made.I got bitten by this using the latest (3.5.119) version and trying to use the
release.tagName
setting. It took me a while to figure out that the feature is yet to be released, however the IDE happily let me use it since it is in the schema. I got confused when runningnbgv prepare-release
would remove the field in the updatedversion.json
files. It would have been nice with a validation error instead of just ignoring the unknown field.I suppose it can be a bit tricky to implement, but the generated
version.json
should preferably reference the correct version of the schema as well.The text was updated successfully, but these errors were encountered: