You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So we should probably parse everything that ends in .git and contains a hash as a GitRemote.
Note that the bug happens because the yarn.lock file format is very ill structured and provides no easy way to distinguish different kinds of remotes from each other. Thus, the logic in https://github.com/Profpatsch/yarn-lock/blob/master/src/Yarn/Lock/File.hs#L114-L160 is one of the most brittle path of yarn2nix (while the other brittle part is the rest of the parser). This is also where these changes need to be implemented.
A lockfile entry like
Generates this nix expression:
f
andir
resolve tofetchurl
, so that is clearly wrong.The second entry’s link has the form:
So we should probably parse everything that ends in
.git
and contains a hash as aGitRemote
.Note that the bug happens because the
yarn.lock
file format is very ill structured and provides no easy way to distinguish different kinds of remotes from each other. Thus, the logic in https://github.com/Profpatsch/yarn-lock/blob/master/src/Yarn/Lock/File.hs#L114-L160 is one of the most brittle path ofyarn2nix
(while the other brittle part is the rest of the parser). This is also where these changes need to be implemented.The corresponding tests in https://github.com/Profpatsch/yarn-lock/blob/master/tests/TestFile.hs#L30-L47 need to be amended as well.
Thanks to @jwiegley for the bug report!
The text was updated successfully, but these errors were encountered: