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

Pin antlr4ts version #1176

Closed
wants to merge 1 commit into from
Closed

Pin antlr4ts version #1176

wants to merge 1 commit into from

Conversation

bugarela
Copy link
Collaborator

@bugarela bugarela commented Sep 20, 2023

Hello :octocat:

@rnbguy pointed out that version 0.5.0-dev of antlr4ts is incompatible with quint, and might be matched by our current package specification (according to our understanding of SemVer item 11.4). Therefore, I'm pinning this dependency to be safe.

Update: I used the tool semver to check if it really matches, and it does:

$ semver -r '^0.5.0-alpha.4' '0.5.0-dev'
0.5.0-dev

@bugarela bugarela self-assigned this Sep 20, 2023
Copy link
Contributor

@thpani thpani left a comment

Choose a reason for hiding this comment

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

afaiu, it would not select -dev, because it's not published under the latest tag?

~/s/quint ❯❯❯ npm show antlr4ts
[...]

dist-tags:
alpha: 0.4.1-alpha.0          canary: 0.5.0-alpha.8565fd2b  latest: 0.5.0-alpha.4         
burt: 0.5.0-dev               experiment: 0.4.0-burt.2

https://docs.npmjs.com/cli/v10/commands/npm-dist-tag#purpose

@bugarela
Copy link
Collaborator Author

@thpani I think that would be true only if we had "latest" in package.json, right? These are the steps @rnbguy sent me to reproduce the issue:

  1. rm package-lock.json file or node_modules directory
  2. change "antlr4ts": "^0.5.0-alpha.4" to "antlr4ts": "^0.5.0-dev"
  3. npm install - this will fail because it pulled [email protected] which is not compatible
  4. change back to "antlr4ts": "^0.5.0-alpha.4"
  5. try npm install now - and it will still fail as it will still use [email protected]

@thpani
Copy link
Contributor

thpani commented Sep 20, 2023

Hmmm, but I guess that only happens because this step

  1. npm install - this will fail because it pulled [email protected] which is not compatible

will put the burt tag into the lock file?

If one starts with our package.json, it should not happen, I believe:

By default, the latest tag is used by npm to identify the current version of a package, and npm install <pkg> (without any @<version> or @<tag> specifier) installs the latest tag.

@bugarela
Copy link
Collaborator Author

Hmm, I think you're right. I tried deleting my package-lock.json and running npm install again, and it doesn't fetch 0.5.0-dev with the current setting.

I'll close this then, we can reopen if needed.

@bugarela bugarela closed this Sep 20, 2023
@thpani thpani deleted the gabriela/pin-antlr4ts-version branch September 20, 2023 15:30
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 this pull request may close these issues.

2 participants