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

Deno 1.43.0 fails hard upon encountering lockfile with no integrity field. #23586

Closed
nberlette opened this issue Apr 28, 2024 · 5 comments
Closed
Labels
invalid what appeared to be an issue with Deno wasn't

Comments

@nberlette
Copy link
Contributor

Attempting to use the REPL on v1.43.0 in a subfolder of a project that I just ran tests on using Deno v1.40.0. I'm greeted with the following error:

error: Unable to parse contents of lockfile. /Users/nb/work/.../deno.lock: missing field `integrity`

Seems rather brittle and backwards-incompatible :/

@nberlette nberlette changed the title Deno 1.43.0 unable to parse lockfiles from 1.40.0 Deno 1.43.0 fails hard upon encountering lockfile with no integrity field. Apr 28, 2024
@bartlomieju
Copy link
Member

Thanks for the report. How did you get that Deno version? Did you compile from source?

@dsherret
Copy link
Member

dsherret commented Apr 28, 2024

@nberlette was the lockfile generated with jsr specifiers several months ago? That was a purposeful breaking change because JSR specifiers hadn't really landed yet and the data in the lockfile wasn't properly locked. You'll have to recreate the lockfile in this case.

@dsherret
Copy link
Member

Ah, I just re-read the details. Yeah, that's just because JSR specifiers were in 1.40, but still under development. I wouldn't recommend using jsr specifiers with an older deno version.

@dsherret dsherret added the invalid what appeared to be an issue with Deno wasn't label Apr 28, 2024
@nberlette
Copy link
Contributor Author

@bartlomieju I just ran deno upgrade --version 1.40.0 so I could temporarily benchmark some differences in decorator behavior between the current version and the version they first landed in.

@dsherret I didn't even think about that aspect that 1.40.0 landed prior to the JSR launch... thank you for pointing that out! Funnily enough, the lockfile didn't even exist before the tests I ran, and it actually never should have as the deno.json file has lock: false in it. For some reason the older version generated one anyways, and that's how I stumbled upon this issue. I haven't inspected the file, but it almost certainly would have JSR specifiers in it.

@nberlette
Copy link
Contributor Author

Well, this seems to be quite an edge case now 😅 I can't imagine too many other people running into this scenario.

I'll wait a little bit (in case anyone has more to add) before I close this out. Thanks guys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid what appeared to be an issue with Deno wasn't
Projects
None yet
Development

No branches or pull requests

3 participants