Skip to content

Commit 448c411

Browse files
Merge pull request #61289 from AnthonyLatsis/migrate-stdlib-to-gh-issues
Gardening: Migrate stdlib sources to GH issues
2 parents c55218d + c731089 commit 448c411

19 files changed

+50
-46
lines changed

stdlib/cmake/modules/AddSwiftStdlib.cmake

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1916,10 +1916,11 @@ function(add_swift_target_library name)
19161916
list(APPEND swiftlib_swift_compile_flags_all
19171917
${SWIFTLIB_SWIFT_COMPILE_FLAGS_LINUX})
19181918
elseif(${sdk} STREQUAL WINDOWS)
1919-
# FIXME(SR2005) static and shared are not mutually exclusive; however
1920-
# since we do a single build of the sources, this doesn't work for
1921-
# building both simultaneously. Effectively, only shared builds are
1922-
# supported on windows currently.
1919+
# FIXME: https://github.com/apple/swift/issues/44614
1920+
# static and shared are not mutually exclusive; however since we do a
1921+
# single build of the sources, this doesn't work for building both
1922+
# simultaneously. Effectively, only shared builds are supported on
1923+
# windows currently.
19231924
if(SWIFTLIB_SHARED)
19241925
list(APPEND swiftlib_swift_compile_flags_all -D_WINDLL)
19251926
if(SWIFTLIB_IS_STDLIB_CORE)

stdlib/public/SwiftShims/swift/shims/RefCount.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1326,7 +1326,7 @@ class HeapObjectSideTableEntry {
13261326
public:
13271327
HeapObjectSideTableEntry(HeapObject *newObject)
13281328
: object(newObject),
1329-
#if __arm__ || __powerpc__ // https://bugs.swift.org/browse/SR-5846
1329+
#if __arm__ || __powerpc__ // https://github.com/apple/swift/issues/48416
13301330
refCounts(SideTableRefCounts::Initialized)
13311331
#else
13321332
refCounts()

stdlib/public/core/ArrayShared.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ extension Collection {
127127
}
128128

129129
extension _ArrayBufferProtocol {
130-
@inlinable // FIXME @useableFromInline https://bugs.swift.org/browse/SR-7588
130+
@inlinable // FIXME: @useableFromInline (https://github.com/apple/swift/issues/50130).
131131
@inline(never)
132132
internal mutating func _arrayOutOfPlaceReplace<C: Collection>(
133133
_ bounds: Range<Int>,

stdlib/public/core/CTypes.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public typealias CLongDouble = Double
9595
#endif
9696
#elseif os(Android)
9797
// On Android, long double is Float128 for AAPCS64, which we don't have yet in
98-
// Swift (SR-9072); and Double for ARMv7.
98+
// Swift (https://github.com/apple/swift/issues/51573); and Double for ARMv7.
9999
#if arch(arm)
100100
public typealias CLongDouble = Double
101101
#endif

stdlib/public/core/CompilerProtocols.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ extension RawRepresentable where RawValue: Hashable, Self: Hashable {
210210
// so code that used to work in 5.0 remains working whether or not the
211211
// original definition was inlined.
212212
//
213-
// See https://bugs.swift.org/browse/SR-10734
213+
// See https://github.com/apple/swift/issues/53126.
214214
var hasher = Hasher(_seed: seed)
215215
self.hash(into: &hasher)
216216
return hasher._finalize()

stdlib/public/core/Filter.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,11 @@ public typealias LazyFilterCollection<T: Collection> = LazyFilterSequence<T>
117117
extension LazyFilterCollection: Collection {
118118
public typealias SubSequence = LazyFilterCollection<Base.SubSequence>
119119

120+
// https://github.com/apple/swift/issues/46747
120121
// Any estimate of the number of elements that pass `_predicate` requires
121122
// iterating the collection and evaluating each element, which can be costly,
122123
// is unexpected, and usually doesn't pay for itself in saving time through
123-
// preventing intermediate reallocations. (SR-4164)
124+
// preventing intermediate reallocations.
124125
@inlinable // lazy-performance
125126
public var underestimatedCount: Int { return 0 }
126127

stdlib/public/core/FloatingPointTypes.swift.gyb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -952,7 +952,7 @@ extension ${Self}: _ExpressibleByBuiltinFloatLiteral {
952952
% if bits == builtinFloatLiteralBits:
953953
self = ${Self}(value)
954954
% elif bits < builtinFloatLiteralBits:
955-
// FIXME: This can result in double rounding errors (SR-7124).
955+
// FIXME: This can result in double rounding errors (https://github.com/apple/swift/issues/49672).
956956
self = ${Self}(Builtin.fptrunc_FPIEEE${builtinFloatLiteralBits}_FPIEEE${bits}(value))
957957
% else:
958958
// FIXME: This is actually losing precision <rdar://problem/14073102>.

stdlib/public/core/HashTable.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ extension _HashTable {
107107
) -> Int {
108108
// We generate a new hash seed whenever a new hash table is allocated and
109109
// whenever an existing table is resized, so that we avoid certain copy
110-
// operations becoming quadratic. (For background details, see
111-
// https://bugs.swift.org/browse/SR-3268)
110+
// operations becoming quadratic. For background details, see
111+
// https://github.com/apple/swift/issues/45856.
112112
//
113113
// Note that we do reuse the existing seed when making copy-on-write copies
114114
// so that we avoid breaking value semantics.

stdlib/public/core/Mirror.swift

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -482,8 +482,7 @@ public struct Mirror {
482482
displayStyle: DisplayStyle? = nil,
483483
ancestorRepresentation: AncestorRepresentation = .generated
484484
) where C.Element == Child {
485-
// Can't use Builtin.unreachable() due to
486-
// https://bugs.swift.org/browse/SR-15300
485+
// FIXME: Can't use Builtin.unreachable() due to https://github.com/apple/swift/issues/57622.
487486
self.init(reflecting: subject)
488487
}
489488
public init<Subject, C: Collection>(
@@ -492,8 +491,7 @@ public struct Mirror {
492491
displayStyle: DisplayStyle? = nil,
493492
ancestorRepresentation: AncestorRepresentation = .generated
494493
) {
495-
// Can't use Builtin.unreachable() due to
496-
// https://bugs.swift.org/browse/SR-15300
494+
// FIXME: Can't use Builtin.unreachable() due to https://github.com/apple/swift/issues/57622.
497495
self.init(reflecting: subject)
498496
}
499497
public init<Subject>(
@@ -502,8 +500,7 @@ public struct Mirror {
502500
displayStyle: DisplayStyle? = nil,
503501
ancestorRepresentation: AncestorRepresentation = .generated
504502
) {
505-
// Can't use Builtin.unreachable() due to
506-
// https://bugs.swift.org/browse/SR-15300
503+
// FIXME: Can't use Builtin.unreachable() due to https://github.com/apple/swift/issues/57622.
507504
self.init(reflecting: subject)
508505
}
509506
public let subjectType: Any.Type

stdlib/public/core/SliceBuffer.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ internal struct _SliceBuffer<Element>
211211
//
212212
// return _hasNativeBuffer && isUniquelyReferenced()
213213
//
214-
// SR-6437
214+
// https://github.com/apple/swift/issues/48987
215215
if !_hasNativeBuffer {
216216
return false
217217
}

stdlib/public/core/Sort.swift

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,8 @@ extension MutableCollection where Self: BidirectionalCollection {
334334
/// as out-of-place storage. Stable.
335335
///
336336
/// The unused return value is legacy ABI. It was originally added as a
337-
/// workaround for a compiler bug (now fixed). See SR-14750 (rdar://45044610).
337+
/// workaround for a compiler bug (now fixed). See
338+
/// https://github.com/apple/swift/issues/57100 (rdar://45044610).
338339
///
339340
/// - Precondition: `lo..<mid` and `mid..<hi` must already be sorted according
340341
/// to `areInIncreasingOrder`.
@@ -515,7 +516,8 @@ extension UnsafeMutableBufferPointer {
515516
/// out-of-place storage.
516517
///
517518
/// The unused return value is legacy ABI. It was originally added as a
518-
/// workaround for a compiler bug (now fixed). See SR-14750 (rdar://45044610).
519+
/// workaround for a compiler bug (now fixed). See
520+
/// https://github.com/apple/swift/issues/57100 (rdar://45044610).
519521
///
520522
/// - Precondition: `runs.count > 1` and `i > 0`
521523
/// - Precondition: `buffer` must have at least
@@ -551,7 +553,8 @@ extension UnsafeMutableBufferPointer {
551553
/// satisfied.
552554
///
553555
/// The unused return value is legacy ABI. It was originally added as a
554-
/// workaround for a compiler bug (now fixed). See SR-14750 (rdar://45044610).
556+
/// workaround for a compiler bug (now fixed). See
557+
/// https://github.com/apple/swift/issues/57100 (rdar://45044610).
555558
///
556559
/// - Precondition: `buffer` must have at least
557560
/// `min(runs[i].count, runs[i - 1].count)` uninitialized elements.
@@ -628,7 +631,8 @@ extension UnsafeMutableBufferPointer {
628631
/// Merges elements of `runs` until only one run remains.
629632
///
630633
/// The unused return value is legacy ABI. It was originally added as a
631-
/// workaround for a compiler bug (now fixed). See SR-14750 (rdar://45044610).
634+
/// workaround for a compiler bug (now fixed). See
635+
/// https://github.com/apple/swift/issues/57100 (rdar://45044610).
632636
///
633637
/// - Precondition: `buffer` must have at least
634638
/// `min(runs[i].count, runs[i - 1].count)` uninitialized elements.

stdlib/public/core/Stride.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ extension StrideTo: CustomReflectable {
398398
}
399399
#endif
400400

401-
// FIXME(conditional-conformances): This does not yet compile (SR-6474).
401+
// FIXME(conditional-conformances): This does not yet compile (https://github.com/apple/swift/issues/49024).
402402
#if false
403403
extension StrideTo: RandomAccessCollection
404404
where Element.Stride: BinaryInteger {
@@ -616,7 +616,7 @@ extension StrideThrough: CustomReflectable {
616616
}
617617
#endif
618618

619-
// FIXME(conditional-conformances): This does not yet compile (SR-6474).
619+
// FIXME(conditional-conformances): This does not yet compile (https://github.com/apple/swift/issues/49024).
620620
#if false
621621
extension StrideThrough: RandomAccessCollection
622622
where Element.Stride: BinaryInteger {

stdlib/public/core/StringComparable.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ extension String: Comparable {
8383

8484
extension Substring: Equatable {}
8585

86-
// TODO(SR-12457): Generalize `~=` over `StringProtocol`. Below are
87-
// concrete overloads to give us most of the benefit without potential harm
88-
// to expression type checking performance.
86+
// TODO: Generalize `~=` over `StringProtocol` (https://github.com/apple/swift/issues/54896)
87+
// Below are concrete overloads to give us most of the benefit without potential
88+
// harm to expression type checking performance.
8989
extension String {
9090
@_alwaysEmitIntoClient
9191
@inline(__always)

stdlib/public/core/StringRangeReplaceableCollection.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -339,15 +339,15 @@ extension String {
339339
}
340340

341341
extension String {
342-
// This is needed because of the issue described in SR-4660 which causes
343-
// source compatibility issues when String becomes a collection
342+
// FIXME: This is needed because of https://github.com/apple/swift/issues/47237,
343+
// which causes source compatibility issues when String becomes a collection.
344344
@_transparent
345345
public func max<T: Comparable>(_ x: T, _ y: T) -> T {
346346
return Swift.max(x,y)
347347
}
348348

349-
// This is needed because of the issue described in SR-4660 which causes
350-
// source compatibility issues when String becomes a collection
349+
// FIXME: This is needed because of https://github.com/apple/swift/issues/47237,
350+
// which causes source compatibility issues when String becomes a collection.
351351
@_transparent
352352
public func min<T: Comparable>(_ x: T, _ y: T) -> T {
353353
return Swift.min(x,y)

stdlib/public/runtime/DynamicCast.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -786,12 +786,14 @@ tryCastToAnyHashable(
786786
#endif
787787
}
788788
case MetadataKind::Optional: {
789-
// Until SR-9047 fixes the interactions between AnyHashable and Optional, we
790-
// avoid directly injecting Optionals. In particular, this allows
791-
// casts from [String?:String] to [AnyHashable:Any] to work the way people
792-
// expect. Otherwise, without SR-9047, the resulting dictionary can only be
793-
// indexed with an explicit Optional<String>, not a plain String.
794-
// After SR-9047, we can consider dropping this special case entirely.
789+
// FIXME: https://github.com/apple/swift/issues/51550
790+
// Until the interactions between AnyHashable and Optional is fixed, we
791+
// avoid directly injecting Optionals. In particular, this allows casts
792+
// from [String?:String] to [AnyHashable:Any] to work the way people
793+
// expect. Otherwise, the resulting dictionary can only be indexed with an
794+
// explicit Optional<String>, not a plain String.
795+
// After fixing the issue, we can consider dropping this special
796+
// case entirely.
795797

796798
// !!!! This breaks compatibility with compiler-optimized casts
797799
// (which just inject) and violates the Casting Spec. It just preserves

stdlib/public/runtime/Exclusivity.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ static inline void _flockfile_stderr() {
7575
#if defined(_WIN32)
7676
_lock_file(stderr);
7777
#elif defined(__wasi__)
78-
// WebAssembly/WASI doesn't support file locking yet
79-
// https://bugs.swift.org/browse/SR-12097
78+
// FIXME: WebAssembly/WASI doesn't support file locking yet (https://github.com/apple/swift/issues/54533).
8079
#else
8180
flockfile(stderr);
8281
#endif
@@ -86,8 +85,7 @@ static inline void _funlockfile_stderr() {
8685
#if defined(_WIN32)
8786
_unlock_file(stderr);
8887
#elif defined(__wasi__)
89-
// WebAssembly/WASI doesn't support file locking yet
90-
// https://bugs.swift.org/browse/SR-12097
88+
// FIXME: WebAssembly/WASI doesn't support file locking yet (https://github.com/apple/swift/issues/54533).
9189
#else
9290
funlockfile(stderr);
9391
#endif

stdlib/public/runtime/Metadata.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1498,7 +1498,7 @@ class TupleCacheEntry
14981498
class TupleCacheStorage :
14991499
public LockingConcurrentMapStorage<TupleCacheEntry, TupleCacheTag> {
15001500
public:
1501-
// FIXME: https://bugs.swift.org/browse/SR-1155
1501+
// FIXME: https://github.com/apple/swift/issues/43763.
15021502
#pragma clang diagnostic push
15031503
#pragma clang diagnostic ignored "-Winvalid-offsetof"
15041504
static TupleCacheEntry *

stdlib/public/runtime/SwiftObject.mm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1272,7 +1272,8 @@ id swift_dynamicCastObjCProtocolConditional(id object,
12721272
// class "c" might be valid metadata, but it hasn't been initialized yet.
12731273
// Send a message that's likely not to be overridden to minimize potential
12741274
// side effects. Ignore the return value in case it is overridden to
1275-
// return something different. See SR-10463 for an example.
1275+
// return something different. See
1276+
// https://github.com/apple/swift/issues/52863 for an example.
12761277
[c self];
12771278
return c;
12781279
}

stdlib/public/stubs/Stubs.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ void _swift_stdlib_flockfile_stdout() {
461461
#if defined(_WIN32)
462462
_lock_file(stdout);
463463
#elif defined(__wasi__)
464-
// WebAssembly/WASI doesn't support file locking yet https://bugs.swift.org/browse/SR-12097
464+
// FIXME: WebAssembly/WASI doesn't support file locking yet (https://github.com/apple/swift/issues/54533).
465465
#else
466466
flockfile(stdout);
467467
#endif
@@ -471,7 +471,7 @@ void _swift_stdlib_funlockfile_stdout() {
471471
#if defined(_WIN32)
472472
_unlock_file(stdout);
473473
#elif defined(__wasi__)
474-
// WebAssembly/WASI doesn't support file locking yet https://bugs.swift.org/browse/SR-12097
474+
// FIXME: WebAssembly/WASI doesn't support file locking yet (https://github.com/apple/swift/issues/54533).
475475
#else
476476
funlockfile(stdout);
477477
#endif

0 commit comments

Comments
 (0)