Skip to content

fix: pin alloy-sol-types & alloy-primitives to =1.6.0 (unblock v1.0.0 release) - #37

Merged
jeuryink merged 1 commit into
mainfrom
fix/pin-alloy-sol-types-1.6.0
Jul 23, 2026
Merged

jeuryink merged 1 commit into
mainfrom
fix/pin-alloy-sol-types-1.6.0

Conversation

@jeuryink

Copy link
Copy Markdown
Collaborator

What happened

The v1.0.0 release-plz run failed at verify package tarball with E0119:

error[E0119]: conflicting implementations of trait `Default` for type `Querier::ProductInfo`
error[E0119]: conflicting implementations of trait `Default` for type `Querier::SubaccountInfo`
  --> src/nado_utils/bindings/querier.rs:87

Root cause

cargo publish resolves dependencies fresh (the lockfile is gitignored). With alloy-sol-types unpinned ("1.6.0" → caret), it pulled 1.6.1, whose sol! all_derives now also emits Default.

ProductInfo and SubaccountInfo embed only in-block types (SpotProduct[], PerpProduct[], HealthInfo[]), so all_derives generates their standard derives — including, as of 1.6.1, Default. That collides with the explicit #[derive(..., Default, ...)] the bindings carry → duplicate impl. (Structs that embed external types like PerpProductPerpEngineState don't error: all_derives skips them there, so the explicit derive is still required.)

nado-core doesn't hit this because it pins alloy-sol-types = "=1.6.0"; the export's unpin_versions step strips that pin.

Fix

Pin alloy-primitives and alloy-sol-types to =1.6.0, matching nado-core. This keeps all_derives on its pre-1.6.1 derive set. alloy itself still resolves to 2.2.0 — only the sol! macro crate is held back.

Verification

cargo +1.94.1 publish --dry-run against the exact release config (alloy 2.2.0 + alloy-sol-types 1.6.0) compiles clean and only stops at the upload:

Compiling nado-sdk v1.0.0 (…/target/package/nado-sdk-1.0.0)
 Finished `dev` profile
warning: aborting upload due to dry run

Follow-up (source side)

So this doesn't regress on the next export, export_rust_sdk.py's unpin_versions needs to exempt these two crates — companion nado-core PR.

Releasing

Once merged, re-run the release-plz action to publish v1.0.0 to crates.io.

🤖 Generated with Claude Code

The v1.0.0 release-plz publish failed to verify the package tarball: an
unpinned `alloy-sol-types` resolved to 1.6.1, whose `sol!` `all_derives`
now emits `Default`. That collides with the explicit `#[derive(Default)]`
on `Querier::ProductInfo`/`SubaccountInfo` (structs that embed only
in-block types, so `all_derives` supplies their standard derives) → E0119.

Pinning both to =1.6.0 matches what nado-core builds against and keeps
`all_derives` on its pre-1.6.1 behavior.

Verified with cargo +1.94.1 publish --dry-run (alloy 2.2.0 + sol-types
1.6.0): compiles clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 23, 2026 01:19

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Pins alloy-sol-types and alloy-primitives to an exact version to prevent cargo publish (fresh resolution without a lockfile) from pulling newer alloy-sol-types releases that change sol! derive behavior and break the generated bindings during packaging verification.

Changes:

  • Pin alloy-primitives to =1.6.0
  • Pin alloy-sol-types to =1.6.0

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

@jeuryink
jeuryink merged commit cc066d3 into main Jul 23, 2026
1 check passed
@github-actions github-actions Bot mentioned this pull request Jul 23, 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.

2 participants