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

Update the feature list of parity-scale-codec dependency #1124

Closed
rnbguy opened this issue Mar 13, 2024 · 4 comments · Fixed by #1238
Closed

Update the feature list of parity-scale-codec dependency #1124

rnbguy opened this issue Mar 13, 2024 · 4 comments · Fixed by #1238
Assignees
Labels
dependencies Pull requests that update a dependency file

Comments

@rnbguy
Copy link
Collaborator

rnbguy commented Mar 13, 2024

parity-scale-codec = { version = "3.6.5", default-features = false, features = ["full"] }

"full" feature is deprecated and doesn't enable anything. Rather this should be "derive".


Although, there is an interesting scenario with scale-info dependency.

#[derive(parity_scale_codec::Encode, parity_scale_codec::Decode)]
pub struct Signer(String);

the above doesn't compile with

[dependencies]
parity-scale-codec = { version = "3.6.5", default-features = false }

or

[dependencies]
parity-scale-codec = { version = "3.6.5", default-features = false, features = ["full"] }

but with the following it compiles

[dependencies]
parity-scale-codec = { version = "3.6.5", default-features = false }
scale-info         = { version = "2.10.0", default-features = false }

of course it also compiles with

[dependencies]
parity-scale-codec = { version = "3.6.5", default-features = false, features = ["derive"] }
@rnbguy rnbguy added the dependencies Pull requests that update a dependency file label Mar 13, 2024
@seanchen1991
Copy link
Contributor

You mention two possible options that successfully compile. Should we go with the first or the second?

@seanchen1991 seanchen1991 self-assigned this May 24, 2024
@seanchen1991
Copy link
Contributor

seanchen1991 commented May 24, 2024

Actually, I see that you touched this code 3 weeks ago (though the parity-scale-codec dependency still has features = [ "full" ] enabled). Is this issue still relevant?

@rnbguy
Copy link
Collaborator Author

rnbguy commented May 24, 2024

It is still relevant 🙂 I modified those lines in chore(deps) PR. but I forgot to take care of this issue 😅

@rnbguy
Copy link
Collaborator Author

rnbguy commented May 24, 2024

You mention two possible options that successfully compile. Should we go with the first or the second?

It should be something like this,

parity-scale-codec = { version = "3.6.5", default-features = false, features = [ "derive" ] }
scale-info         = { version = "2.10.0", default-features = false }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants