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

Allow multiples of repeatable directives #3986

Merged
merged 2 commits into from
Mar 18, 2022

Conversation

geshwho
Copy link
Contributor

@geshwho geshwho commented Mar 16, 2022

What's up

When adding directives to an object, we currently overwrite any existing directives of the same class. However, if the directive is repeatable, we should be able to specify multiple directives without overwriting existing ones.

Solution

Pretty simple: Don't remove existing directives if the directive in question is repeatable.

Caveats

I haven't explicitly checked the printer to make sure it does the right thing when printing multiple of the same directives. I assume it isn't really any different than if the object had multiple different directives.

@rmosolgo rmosolgo added this to the 2.0.3 milestone Mar 18, 2022
@rmosolgo
Copy link
Owner

👍 Thanks for this fix! Likewise, I assume the printer won't have any trouble with it.

@rmosolgo rmosolgo merged commit 63e699d into rmosolgo:master Mar 18, 2022
@geshwho geshwho deleted the mt/repeatable-directives branch March 18, 2022 00:48
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.

None yet

2 participants