turbo icon indicating copy to clipboard operation
turbo copied to clipboard

run failed: could not unmarshal lockfile: : yaml: line 9047: did not find expected ',' or '}'

Open tjx666 opened this issue 3 years ago • 6 comments

What version of Turborepo are you using?

1.5.1

What package manager are you using / does the bug impact?

pnpm

What operating system are you using?

Mac

Describe the Bug

image

image

The most recent work version is 1.4.6

Expected Behavior

No error

To Reproduce

Private project, I will create a reproduce repository when I have time

tjx666 avatar Sep 22 '22 10:09 tjx666

Which version of PNPM?

weyert avatar Sep 22 '22 10:09 weyert

Which version of PNPM?

7.12.1

tjx666 avatar Sep 22 '22 10:09 tjx666

@tjx666 Can you create a gist with your lockfile so that we can run tests against it? (or at the very least paste in the section that contains line 9047?)

nathanhammond avatar Sep 22 '22 10:09 nathanhammond

It's throwing here, https://github.com/go-yaml/yaml/blob/f6f7691b1fdeb513f56608cd2c32c51f8194bf51/parserc.go#L1091

But I don't know what input we have to be feeding it to get there.

nathanhammond avatar Sep 22 '22 10:09 nathanhammond

@nathanhammond


  /toidentifier/1.0.1:
    resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==, tarball: toidentifier/download/toidentifier-1.0.1.tgz?cache=0&sync_timestamp=1636943523553&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Ftoidentifier%2Fdownload%2Ftoidentifier-1.0.1.tgz}
    engines: {node: '>=0.6'}
    dev: false

tjx666 avatar Sep 22 '22 11:09 tjx666

Testing against some other YAML 1.2 parsers it looks like the tarball string in the resolution object should be wrapped in quotes due to the ? it contains

chris-olszewski avatar Sep 22 '22 15:09 chris-olszewski

Digging into this more this is an issue with the go-yaml package not conforming to the YAML 1.2 spec. Will work on submitting a PR upstream so we don't trip over this.

chris-olszewski avatar Sep 23 '22 19:09 chris-olszewski

I've submitted https://github.com/go-yaml/yaml/pull/905 which should fix this issue once it is merged

chris-olszewski avatar Sep 23 '22 22:09 chris-olszewski