Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: add cargo hack #170

Merged
merged 21 commits into from
Nov 1, 2024
Merged

CI: add cargo hack #170

merged 21 commits into from
Nov 1, 2024

Conversation

Boog900
Copy link
Member

@Boog900 Boog900 commented Jun 18, 2024

adds cargo hack to CI and fixes errors found.

@github-actions github-actions bot added A-p2p Related to P2P. A-dependency Related to dependencies, or changes to a Cargo.{toml,lock} file. A-helper Related to cuprate-helper. A-net Related to networking. A-ci Related to CI. labels Jun 18, 2024
@github-actions github-actions bot added the A-storage Related to storage. label Jun 27, 2024
.github/workflows/hack.yml Outdated Show resolved Hide resolved
@github-actions github-actions bot added A-workspace Changes to a root workspace file or general repo file. A-docs Related to documentation. labels Jun 27, 2024
@Boog900 Boog900 requested a review from hinto-janai June 27, 2024 00:55
@Boog900 Boog900 marked this pull request as ready for review June 27, 2024 00:55
.github/workflows/hack.yml Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
.github/workflows/hack.yml Outdated Show resolved Hide resolved
@github-actions github-actions bot added A-consensus Related to consensus. A-pruning Related to pruning. A-types Related to types. A-rpc Related to RPC. labels Oct 29, 2024
rpc/types/src/bin.rs Show resolved Hide resolved
fn compress_integer_array(_: &[u64]) -> error::Result<Vec<u8>> {
#[cfg(any(feature = "epee", feature = "serde"))]
fn compress_integer_array(_: &[u64]) -> Vec<u8> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why was this signature changed? It can error because it uses https://doc.cuprate.org/cuprate_epee_encoding/fn.write_varint.html.

Copy link
Member Author

Choose a reason for hiding this comment

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

No this uses a different varint format: #229 (comment)

storage/txpool/src/service.rs Outdated Show resolved Hide resolved
proptest = ["dep:proptest", "dep:proptest-derive"]
json = ["hex", "dep:cuprate-helper"]
hex = ["dep:hex"]
# We sadly have no choice but to enable serde here as otherwise we will get warnings from the `hex` dep being unused.
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure if this is exactly right but would something like this work?

#[cfg(all(feature = "hex", feature = "serde"))]
use hex as _;

Copy link
Member Author

Choose a reason for hiding this comment

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

It would but IMO just enabling serde here is better as the enabled type literally only makes sense with serde

@hinto-janai
Copy link
Contributor

Btw merging this can close #325 I think?

storage/txpool/src/lib.rs Show resolved Hide resolved
# default = ["redb", "service"]
# default = ["redb-memory", "service"]
heed = ["cuprate-database/heed"]
redb = ["cuprate-database/redb"]
redb-memory = ["cuprate-database/redb-memory"]
service = ["dep:tower", "dep:rayon", "dep:cuprate-database-service"]
Copy link
Contributor

Choose a reason for hiding this comment

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

Why was this feature was removed? Should cuprate-blockchain do the same?

Anyway some docs should be updated:

Copy link
Member Author

Choose a reason for hiding this comment

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

Because it was annoying to get this to pass CI so I just removed the feature, almost all use cases will use the tower interface anyway, for those that don't I don't think a few extra dependencies would be too bad.

I for parity removed the feature flag from cuprate-blockchain as well and updated the docs

@github-actions github-actions bot added A-binaries Related to binaries. and removed A-consensus Related to consensus. labels Nov 1, 2024
@Boog900 Boog900 merged commit 44981f2 into main Nov 1, 2024
6 checks passed
@Boog900 Boog900 deleted the hack branch November 1, 2024 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-binaries Related to binaries. A-ci Related to CI. A-dependency Related to dependencies, or changes to a Cargo.{toml,lock} file. A-docs Related to documentation. A-helper Related to cuprate-helper. A-net Related to networking. A-p2p Related to P2P. A-pruning Related to pruning. A-rpc Related to RPC. A-storage Related to storage. A-types Related to types. A-workspace Changes to a root workspace file or general repo file.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants