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

Fix running tests on individual crates #1026

Open
1 task done
branan opened this issue Oct 11, 2022 · 0 comments
Open
1 task done

Fix running tests on individual crates #1026

branan opened this issue Oct 11, 2022 · 0 comments
Labels
crcl-runtime Circle runtime related. dependencies Pull requests that update a dependency file. I3-annoyance The code behaves as expected, but "expected" is an issue. P2-nice-to-have Issue is worth doing. Q5-hard Can be done by an experienced coder with a good knowledge of the codebase.

Comments

@branan
Copy link
Contributor

branan commented Oct 11, 2022

Which part of the code is the issue addressing?

  • Addressing a bug

Description

Being able to compile a given crate just for tests and/or benchmarks requires that a number of feature flags be properly passed along to the dependency crates. Not all of our crates do this correctly - instead, many only work when being built as a dependency of something like a full runtime, relying on the runtime to pass along the correct feature flags.

Research/based on

My own frustrations in attempting to run subsets of tests, only to find build errors.

How will this affect the code base

Cargo.toml files will have more explicit information about how feature flags should be propagated to dependencies. This is just more surface for diffs as dependencies change.

What are forseen obstacles or hurdles to overcome?

Maintaining this as Substrate updates and we add/remove dependencies is probably a fool's errand - we'll likely break it. Instead, we should always just aim to fix issues when we find them moving forward.

@branan branan added I3-annoyance The code behaves as expected, but "expected" is an issue. Q5-hard Can be done by an experienced coder with a good knowledge of the codebase. P2-nice-to-have Issue is worth doing. crcl-runtime Circle runtime related. dependencies Pull requests that update a dependency file. labels Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crcl-runtime Circle runtime related. dependencies Pull requests that update a dependency file. I3-annoyance The code behaves as expected, but "expected" is an issue. P2-nice-to-have Issue is worth doing. Q5-hard Can be done by an experienced coder with a good knowledge of the codebase.
Projects
None yet
Development

No branches or pull requests

1 participant