Skip to content

Commit 7c23507

Browse files
Merge pull request #60026 from AnthonyLatsis/sr-to-gh-docs
docs: Migrate from SR issues to GitHub issues
2 parents 86eb55c + 94b1710 commit 7c23507

File tree

11 files changed

+102
-102
lines changed

11 files changed

+102
-102
lines changed

docs/ABIStabilityManifesto.md

Lines changed: 34 additions & 34 deletions
Large diffs are not rendered by default.

docs/Android.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ device running Android or an emulator. This guide explains:
77
1. How to run a simple "Hello, world" program on your Android device.
88
2. How to run the Swift test suite on an Android device.
99

10-
If you encounter any problems following the instructions below, please file a
11-
bug using https://bugs.swift.org/.
10+
If you encounter any problems following the instructions below, please
11+
[file an issue](https://github.com/apple/swift/issues) and apply the "Android"
12+
label.
1213

1314
## FAQ
1415

docs/CppInteroperability/CppInteroperabilityStatus.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ This status table describes which of the following C++ language features can be
7676
| Typedefs / Type aliases | Yes |
7777
| Global Variables | Yes |
7878
| Namespaces | Yes |
79-
| Inline Namespaces | Yes, with some known issues (https://bugs.swift.org/browse/SR-15956) |
79+
| Inline Namespaces | Yes, with some known issues ([#58217](https://github.com/apple/swift/issues/58217)) |
8080
| Exceptions | No |
8181
| Fields | Yes |
8282
| Member functions | Yes. Some value category overloads aren't imported |
@@ -120,7 +120,7 @@ This status table describes which of the following C++ standard library features
120120
## Known Issues
121121

122122
### Inline Namespaces
123-
- https://bugs.swift.org/browse/SR-15956: Swift's typechecker currently doesn't allow calling a function from an inline namespace when it's referenced through the parent namespace. Example of a test that fails: https://github.com/apple/swift/blob/main/test/Interop/Cxx/namespace/inline-namespace-function-call-broken.swift
123+
- [#58217](https://github.com/apple/swift/issues/58217): Swift's typechecker currently doesn't allow calling a function from an inline namespace when it's referenced through the parent namespace. Example of a test that fails: https://github.com/apple/swift/blob/main/test/Interop/Cxx/namespace/inline-namespace-function-call-broken.swift
124124

125125

126126
## Swift to C++ Interoperability Status

docs/Driver.md

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,8 @@ The output file map accepts other entries, but they should not be considered
167167
stable. Please stick to what's shown here.
168168

169169
(Note: In the example output file map above, all of the per-file outputs are
170-
being emitted to the same directory. [SR-327][] covers adding a flag that would
171-
infer this behavior given a directory path.)
172-
173-
[SR-327]: https://bugs.swift.org/browse/SR-327
170+
being emitted to the same directory. [#42949](https://github.com/apple/swift/issues/42949)
171+
covers adding a flag that would infer this behavior given a directory path.)
174172

175173

176174
## Whole-Module Optimization ##
@@ -286,9 +284,10 @@ past that, so:
286284
import later.
287285

288286
If you want debugging that's more than `-gline-tables-only`, this is the
289-
only supported way to do it today. ([SR-2637][] and [SR-2660][] are aimed
290-
at improving on this.) On the plus side, this mode doesn't strictly need
291-
an output file map if you give up incremental builds.
287+
only supported way to do it today [apple/llvm-project#4588](https://github.com/apple/llvm-project/issues/4588)
288+
and [#45265](https://github.com/apple/swift/issues/45265) are aimed at
289+
improving on this). On the plus side, this mode doesn't strictly need an
290+
output file map if you give up incremental builds.
292291

293292
- Invoke `swiftc -c`, then pass the resulting object files to your linker.
294293
All the same options from above apply, but you'll have to manually deal
@@ -302,10 +301,8 @@ past that, so:
302301
_Can I link all the object files together in the same binary, even if they came
303302
from multiple modules?_
304303

305-
This is not currently supported, and debugging probably won't work. (See
306-
[SR-2637][] and [SR-2660][] for more details.) However, if you are using
307-
`-gnone` or `-gline-tables-only`, the worst you will suffer is more symbols
308-
being visible than are strictly necessary.
309-
310-
[SR-2637]: https://bugs.swift.org/browse/SR-2637
311-
[SR-2660]: https://bugs.swift.org/browse/SR-2660
304+
This is not currently supported, and debugging probably won't work (see
305+
[apple/llvm-project#4588](https://github.com/apple/llvm-project/issues/4588) and
306+
[#45265](https://github.com/apple/swift/issues/45265) for more details).
307+
However, if you are using `-gnone` or `-gline-tables-only`, the worst you will
308+
suffer is more symbols being visible than are strictly necessary.

docs/DynamicCasting.md

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Where possible, each section includes machine-verifiable _invariants_ that can b
3636

3737
Casting an instance of a type to its own type will always succeed and return the original value unchanged.
3838

39-
```
39+
```swift
4040
let a: Int = 7
4141
a is Int // true
4242
a as? Int // Succeeds
@@ -109,13 +109,13 @@ Note: The associated `_ObjectiveCType` is constrained to be a subtype of `AnyObj
109109
In particular, this mechanism is equally available to the Swift implementation of Foundation on non-Apple platforms and the Objective-C Foundation on Apple platforms.
110110

111111
Example #1: Foundation extends the `Array` type in the standard library with an `_ObjectiveCBridgeable` conformance to `NSArray`. This allows Swift arrays to be cast to and from Foundation `NSArray` instances.
112-
```
112+
```swift
113113
let a = [1, 2, 3] // Array<Int>
114114
let b = a as? AnyObject // casts to NSArray
115115
```
116116

117117
Example #2: Foundation also extends each Swift numeric type with an `_ObjectiveCBridgeable` conformance to `NSNumber`.
118-
```
118+
```swift
119119
let a = 1 // Int
120120
// After the next line, b is an Optional<AnyObject>
121121
// holding a reference to an NSNumber
@@ -151,7 +151,7 @@ Casting to and from optional types will transparently unwrap optionals as much a
151151
Note: For "Optional Injection" above, the requirement that `t` is a non-nil instance of `T` implies that either `T` is not an `Optional` or that `T` is `Optional` and `t` has the form `.some(u)`
152152

153153
Examples
154-
```
154+
```swift
155155
// T and U are any two distinct types (possibly optional)
156156
// NO is any non-optional type
157157
let t: T
@@ -187,7 +187,7 @@ Note that "optional depth" here refers to the number of optional wrappers needed
187187
2. Otherwise, the value should inject with the greatest optional depth possible.
188188

189189
Examples
190-
```
190+
```swift
191191
// Depth preservation
192192
// The `.none` here has type `T?` with optional depth 1
193193
let t1: T???? = .some(.some(.some(.none)))
@@ -220,14 +220,14 @@ The result will be a new array where each `Int` in the original array has been i
220220

221221
However, if any component item cannot be cast, then the outer cast will also fail.
222222
For example, consider the following:
223-
```
223+
```swift
224224
let a: Array<Any> = [Int(7), "string"]
225225
a as? Array<Int> // Fails because "string" cannot be cast to `Int`
226226
```
227227

228228
Specifically, the casting operator acts for `Array` as if it were implemented as follows.
229229
In particular, note that an empty array can be successfully cast to any destination array type.
230-
```
230+
```swift
231231
func arrayCast<T,U>(source: Array<T>) -> Optional<Array<U>> {
232232
var result = Array<U>()
233233
for t in source {
@@ -249,7 +249,7 @@ Similar logic applies to `Set` and `Dictionary` casts.
249249
Note that the resulting `Set` or `Dictionary` may have fewer items than the original if the component casting operation converts non-equal items in the source into equal items in the destination.
250250

251251
Specifically, the casting operator acts on `Set` and `Dictionary` as if by the following code:
252-
```
252+
```swift
253253
func setCast<T,U>(source: Set<T>) -> Optional<Set<U>> {
254254
var result = Set<U>()
255255
for t in source {
@@ -382,7 +382,7 @@ For example, its metatype is named `AnyHashable.Type` and it does not have an ex
382382
Any protocol definition (except those that include an `associatedtype` property or which makes use of the `Self` typealias) has an associated existential type named after the protocol.
383383

384384
Specifically, assume you have a protocol definition
385-
```
385+
```swift
386386
protocol P {}
387387
```
388388

@@ -427,7 +427,7 @@ We call this type the "metatype of `T`".
427427
Technically, static variables or methods of a type belong to the `T.self` instance and are defined by the metatype of `T`:
428428

429429
Example:
430-
```
430+
```swift
431431
struct S {
432432
let ivar = 2
433433
static let svar = 1
@@ -447,7 +447,7 @@ However, in the following cases the metatype has a different name:
447447
* As explained above, although `AnyHashable` behaves like an existential type in some respects, its metatype is called `AnyHashable.Type`.
448448

449449
Example:
450-
```
450+
```swift
451451
// Metatype of a struct type
452452
struct S: P {}
453453
S.self is S.Type // always true
@@ -501,7 +501,7 @@ As with other existentials, casting _from_ an existential metatype is equivalent
501501
Casting _to_ an existential metatype succeeds whenever the source is a conforming metatype instance (or can be unwrapped to yield such a metatype instance).
502502

503503
Example
504-
```
504+
```swift
505505
protocol P {
506506
var ivar: Int { get }
507507
static svar: Int { get }
@@ -532,15 +532,15 @@ This is equivalent to saying that `P.self` is an instance of `P.Type`.
532532
(Remember that `P.self` is always an instance of `P.Protocol`.)
533533

534534
This is a concern for Swift because of the following construct, which attempts to invoke a generic `f` in a situation where the concrete instance clearly conforms to `P` but is represented as a `P` existential:
535-
```
535+
```swift
536536
func f<T:P>(t: T) { .. use t .. }
537537
let a : P = something
538538
f(a)
539539
```
540540
This construct is valid only if `T` conforms to `P` when `T = P`; that is, if `P` self-conforms.
541541

542542
A similar situation arises with generic types:
543-
```
543+
```swift
544544
struct MyGenericType<T: P> {
545545
init(_ value: T) { ... }
546546
}
@@ -591,7 +591,7 @@ These are some of the ways in which Swift 5.3 differs from the behavior describe
591591

592592
* Casts for which the target type is "more Optional" than the static source type previously produced errors. This disallowed all of the following: injecting an `Int` into an `Int?`, extracting an `Int?` from an opaque `Any` container, and casting an `Array<Int>` to an `Array<Int?>`. This document allows all of these.
593593

594-
```
594+
```swift
595595
let a = 7
596596
// Swift 5.3: error: cannot downcast to a more optional type
597597
// Specification: returns true
@@ -609,7 +609,7 @@ c is Int?
609609

610610
* An instance of a CoreFoundation type could sometimes be cast to a protocol defined on the companion Obj-C type and sometimes not. To make the behavior consistent, we had to choose one; having such casts always succeed seems more consistent with the general dual nature of Obj-C/CF types.
611611

612-
```
612+
```swift
613613
import Foundation
614614
protocol P {}
615615
extension NSString: P {}
@@ -625,7 +625,7 @@ print(b is P)
625625

626626
* The Swift 5.3 compiler asserts attempting to cast a struct to AnyObject
627627

628-
```
628+
```swift
629629
struct S {}
630630
let s = S()
631631
// Swift 5.3: Compiler crash (in asserts build)
@@ -635,7 +635,7 @@ s as? AnyObject
635635

636636
* `NSNumber()` does not cast to itself via `as?` in unoptimized builds
637637

638-
```
638+
```swift
639639
import Foundation
640640
let a = NSNumber()
641641
// true in 5.3 for optimized builds; false for unoptimized builds
@@ -644,7 +644,7 @@ print((a as? NSNumber) != nil)
644644

645645
* `Optional<NSNumber>` does not project
646646

647-
```
647+
```swift
648648
import Foundation
649649
let a: Optional<NSNumber> = NSNumber()
650650
// Swift 5.3: false
@@ -657,17 +657,17 @@ print(a as? NSNumber)
657657

658658
* Casting `NSNumber()` to `Any` crashes at runtime
659659

660-
```
660+
```swift
661661
import Foundation
662662
let a = NSNumber()
663663
// Swift 5.3: Runtime crash (both optimized and unoptimized builds)
664664
// Specification: Succeeds
665665
print(a is Any)
666666
```
667667

668-
* SR-2289: CF types cannot be cast to protocol existentials
668+
* [#44896](https://github.com/apple/swift/issues/44896): CF types cannot be cast to protocol existentials
669669

670-
```
670+
```swift
671671
import Foundation
672672
protocol P {}
673673
extension CFBitVector : P {
@@ -680,9 +680,9 @@ extension CFBitVector : P {
680680
print(CFBitVector.makeImmutable(from: [10,20]) is P)
681681
```
682682

683-
* SR-4552: Cannot cast `Optional<T> as Any` to protocol type. Note that this is a particular problem for reflection with weak fields, since `Mirror` reflects those as `Any` containing an `Optional` value.
683+
* [#47129](https://github.com/apple/swift/issues/47129): Cannot cast `Optional<T> as Any` to protocol type. Note that this is a particular problem for reflection with weak fields, since `Mirror` reflects those as `Any` containing an `Optional` value.
684684

685-
```
685+
```swift
686686
protocol P {}
687687
class C: P {}
688688
let c: C? = C()
@@ -692,9 +692,9 @@ let a = c as? Any
692692
print(a is P)
693693
```
694694

695-
* SR-8964: `Any` containing `Optional<Any>` cannot cast to `Error`
695+
* [#51469](https://github.com/apple/swift/issues/51469): `Any` containing `Optional<Any>` cannot cast to `Error`
696696

697-
```
697+
```swift
698698
struct MyError: Error { }
699699
let a: Any? = MyError()
700700
let b: Any = a
@@ -703,10 +703,10 @@ let b: Any = a
703703
print(b is Error)
704704
```
705705

706-
* SR-6126: Inconsistent results for nested optionals
706+
* [#48681](https://github.com/apple/swift/issues/48681): Inconsistent results for nested optionals
707707

708-
```
709-
// Note: SR-6126 includes many cases similar to the following
708+
```swift
709+
// Note: This issue includes many cases similar to the following
710710
let x: Int? = nil
711711
print(x as Int??) // ==> "Optional(nil)"
712712
// Swift 5.3: prints "nil"
@@ -716,23 +716,23 @@ print((x as? Int??)!)
716716

717717
* `Error.self` does not fully self-conform
718718

719-
```
719+
```swift
720720
// Swift 5.3: Prints "false"
721721
// Specification: prints "true"
722722
print(Error.self is Error.Type)
723723
```
724724

725725
* Objective-C protocol metatypes do not fully self-conform
726726

727-
```
727+
```swift
728728
import Foundation
729729
let a = NSObjectProtocol.self
730730
print(a is NSObjectProtocol.Type)
731731
```
732732

733-
* SR-1999: Cannot cast `Any` contents to a protocol type
733+
* [#44608](https://github.com/apple/swift/issues/44608): Cannot cast `Any` contents to a protocol type
734734

735-
```
735+
```swift
736736
protocol P {}
737737
class Foo: P {}
738738
let optionalFoo: Foo? = Foo()

docs/GenericsManifesto.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ There are a number of restrictions to the use of generics that fall out of the i
2727

2828
### Recursive protocol constraints (*)
2929

30-
*This feature has been accepted in [SE-0157](https://github.com/apple/swift-evolution/blob/main/proposals/0157-recursive-protocol-constraints.md) and is tracked by [SR-1445](https://bugs.swift.org/browse/SR-1445).*
30+
*This feature has been accepted in [SE-0157](https://github.com/apple/swift-evolution/blob/main/proposals/0157-recursive-protocol-constraints.md) and is tracked by [#44054](https://github.com/apple/swift/issues/44054).*
3131

3232
Currently, an associated type cannot be required to conform to its enclosing protocol (or any protocol that inherits that protocol). For example, in the standard library `SubSequence` type of a `Sequence` should itself be a `Sequence`:
3333

@@ -43,7 +43,7 @@ The compiler currently rejects this protocol, which is unfortunate: it effective
4343

4444
### Nested generics
4545

46-
*This feature was tracked by [SR-1446](https://bugs.swift.org/browse/SR-1446) and was released with Swift 3.1.*
46+
*This feature was tracked by [#44055](https://github.com/apple/swift/issues/44055) and was released with Swift 3.1.*
4747

4848
Currently, a generic type cannot be nested within another generic type, e.g.
4949

@@ -57,7 +57,7 @@ There isn't much to say about this: the compiler simply needs to be improved to
5757

5858
### Concrete same-type requirements
5959

60-
*This feature was tracked by [SR-1009](https://bugs.swift.org/browse/SR-1009) and was released with Swift 3.1.*
60+
*This feature was tracked by [#43621](https://github.com/apple/swift/issues/43621) and was released with Swift 3.1.*
6161

6262
Currently, a constrained extension cannot use a same-type constraint to make a type parameter equivalent to a concrete type. For example:
6363

@@ -114,7 +114,7 @@ Note: generic associatedtypes address many use cases also addressed by higher-ki
114114

115115
### Generic subscripts
116116

117-
*This feature has been accepted in [SE-0148](https://github.com/apple/swift-evolution/blob/main/proposals/0148-generic-subscripts.md), was tracked by [SR-115](https://bugs.swift.org/browse/SR-115) and was released with Swift 4.*
117+
*This feature has been accepted in [SE-0148](https://github.com/apple/swift-evolution/blob/main/proposals/0148-generic-subscripts.md), was tracked by [#42737](https://github.com/apple/swift/issues/42737) and was released with Swift 4.*
118118

119119
Subscripts could be allowed to have generic parameters. For example, we could introduce a generic subscript on a `Collection` that allows us to pull out the values at an arbitrary set of indices:
120120

docs/HowToGuides/GettingStarted.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ toolchain as a one-off, there are a couple of differences:
8585
**Note:** If you've already forked the project on GitHub at this stage,
8686
**do not clone your fork** to start off. We describe
8787
[how to setup your fork](#setting-up-your-fork) in a subsection below.
88-
<!-- Recommending against cloning the fork due to SR-13476 and SR-13505. -->
88+
<!-- Recommending against cloning the fork due to https://github.com/apple/swift/issues/55918 and https://github.com/apple/swift/issues/55947. -->
8989
3. Double-check that `swift`'s sibling directories are present.
9090
```sh
9191
ls ..

docs/Lexicon.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -574,11 +574,11 @@ for flow-sensitive diagnostics, optimization, and LLVM IR generation.
574574

575575
## SR
576576

577-
An issue reported on [bugs.swift.org](https://bugs.swift.org). A
578-
backronym for "Swift Report"; really the name is derived from LLVM's
579-
idiomatic use of "PR" ("Problem Report") for its bugs. We didn't go with
580-
"PR" for Swift because we wanted to be able to unambiguously reference
581-
LLVM bugs.
577+
An issue that was originally reported on the now-retired Jira instance that used
578+
to be located at [bugs.swift.org](https://bugs.swift.org). A backronym for
579+
"Swift Report"; really the name is derived from LLVM's idiomatic use of "PR"
580+
("Problem Report") for its bugs. We didn't go with "PR" for Swift because we
581+
wanted to be able to unambiguously reference LLVM bugs.
582582

583583
## stdlib
584584

0 commit comments

Comments
 (0)