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

Clean up dependencies and fix primitives no_std build #535

Merged
merged 13 commits into from
Apr 17, 2023

Conversation

haerdib
Copy link
Contributor

@haerdib haerdib commented Apr 13, 2023

As preparatory steps for publishing on crates.io:

  1. Clean up the toml files:

    • remove unused dependencies
    • import frame-metadata from crates.io instead of github (less changes necessary for publishing on crates.io)
    • complete the toml file description of each crate
  2. Additionally, found while cleaning dependencies:

    • fix primitives crate no_std build and include the build test in CI
  3. Removed assert in error example because it constantly failed (substrate upgrade?). But since there is no decoding anyway, I don't see the use case in checking the encoded error.

  4. Last, but not least:

    • add READMEs to each crate

@haerdib haerdib self-assigned this Apr 13, 2023
@haerdib haerdib changed the title Preparatory step for crates.io publish Prepae for publish on crates.io Apr 13, 2023
@haerdib haerdib changed the title Prepae for publish on crates.io Clean up dependencies and fix primitves no_std build Apr 13, 2023
@haerdib haerdib changed the title Clean up dependencies and fix primitves no_std build Clean up dependencies and fix primitives no_std build Apr 13, 2023
@haerdib haerdib added F2-bug Something isn't working F3-test fix tests or CI E2-breaksapi labels Apr 13, 2023
@@ -77,8 +77,7 @@ async fn main() {
let string_error = format!("{:?}", e);
// We expect a TokenError::FundsUnavailable error. See :
//https://github.com/paritytech/substrate/blob/b42a687c9050cbe04849c45b0c5ccadb82c84948/frame/support/src/traits/tokens/fungible/mod.rs#L177
assert!(string_error.contains("Other"));
assert!(string_error.contains("[7, 0, 194, 110, 3, 65, 37, 56, 0, 0]")); //Fixme This is for now not decoded. See issue: #488
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This assert failed for some reason (different error seems to be returned now). However, since we cant decode this error anyway, I don't see much sense in asserting the error. Removed it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Totally agree with this reasoning.

@haerdib haerdib marked this pull request as ready for review April 14, 2023 07:24
@@ -77,8 +77,7 @@ async fn main() {
let string_error = format!("{:?}", e);
// We expect a TokenError::FundsUnavailable error. See :
//https://github.com/paritytech/substrate/blob/b42a687c9050cbe04849c45b0c5ccadb82c84948/frame/support/src/traits/tokens/fungible/mod.rs#L177
assert!(string_error.contains("Other"));
assert!(string_error.contains("[7, 0, 194, 110, 3, 65, 37, 56, 0, 0]")); //Fixme This is for now not decoded. See issue: #488
Copy link
Contributor

Choose a reason for hiding this comment

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

Totally agree with this reasoning.

primitives/Cargo.toml Show resolved Hide resolved
primitives/Cargo.toml Show resolved Hide resolved
@haerdib haerdib requested a review from Niederb April 17, 2023 06:58
Copy link
Contributor

@Niederb Niederb left a comment

Choose a reason for hiding this comment

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

Nice cleanup and improvement of no_std verification 🥳

@haerdib haerdib merged commit d2e25a5 into master Apr 17, 2023
@haerdib haerdib deleted the bh/prepare-cratesio branch April 17, 2023 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E2-breaksapi F2-bug Something isn't working F3-test fix tests or CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants