Skip to content

Conversation

0xZaddyy
Copy link
Contributor

This PR addresses #361
The just update-lock-files command was hanging because it used --all-features which enabled mutually exclusive version features in the node crate simultaneously (29_0, 28_2, 28_1, etc.), causing Cargo to get stuck resolving impossible dependencies.

Changes:

  • Build each crate individually instead of using workspace --all-features
  • Use features=29_0 for node crate (latest supported version)
  • Handle excluded crates (verify) with cd commands
  • Apply same pattern to all build commands (build, check, lint, docsrs)

@tcharding
Copy link
Member

Thanks for the contribution!

(cd node && cargo check --features=29_0)
# verify crate is excluded from workspace, handle separately
(cd verify && cargo check)
# Skip integration_test as it cannot use --all-features
Copy link
Member

Choose a reason for hiding this comment

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

integration_test can be checked the same as node (and for the same reason).

What about using lists of crate names and then a for loop, might be cleaner? I don't see the reason to have verify separate.

justfile Outdated
cargo check -p corepc-types --all-targets --all-features
cargo check -p jsonrpc --all-targets --all-features
cargo check -p corepc-node --all-targets --features=29_0
(cd verify && cargo check --all-targets)
Copy link
Member

Choose a reason for hiding this comment

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

We could use cargo check --manifest-patch verify/Cargo.toml instead to save cd'ing into verify.

@0xZaddyy 0xZaddyy requested a review from tcharding September 15, 2025 00:03
@0xZaddyy 0xZaddyy force-pushed the fix-build-features branch 2 times, most recently from d6f6bbb to 471e0e1 Compare September 15, 2025 01:05
@jamillambert
Copy link
Collaborator

Although I can't reproduce the issue I still agree it's better to remove all-features for node.

It's not a great idea having the version hard coded in the scripts, could we instead define a feature latest = ["29_0"] in node and then in the scripts use features=latest?

Also remove the comment from node/Cargo.toml:40 # - `cargo test --all-features`: Same as using latest version.

@tcharding
Copy link
Member

I like the latest feature idea.

Copy link
Collaborator

@jamillambert jamillambert left a comment

Choose a reason for hiding this comment

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

Looks good, but can you change the order of the two commits so that the latest feature is added to the Cargo.toml file first and then in the second commit you can use latest in the changes to the scripts. Otherwise you set it to 29.0 then immediately change it to latest.

  The previous build configuration used `--all-features` at the workspace
  level, which caused conflicts with mutually exclusive version features
  in the node and integration_test crates (e.g., v29_0, v28_2, etc.).
@0xZaddyy
Copy link
Contributor Author

Hey @jamillambert good now?

Copy link
Collaborator

@jamillambert jamillambert left a comment

Choose a reason for hiding this comment

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

The idea was to have the first commit define the latest feature and the second use it. Currently the two commits are mixed up in what they do. The first makes changes to both the update-lock-file.sh script and the justfile, neither of which are described in the commit log.

Can you try again?

justfile Outdated

# Cargo build everything.
build:
<<<<<<< HEAD
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is this from? your merge editor?

@tcharding
Copy link
Member

tcharding commented Sep 21, 2025

You still have merge conflicts in patch 1 mate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants