Skip to content

[swift-settings] Only allow for a setting to be passed exactly once to #SwiftSettings. #80070

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

Merged
merged 2 commits into from
Mar 18, 2025

Conversation

gottesmm
Copy link
Contributor

This responds to some feedback on the forums. Most importantly this allows for
us to use variadic generics in the the type system to document whether we allow
for "appending" behavior or not. Previously, for some options we would take the
last behavior (and theoretically) for others would have silently had appending
behavior. This just makes the behavior simple and more explicit.

Just noticed it as I was reading some code. Even though it cannot happen today,
with code being added, we could allow for undefined behavior. Better to program
defensively than aggressively.
…o #SwiftSettings.

This responds to some feedback on the forums. Most importantly this allows for
us to use variadic generics in the the type system to document whether we allow
for "appending" behavior or not. Previously, for some options we would take the
last behavior (and theoretically) for others would have silently had appending
behavior. This just makes the behavior simple and more explicit.
@gottesmm
Copy link
Contributor Author

@swift-ci smoke test

@gottesmm gottesmm enabled auto-merge March 17, 2025 21:11
@gottesmm gottesmm merged commit 0b2c160 into swiftlang:main Mar 18, 2025
3 checks passed
@gottesmm gottesmm deleted the swift-settings-only-once branch March 18, 2025 17:24
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