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

Add CARGO_MAKE_WORKSPACE_INCLUDE_MEMBERS. #316

Merged
merged 4 commits into from
Nov 12, 2019
Merged

Add CARGO_MAKE_WORKSPACE_INCLUDE_MEMBERS. #316

merged 4 commits into from
Nov 12, 2019

Conversation

daxpedda
Copy link
Contributor

I think I managed to add a working test this time, might be more rigorous though.
The documentation has to be regenerated, didn't manage to get that working.

Fixes #315.

@codecov-io
Copy link

codecov-io commented Nov 11, 2019

Codecov Report

❗ No coverage uploaded for pull request base (0.24.0@93fd51c). Click here to learn what that means.
The diff coverage is 95.34%.

Impacted file tree graph

@@            Coverage Diff            @@
##             0.24.0     #316   +/-   ##
=========================================
  Coverage          ?   93.14%           
=========================================
  Files             ?       86           
  Lines             ?    15001           
  Branches          ?        0           
=========================================
  Hits              ?    13973           
  Misses            ?     1028           
  Partials          ?        0
Impacted Files Coverage Δ
src/lib/execution_plan.rs 93.98% <100%> (ø)
src/lib/execution_plan_test.rs 95.03% <92.85%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 93fd51c...314792c. Read the comment docs.

Copy link
Owner

@sagiegurari sagiegurari left a comment

Choose a reason for hiding this comment

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

great stuff. few comments if you can fix those it would be great.

@@ -120,6 +120,26 @@ fn should_skip_workspace_member(member: &str, skipped_members: &HashSet<String>)
}
}

fn get_included_workspace_members(include_members_config: String) -> Option<HashSet<String>> {
let list = get_skipped_workspace_members(include_members_config);
Copy link
Owner

Choose a reason for hiding this comment

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

this is a bit unreadable to me.
maybe we can have a single function like is_workspace_member_found(member, members_map) -> bool
and then should_skip_workspace_member calls it and if found returns skip and should_include_workspace_member calls it and if found returns include.
same logic should also be for get_skipped_workspace_members and get_included_workspace_members.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. Did I get it right?

src/lib/execution_plan_test.rs Show resolved Hide resolved
src/lib/execution_plan_test.rs Outdated Show resolved Hide resolved
src/lib/execution_plan_test.rs Outdated Show resolved Hide resolved
README.md Outdated
CARGO_MAKE_WORKSPACE_INCLUDE_MEMBERS = "tools/*"
```

This works together with **CARGO_MAKE_WORKSPACE_SKIP_MEMBERS**, members who are skipped will not be included.
Copy link
Owner

Choose a reason for hiding this comment

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

This works together with CARGO_MAKE_WORKSPACE_SKIP_MEMBERS, members which are excluded.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried to include that including members doesn't not ignore rules set by skipping members. Please feel free to modify it.

This works together with CARGO_MAKE_WORKSPACE_SKIP_MEMBERS, which will still exclude members and not be overwritten by CARGO_MAKE_WORKSPACE_INCLUDE_MEMBERS.

README.md Outdated Show resolved Hide resolved
@sagiegurari
Copy link
Owner

looks great. thanks a lot for all your PRs.
keep in mind that currently 0.24 release is pretty much complete, so i'll keep it in development for few days to get some feedback or maybe last moment requests before publishing an official release.
if you do have more items you would like to push, please open new issues today/tomorrow.

@sagiegurari sagiegurari merged commit ea823f7 into sagiegurari:0.24.0 Nov 12, 2019
@daxpedda
Copy link
Contributor Author

Thanks for creating and maintaining this great project!

if you do have more items you would like to push, please open new issues today/tomorrow.

I will, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants