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

Introduce target mapping #153

Merged
merged 7 commits into from
Nov 1, 2023
Merged

Introduce target mapping #153

merged 7 commits into from
Nov 1, 2023

Conversation

martis42
Copy link
Owner

@martis42 martis42 commented Nov 1, 2023

Sometimes users don't want to follow the DWYU rules for all targets or have to work with external dependencies not following the DWYU principles.
For such cases DWYU allows creating a mapping which for a chosen target makes more headers available as the target actually provides.
In other words, one can combine virtually for the DWYU analysis multiple targets.
Doing so allows using headers from transitive dependencies without DWYU raising an error for select cases.

Related to #138

Having a private and empty aspect config as impl detail for signaling that
no external config was provided is kinda hacky.
Using a list is the more elegant workaround for the limited aspect attr API
due to "empty" vs "not empty" matching closer to "nothing has been provided"
and "User provided a value".
Sometimes users don't want to follow the DWYU rules for all targets or
have to work with external dependencies not following the DWYU principles.
For such cases DWYU allows now creating a mapping which for a chosen
target makes more headers available as the target actually provides.
In other words, one can combine virtually for the DWYU analysis multiple
targets. Doing so allows using headers from transitive dependencies
without DWYU raising an error for select cases.
@martis42 martis42 marked this pull request as ready for review November 1, 2023 09:01
@martis42 martis42 merged commit 9b5a2b4 into main Nov 1, 2023
4 checks passed
@martis42 martis42 deleted the introduce_target_mapping branch November 1, 2023 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant