Skip to content

Use cargo-all-features for all feature sets (incl. no features) #172

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

Closed
wants to merge 2 commits into from

Conversation

echeran
Copy link
Contributor

@echeran echeran commented Jul 10, 2020

Summary:

  • Using cargo-all-features appears to build and test against all subsets of features (including no features) as expected
  • The build step (cargo build-all-features) ends early with an error
  • The test step (cargo test-all-features), when run locally, shows some of the combinations in its output
  • The reported errors may not be the exhaustive list, since the process exits early on error
  • example workflow run

Fixes #63

Selected lines from build run:

    Building crate=icu-data-provider features=[]

error[E0432]: unresolved import `std::error`
  --> components/data-provider/src/lib.rs:16:10
   |
16 | use std::error::Error;
   |          ^^^^^ help: a similar path exists: `downcast_rs::std::error`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0432`.
error: could not compile `icu-data-provider`.

Selected lines from test run:

     Testing crate=icu4x features=[]

     Testing crate=icu-data-provider-json features=[]

     Testing crate=icu-data-provider-json features=[std]

     Testing crate=icu features=[]

     Testing crate=icu-data-provider features=[]

error[E0432]: unresolved import `std::error`
  --> components/data-provider/src/lib.rs:16:10
   |
16 | use std::error::Error;
   |          ^^^^^ help: a similar path exists: `downcast_rs::std::error`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0432`.
error: could not compile `icu-data-provider`.

@coveralls
Copy link

coveralls commented Jul 10, 2020

Pull Request Test Coverage Report for Build dad9f5cffaa215a7b0f04842d447bd19db10a434-PR-172

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 79.54%

Totals Coverage Status
Change from base Build 3c012f9cf81c474b6daa5dc9a00c37e5ff30149d: 0.0%
Covered Lines: 2041
Relevant Lines: 2566

💛 - Coveralls

zbraniecki
zbraniecki previously approved these changes Jul 10, 2020
@sffc
Copy link
Member

sffc commented Jul 16, 2020

I know what I need to do to fix that error. I'll reproduce it locally and then open a PR.

@sffc
Copy link
Member

sffc commented Aug 8, 2020

I think this CI should start working once #198 is checked in.

@sffc
Copy link
Member

sffc commented Aug 28, 2020

@echeran Can you rebase this PR and see if it passes now?

@jira-pull-request-webhook
Copy link

Notice: the branch changed across the force-push!

  • .github/workflows/build-test.yml is different

View Diff Across Force-Push

~ Your Friendly Jira-GitHub PR Checker Bot

@echeran
Copy link
Contributor Author

echeran commented Sep 3, 2020

The previous error is gone, but we have a different error now:

    Building crate=icu-pluralrules features=[serde]
...
error[E0433]: failed to resolve: use of undeclared type or module `tuple_vec_map`
  --> components\pluralrules\src\data\cldr_resource.rs:43:38
   |
43 | #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
   |                                      ^^^^^^^^^ use of undeclared type or module `tuple_vec_map`

error[E0433]: failed to resolve: use of undeclared type or module `tuple_vec_map`

@sffc
Copy link
Member

sffc commented Sep 4, 2020

@echeran Is there a way to make the builds a little faster? The builds took 20m, 16m, and 24m. For example, can we do like before and make two different build jobs, one that finishes fast with the default feature set, and the other that takes longer with the comprehensive feature set?

@sffc sffc added the waiting-on-author PRs waiting for action from the author for >7 days label Sep 16, 2020
@echeran
Copy link
Contributor Author

echeran commented Oct 9, 2020

I filed frewsxcv/cargo-all-features#7 in the cargo plugin repo to ask:

  • does the cargo plugin work well with parallelism of cargo jobs?
  • is there something that the plugin could do ("dry run mode") to give us the commands for the jobs that it runs serially so that we can run those jobs concurrently?

@sffc
Copy link
Member

sffc commented Nov 3, 2020

Idea: Do the all-features thing only for building, not testing. I think most problems will arise during building, e.g., by not having the right symbols available. If code builds with a subset of features and passes tests with all features, I think there is a very good chance it passes with the subset of features.

Please wait for my PR fixing #334 and then rebase. Thanks!

@sffc
Copy link
Member

sffc commented Nov 3, 2020

I went ahead and integrated this PR into #376.

Also see frewsxcv/cargo-all-features#8

@sffc sffc closed this Nov 12, 2020
@echeran echeran deleted the ci-all-features branch June 17, 2021 03:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-on-author PRs waiting for action from the author for >7 days
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Running tests with different feature sets / architectures
4 participants