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 wildcard support for --with-attributes option. #567

Merged

Conversation

ronaldvanmanen
Copy link
Contributor

According to the help text the --with-attribute options supports wildcards:.
-wa, --with-attribute <with-attribute>

An attribute to be added to the given remapped declaration name during binding generation. Supports wildcards. []

However, the method void WithAttributes(...) invokes TryGetMappedValue(...) with matchStar set to false instead of true. This PR fixes that so that --with-attributes *=<attribute> will add [<attribute>] to all remapped declaration names during binding generation that don't have a more specific mapping (i.e. --with-attribute X=<attribute> will take precedence over --with-attribute *=<attribute>.

@ronaldvanmanen ronaldvanmanen force-pushed the fix/with-attributes-wildcard-support branch from 7b35a59 to d9d74e9 Compare September 26, 2024 11:24
@ronaldvanmanen
Copy link
Contributor Author

@dotnet-policy-service agree

@ronaldvanmanen
Copy link
Contributor Author

@tannergooding How do I request a review? Seems I'm not allowed to request a review for this pull request.

@tannergooding
Copy link
Member

Sorry for the delay, have been busy locking down the .NET 9 release and this hadn't had all CI legs passing so it didn't bubble up on my radar yet.

@tannergooding tannergooding merged commit 7e211d6 into dotnet:main Sep 27, 2024
13 checks passed
@ronaldvanmanen ronaldvanmanen deleted the fix/with-attributes-wildcard-support branch September 28, 2024 03:26
@ronaldvanmanen
Copy link
Contributor Author

No worries! Thanks for getting back to me. 👍

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.

2 participants