Skip to content

Commit Cargo.lock with pinned libc@0.2.189 and use --locked in CI. - #216

Merged
kaylendog merged 5 commits into
mainfrom
chore/kaylendog/cargo-lockfile
Nov 19, 2026
Merged

kaylendog merged 5 commits into
mainfrom
chore/kaylendog/cargo-lockfile

Conversation

@kaylendog

@kaylendog kaylendog commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

In #215, I outlinde how libc@0.2.190 removed some deprecated Apple-only symbols (rust-lang/libc#5401), which are still utilised by nix@0.14.1, a dependency of tantivy@0.12. CI picked up the new libc because we don't use --locked in CI, and the root Cargo.lock is not committed.

There are two further issues here:

  • The only lockfile currently committed (seshat-node/Cargo.lock) pins seshat 4.1.0 against a ^5.0.0 requirement in seshat-node/Cargo.toml, so cargo silently discards it and re-resolved everything to latest every time CI is run.
  • seshat-node is a workspace crate, so any invocations to cargo that modify dependencies do not modify its lockfile, but the workspace root's.

To fix this, I have:

  • Committed the root Cargo.lock (by removing it from gitignore), and dropped the the seshat-node/Cargo.lock since it would only drift further;
  • Pinned libc to 0.2.189, before the deprecated symbols were removed;
  • Added --locked to 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.

Signed-off-by: Skye Elliot <actuallyori@gmail.com>
Signed-off-by: Skye Elliot <actuallyori@gmail.com>
Signed-off-by: Skye Elliot <actuallyori@gmail.com>
@kaylendog kaylendog self-assigned this Nov 17, 2026
@kaylendog kaylendog changed the title Commit lockfile and Commit Cargo.lock with pinned libc@0.2.189 and use --locked in CI. Nov 17, 2026
@kaylendog
kaylendog requested a review from poljar November 17, 2026 14:54
@kaylendog
kaylendog marked this pull request as ready for review November 17, 2026 14:55

@poljar poljar left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need a Cargo.lock file in the package.

Comment thread seshat-node/package.json
},
"files": [
"Cargo.toml",
"Cargo.lock",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@kaylendog
kaylendog requested a review from poljar November 18, 2026 13:24
@kaylendog
kaylendog force-pushed the chore/kaylendog/cargo-lockfile branch from 7d3a894 to bde8510 Compare November 18, 2026 13:27
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>
@kaylendog
kaylendog force-pushed the chore/kaylendog/cargo-lockfile branch from bde8510 to 6b129d5 Compare November 18, 2026 13:28

@poljar poljar left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, the explanations make sense to me and if CI is happy then so should I be.

@kaylendog
kaylendog merged commit d1e66b5 into main Nov 19, 2026
16 checks passed
@kaylendog
kaylendog deleted the chore/kaylendog/cargo-lockfile branch November 19, 2026 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

macOS CI fails when trying to compile crate nix@0.14

2 participants