Skip to content

Install egglog with --locked and a pinned commit - #1628

Merged
pavpanchekha merged 1 commit into
herbie-fp:mainfrom
oflatt-claude:fix/egglog-install-locked
Jul 26, 2026
Merged

Install egglog with --locked and a pinned commit#1628
pavpanchekha merged 1 commit into
herbie-fp:mainfrom
oflatt-claude:fix/egglog-install-locked

Conversation

@oflatt-claude

@oflatt-claude oflatt-claude commented Jul 25, 2026

Copy link
Copy Markdown

Problem

make install (the egglog-herbie target) ran:

cargo install --git .../egglog-experimental --branch main egglog-experimental

cargo install ignores the checked-in Cargo.lock unless --locked is passed, so every CI run re-resolved egglog-experimental's whole dependency tree to the newest compatible versions. One such re-resolution just broke us:

  • egglog's add_primitive proc macro parses full Rust expressions and needs syn's full feature.
  • It never declared full; it only got it because clap_derive (via egglog's bin feature) asked for syn with full on the same syn 2.x (Cargo feature unification).
  • clap_derive 4.6 bumped to syn 3.x, so its full now lands on syn 3 and egglog's syn 2.x lost it, giving dozens of error: unsupported expression; enable syn's features=["full"].

(Failing run: #1627. This also affects infra/nightly.sh, which runs make install.)

Fix

cargo install --locked --git .../egglog-experimental --rev <sha> egglog-experimental
  • --locked → honor egglog-experimental's committed, tested lockfile instead of re-resolving. This is the part that fixes the break.
  • --rev <sha> → pin an exact commit instead of floating --branch main, so the egglog version only moves when we deliberately bump the pin (good practice for reproducibility). Note: pinning the rev without --locked would not fix the bug, since cargo install would still re-resolve transitive deps.

Verified locally: the old command reproduces the failure; this one installs cleanly.

Other install sites checked

  • .github/workflows/unit-test.yml and infra/nightly.sh both install egglog via make install, so they inherit this fix. ✅
  • Dockerfile:11 is separate and stale: cargo install egglog --version 1.0.0 installs the old egglog 1.0.0 from crates.io (the fallback binary in egglog-subprocess.rkt), not egglog-experimental 2.0.0. Left untouched here — flagging for a follow-up to reconcile the production image with the current egglog.

Upstream follow-ups (companion PRs)

🤖 Generated with Claude Code

@oflatt
oflatt marked this pull request as ready for review July 25, 2026 01:28
Copilot AI review requested due to automatic review settings July 25, 2026 01:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR makes the egglog-herbie install step reproducible by ensuring cargo install honors the upstream Cargo.lock when installing egglog-experimental from Git.

Changes:

  • Add --locked to the cargo install invocation in the egglog-herbie Makefile target to prevent dependency re-resolution and drift.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

`cargo install` ignores the checked-in Cargo.lock unless `--locked` is
passed, so every CI run re-resolved egglog-experimental's dependency tree
to the newest compatible versions. That recently broke the build: egglog's
`add_primitive` proc macro parses full Rust expressions and needs syn's
"full" feature, but only got it via feature-unification from clap_derive
(pulled in through egglog's `bin` feature). When clap_derive 4.6 moved to
syn 3.x, its "full" feature stopped applying to egglog's syn 2.x, and the
proc macro failed to compile ("enable syn's features=[\"full\"]").

Two changes for a reproducible install:
- `--locked` makes cargo honor egglog-experimental's committed, tested
  lockfile instead of re-resolving to latest.
- pin an exact `--rev` instead of floating `--branch main`, so the egglog
  version only changes when we deliberately bump the pin. (Bump this rev
  to pick up egglog updates.)

`--locked` is the part that fixes the break; the rev pin is good practice
for reproducibility.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@oflatt-claude
oflatt-claude force-pushed the fix/egglog-install-locked branch from 91591bb to c4391ea Compare July 25, 2026 01:31
@oflatt-claude oflatt-claude changed the title Install egglog with --locked to avoid dependency drift Install egglog with --locked and a pinned commit Jul 25, 2026
@pavpanchekha

Copy link
Copy Markdown
Contributor

I don't want to lock the egglog revision—egglog isn't the default so I'd rather let it float. But of course it's annoying when CI breaks. Is --locked without --rev also acceptable?

@oflatt

oflatt commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator

Yeah totally, just --locked is fine

@pavpanchekha
pavpanchekha merged commit c4391ea into herbie-fp:main Jul 26, 2026
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.

4 participants