-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
yarn.lock with keys longer than 1024 characters throw parse errors #948
Comments
Seems like the parser struggles with strings over 1024 characters (including
UPDATE: It's a yarn issue. It implements its own yaml printer that isn't spec compliant. Go YAML parser is 1.2 spec compliant: Reported here: yarnpkg/berry#4270 |
Closing as this is a yarn issue and hopefully fixed when yarnpkg/berry#4275 is merged. |
I ran in to this issue again (re-trying to see if this'll work in my monorepo). switching to yarn/berry isn't an immediate option for me right now 🤔 This issue: #394 |
Reopening this issue; Yarn 1.x is frozen and we need to support lockfiles that are not YAML spec compliant. |
Related, here is a Yarn 1 parser: https://github.com/yarnpkg/yarn/blob/master/src/lockfile/parse.js |
This appears to be a port of that script: https://github.com/iseki0/go-yarnlock |
I just ran in to this / was reminded of this again. Can't quite get to a pnpm migration quite yet, but it would get me around the issue in a high effort way (a much better way tho. I've grown very weary of all of yarn and yarn related problems) 🙃 |
We've migrated this parsing to Rust with our own parser (instead of relying on a generic YAML parser) and we should no longer be beholden to this limit. |
What version of Turborepo are you using?
1.2.0-canary.1
What package manager are you using / does the bug impact?
Yarn v2/v3 (node_modules linker only)
What operating system are you using?
Mac
Describe the Bug
Any turbo command fails with
This line in yarn.lock points to (first line in the code block):
Expected Behavior
Turbo to be able to parse the file as it's a valid yarn.lock
To Reproduce
I believe just passing this string through the parser turbo uses should reproduce it.
The text was updated successfully, but these errors were encountered: