Repository navigation
Fix warnings: private setters cannot be referenced from an '@inlinable' function - #3719
Merged
Merged
Conversation
Fix the following warnings: > setter for property 'xxx' is private and cannot be referenced from an '@inlinable' function; this will be an error in a future Swift language mode
glbrntt
reviewed
Aug 25, 2026
| internal struct Heap<Element: Comparable> { | ||
| @usableFromInline | ||
| internal private(set) var storage: [Element] | ||
| internal var storage: [Element] |
Contributor
There was a problem hiding this comment.
This applies more generally, but where we remove private(set) I think we should audit for callers and see whether it should become underscored (to indicate it's private) and have a non-underscored computed property for reading if necessary.
glbrntt
approved these changes
Aug 25, 2026
Lukasa
approved these changes
Sep 2, 2026
setBytesWithoutContigiousStorageMoreThanUInt32MaxBytes built a CircularBuffer<UInt8> of UInt32.max + 1 elements just to get a collection without contiguous storage. That is ~4.3 billion appends through the generic RangeReplaceableCollection path, each capacity doubling running an O(n) verifyInvariants() assert, which took 20-70 minutes in a debug build. Since the PR workflow sets SWIFTNIO_RUN_SLOW_TESTS=1, every PR paid that cost on all Linux and macOS jobs running Swift 6.2+ (exit tests need compiler 6.2), pushing the one-hour macOS limit and timing out. Repeated is also a collection without contiguous storage, and it takes the same _setSlowPath, which traps converting underestimatedCount to a UInt32 index, so nothing needs to be materialised at all. The test now runs in 0.05s instead of tens of minutes, and no longer needs the opt-in gate.
fabianfett
enabled auto-merge (squash)
September 2, 2026 22:41
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix the following warnings: