Repository navigation
Commit Cargo.lock with pinned libc@0.2.189 and use --locked in CI. - #216
Conversation
Signed-off-by: Skye Elliot <actuallyori@gmail.com>
Signed-off-by: Skye Elliot <actuallyori@gmail.com>
Signed-off-by: Skye Elliot <actuallyori@gmail.com>
Cargo.lock with pinned libc@0.2.189 and use --locked in CI.
poljar
left a comment
There was a problem hiding this comment.
I think we need a Cargo.lock file in the package.
| }, | ||
| "files": [ | ||
| "Cargo.toml", | ||
| "Cargo.lock", |
There was a problem hiding this comment.
But this means that the seshat-node package we release/ship won't use any Cargo.lock file since it doesn't ship seshat it fetches it from crates.io.
Am I missing something?
There was a problem hiding this comment.
We have discussed this internally: since seshat-node is a member of the seshat workspace, its lockfile is never updated by any cargo operation, so it will gradually drift and would need hand updating. I'm going to add a lockfile generator to the release pipeline which should mitigate this?
7d3a894 to
bde8510
Compare
This commit introduces a `cargo package` invocation into the release CI, which generates a `Cargo.lock` we can place in the project before bundling the npm tarball. Signed-off-by: Skye Elliot <actuallyori@gmail.com>
This should prevent us from accidentally bumping libc past this version pin via `cargo update` or similar. Signed-off-by: Skye Elliot <actuallyori@gmail.com>
bde8510 to
6b129d5
Compare
poljar
left a comment
There was a problem hiding this comment.
Alright, the explanations make sense to me and if CI is happy then so should I be.
In #215, I outlinde how
libc@0.2.190removed some deprecated Apple-only symbols (rust-lang/libc#5401), which are still utilised bynix@0.14.1, a dependency oftantivy@0.12. CI picked up the new libc because we don't use--lockedin CI, and the rootCargo.lockis not committed.There are two further issues here:
seshat-node/Cargo.lock) pinsseshat 4.1.0against a^5.0.0requirement inseshat-node/Cargo.toml, so cargo silently discards it and re-resolved everything to latest every time CI is run.seshat-nodeis a workspace crate, so any invocations tocargothat modify dependencies do not modify its lockfile, but the workspace root's.To fix this, I have:
Cargo.lock(by removing it from gitignore), and dropped the theseshat-node/Cargo.locksince it would only drift further;libcto0.2.189, before the deprecated symbols were removed;--lockedto cargo invocations in CI to prevent it from updating dependencies without us asking it to/I think in reality we really need to update past tantivy 0.12.
Fixes #215.