Skip to content

fix(ci): disable anise default features to unblock cargo-semver-checks (nalgebra 0.35)#632

Merged
simnaut merged 2 commits into
mainfrom
ci/fix-semver-checks-nalgebra035
May 25, 2026
Merged

fix(ci): disable anise default features to unblock cargo-semver-checks (nalgebra 0.35)#632
simnaut merged 2 commits into
mainfrom
ci/fix-semver-checks-nalgebra035

Conversation

@simnaut
Copy link
Copy Markdown
Owner

@simnaut simnaut commented May 25, 2026

Problem

cargo-semver-checks (the gating public-API fence on the published astrodyn crate) began failing on every PR after nalgebra 0.35.0 was published 2026-05-24:

error: could not compile `anise` (lib) due to 436 previous errors
  = note: there are multiple different versions of crate `nalgebra` in the dependency graph
error: failed to build rustdoc for crate astrodyn v0.2.0   # current
error: failed to build rustdoc for crate astrodyn v0.1.1   # baseline

Root cause

astrodynastrodyn_ephemerisanise 0.10.1, which depends on nalgebra directly (^0.34, i.e. <0.35) and via hyperdual 1.4.0 (a wider range that now admits 0.35). cargo-semver-checks builds both the current crate and a baseline crate's rustdoc with a fresh, unlocked resolve (it ignores our Cargo.lock), so it selects nalgebra 0.34.2 for the anise edge and 0.35.0 for the hyperdual edge — two incompatible versions in one graph — and anise fails to compile. Our committed Cargo.lock pins a single nalgebra 0.34.1, so normal/locked builds are unaffected.

Fix (two parts)

1. Trim anise features (fixes the current build + leaner deps).
astrodyn_ephemeris is the workspace's only anise consumer and uses only core anise (Almanac::from_spk/translate/rotate, constants, Epoch). Disabling anise's default features drops analysis/csv/rayon/metaloadand with them the hyperdual → nalgebra edge — so even a fresh resolve caps nalgebra at 0.34.x from anise's own ^0.34.

anise = { version = "0.10", default-features = false }

Behavior-preserving (dropped features are unused and compile-gated); Cargo.lock drops ~870 lines.

2. Move the semver baseline to git main (fixes the baseline build).
The published 0.1.1 baseline can't be patched and is now unbuildable on a fresh resolve. baseline-rev: main builds the baseline from main's source, which carries the part-1 fix once this lands — so it stays buildable and self-heals. Also a stronger regression fence for a pre-1.0 crate.

Bootstrap note

During this PR's own CI, the semver baseline is current main (which doesn't yet have part 1), so cargo-semver-checks stays red here — a one-time chicken-and-egg. This PR is intended to be admin-merged once the substantive checks (Tier 3, unit+tier2, parity) are green. After it lands, semver-checks goes green for all PRs (and #629 once rebased on main).

Verification

  • hyperdual removed; single nalgebra 0.34.1; Cargo.lock still pins 0.34.1.
  • cargo update -p nalgebra now caps at 0.34.2 — cannot reach 0.35.0.
  • 216/216 Tier 3 tests pass (incl. earth_moon); 12/12 ephemeris unit tests; apollo8_frame_switch + kinematic_propagation pass.
  • cargo fmt --check + cargo clippy -p astrodyn_ephemeris --tests -- -D warnings clean.

🤖 Generated with Claude Code

nalgebra 0.35.0 (published 2026-05-24) is incompatible with anise's
direct `nalgebra = "^0.34"` requirement, but anise's `hyperdual` edge
(pulled by its default `analysis` feature) accepts the wider range. The
cargo-semver-checks job builds the current crate's rustdoc in a scratch
dir with a fresh, *unlocked* resolve, so it selected both nalgebra 0.34.2
(for anise) and 0.35.0 (for hyperdual) into one graph — two incompatible
versions — and `anise` failed to compile (436 errors), failing the gate.
Our committed Cargo.lock pins a single nalgebra 0.34.1, so normal builds
are unaffected; only the unlocked semver-checks resolve broke.

astrodyn_ephemeris is the workspace's only anise consumer and uses only
core anise (`Almanac::from_spk`/`translate`/`rotate`, constants, `Epoch`).
Disabling anise's default features drops `analysis`/`csv`/`rayon`/`metaload`
— and with them the `hyperdual → nalgebra` edge — so even a fresh resolve
now caps nalgebra at 0.34.x from anise's own requirement. Behavior-
preserving (the dropped features are unused and compile-gated) and leaves
the dependency tree leaner.

Verified: hyperdual removed, single nalgebra 0.34.1; `cargo update -p
nalgebra` now caps at 0.34.2 (cannot reach 0.35); 216/216 tier3 tests
pass; ephemeris unit tests pass; fmt + clippy clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 25, 2026 20:55
Copy link
Copy Markdown

Copilot AI left a comment

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 unblocks cargo-semver-checks for the published astrodyn crate by ensuring the dependency graph cannot resolve to two incompatible nalgebra versions during the action’s fresh/unlocked rustdoc build. It does this by disabling anise default features in the only workspace crate that depends on anise (astrodyn_ephemeris), removing the hyperdual → nalgebra path that admitted nalgebra 0.35.

Changes:

  • Disable anise default features in crates/astrodyn_ephemeris to prevent unlocked resolves from pulling in conflicting nalgebra versions.
  • Update Cargo.lock to reflect the leaner dependency graph after dropping anise default-feature dependencies.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

File Description
crates/astrodyn_ephemeris/Cargo.toml Switch anise to default-features = false and document the rationale tied to semver-checks/unlocked resolves.
Cargo.lock Lockfile refresh reflecting removal of anise default-feature dependency subtree (including hyperdual).

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

The published astrodyn 0.1.1 baseline is no longer buildable on a fresh
(unlocked) resolve: cargo-semver-checks rebuilds the baseline crate in a
scratch dir, and since nalgebra 0.35.0 (2026-05-24) anise pulls two
incompatible nalgebra majors via its hyperdual edge, so the baseline
rustdoc build fails (436 errors) on every PR — independent of the PR's
content. A published manifest can't be patched, but `main` can (this PR's
anise feature trim), so a git baseline stays buildable and self-heals once
this lands. Comparing against main is also a stronger regression fence for
a pre-1.0 crate. Checkout uses fetch-depth: 0 so the main rev is local.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@simnaut simnaut merged commit 8f837e8 into main May 25, 2026
17 of 18 checks passed
@simnaut simnaut deleted the ci/fix-semver-checks-nalgebra035 branch May 25, 2026 21:29
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.

2 participants