Skip to content

Fix breaking change: Do not enforce discriminant to be a literal + don't expect usize. #695

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

Merged
merged 19 commits into from
Feb 4, 2025

Conversation

gui1117
Copy link
Contributor

@gui1117 gui1117 commented Jan 31, 2025

Fix breaking change: #687
Fix forcing usize for variant expression introduced in: #653

Currently testing with polkadot-sdk: paritytech/polkadot-sdk#7417

Maybe we can have a new attribute: allow duplicate index.

@gui1117 gui1117 changed the title Fix breaking change: Do not enforce discriminant to be a literal WIP: Fix breaking change: Do not enforce discriminant to be a literal Jan 31, 2025
@gui1117 gui1117 changed the title WIP: Fix breaking change: Do not enforce discriminant to be a literal Maybe fix breaking change: Do not enforce discriminant to be a literal Jan 31, 2025
@gui1117 gui1117 changed the title Maybe fix breaking change: Do not enforce discriminant to be a literal Fix breaking change: Do not enforce discriminant to be a literal + don't expect usize. Feb 1, 2025
Copy link
Contributor

@serban300 serban300 left a comment

Choose a reason for hiding this comment

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

LGTM !

@gui1117
Copy link
Contributor Author

gui1117 commented Feb 4, 2025

clippy fails with:

Run cargo +stable clippy --locked -- -Dwarnings
  cargo +stable clippy --locked -- -Dwarnings
  cargo +stable clippy --locked -p parity-scale-codec-derive -- -Dwarnings
  cargo +stable clippy --locked --test clippy -- -Dwarnings
  shell: sh -e {0}
  env:
    IMAGE: paritytech/ci-unified:bullseye-1.81.0
    CACHE_ON_FAILURE: false
    CARGO_INCREMENTAL: 0
    Updating crates.io index
error: the lock file /__w/parity-scale-codec/parity-scale-codec/Cargo.lock needs to be updated but --locked was passed to prevent this
If you want to try to generate the lock file without accessing the network, remove the --locked flag and use --offline instead.

but it works for me locally, I will merge and try to trigger ci in another PR

@gui1117 gui1117 merged commit f0345de into master Feb 4, 2025
16 of 17 checks passed
@gui1117 gui1117 deleted the gui-fix-discriminant-reported-error branch February 4, 2025 00:33
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