Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Conversation

@stanislav-tkach
Copy link
Contributor

Closes #5542.

@stanislav-tkach stanislav-tkach added the A0-please_review Pull request needs code review. label Apr 25, 2020
Copy link
Member

@bkchr bkchr left a comment

Choose a reason for hiding this comment

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

You need to replace RuntimeDebug by custom Debug impls.

sp-runtime = { version = "2.0.0-dev", default-features = false, path = "../../primitives/runtime" }
sp-phragmen-compact = { version = "2.0.0-dev", path = "./compact" }
sp-arithmetic = { version = "2.0.0-dev", default-features = false, path = "../arithmetic" }
sp-core = { version = "2.0.0-dev", default-features = false, path = "../core" }
Copy link
Member

Choose a reason for hiding this comment

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

Replacing sp-runtime with sp-core does not solve the issue.

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah indeed, goal is to move this out of substrate and not depend on these beefy crates like sp-runtime and sp-core. Only arithmetic is really needed. but it may not be as trivial as I formulated in the issue:

1- custom Debug impls will be needed
2- Some trait bounds (like Member) could be removed if needed.

Copy link
Member

@bkchr bkchr Apr 27, 2020

Choose a reason for hiding this comment

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

  1. Is really easy. RuntimeDebug just prints <wasm:stripped> when calling Debug and this can easily be done with some manual impls. Or we even just use the normal Debug derive.
  2. Is solved.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can we move sp-debug-derive outside of substrate too and still use it in order to reduce manual Debug implementations?

@kianenigma kianenigma added A5-grumble and removed A0-please_review Pull request needs code review. labels Apr 27, 2020
@bkchr bkchr merged commit 8c54626 into master Apr 28, 2020
@bkchr bkchr deleted the stas-5542 branch April 28, 2020 15:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sp-phragmen should only depend on sp-arithmetic

4 participants