Skip to content

Commit 2f54b42

Browse files
authored
Merge pull request #262 from ahoppen/6.0/swiftlang-migration
[6.0] Update links for repositories moved to the swiftlang org on GitHub
2 parents f43df24 + 9356704 commit 2f54b42

File tree

4 files changed

+12
-20
lines changed

4 files changed

+12
-20
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ $ ./swift/utils/build-script --test --skip-build-benchmark --skip-test-cmark --s
2525

2626
### For local development
2727

28-
For local development, you'll first need to download and install a recent [swift.org development snapshot](https://swift.org/download/#snapshots) toolchain that matches the latest commit on main in the [SwiftSyntax](https://github.com/apple/swift-syntax). This is because the Stress Tester depends on the latest version of SwiftSyntax and SwiftSyntax integrates into the latest version of the compiler.
28+
For local development, you'll first need to download and install a recent [swift.org development snapshot](https://swift.org/download/#snapshots) toolchain that matches the latest commit on main in the [SwiftSyntax](https://github.com/swiftlang/swift-syntax). This is because the Stress Tester depends on the latest version of SwiftSyntax and SwiftSyntax integrates into the latest version of the compiler.
2929

3030
The toolchain is installed into `/Library/Developer/Toolchains/` if installed for all users. Note that the `$TOOLCHAIN_DIR` variables below should include `/usr` at the end of their path, eg. `TOOLCHAIN_DIR=/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-<...>.xctoolchain/usr`.
3131

@@ -35,7 +35,7 @@ To generate an Xcode project that's set up correctly, run `build-script-helper.p
3535
```
3636
$ ./build-script-helper.py --package-dir SourceKitStressTester --toolchain $TOOLCHAIN_DIR generate-xcodeproj --no-local-deps
3737
```
38-
If you have the [SwiftSyntax](https://github.com/apple/swift-syntax) and [SwiftPM](https://github.com/apple/swift-package-manager) repositories already checked out next to the stress tester's repository, you can omit the `--no-local-deps` option to use the existing checkouts instead of fetching the dependencies using SwiftPM.
38+
If you have the [SwiftSyntax](https://github.com/swiftlang/swift-syntax) and [SwiftPM](https://github.com/swiftlang/swift-package-manager) repositories already checked out next to the stress tester's repository, you can omit the `--no-local-deps` option to use the existing checkouts instead of fetching the dependencies using SwiftPM.
3939

4040
This will generate `SourceKitStressTester/SourceKitStressTester.xcodeproj`. Open it and select the toolchain you installed from the Xcode > Toolchains menu, before building the `SourceKitStressTester-Package` scheme.
4141

@@ -45,7 +45,7 @@ To build, run `build-script-helper.py`, passing the path to the downloaded toolc
4545
```
4646
$ ./build-script-helper.py --package-dir SourceKitStressTester --toolchain $TOOLCHAIN_DIR
4747
```
48-
If you have the [SwiftSyntax](https://github.com/apple/swift-syntax) and [SwiftPM](https://github.com/apple/swift-package-manager) repositories already checked out next to the stress tester's repository, you can omit the `--no-local-deps` option to use the existing checkouts instead of fetching the dependencies using SwiftPM.
48+
If you have the [SwiftSyntax](https://github.com/swiftlang/swift-syntax) and [SwiftPM](https://github.com/swiftlang/swift-package-manager) repositories already checked out next to the stress tester's repository, you can omit the `--no-local-deps` option to use the existing checkouts instead of fetching the dependencies using SwiftPM.
4949

5050
To run the tests, repeat the above command, but additionally, pass the `test` action:
5151
```

SourceKitStressTester/Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ if !useLocalDependencies {
174174
.package(url: "https://github.com/apple/swift-argument-parser.git", .upToNextMinor(from: "1.0.1")),
175175
]
176176
if swiftSyntaxSearchPath == nil {
177-
package.dependencies.append(.package(url: "https://github.com/apple/swift-syntax.git", .branch("release/6.0")))
177+
package.dependencies.append(.package(url: "https://github.com/swiftlang/swift-syntax.git", .branch("release/6.0")))
178178
}
179179
} else {
180180
package.dependencies += [

SourceKitStressTester/Sources/StressTester/SourceKitDocument.swift

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -533,21 +533,7 @@ class SourceKitDocument {
533533
try throwIfInvalid(response, request: info)
534534
try validateResponse(response)
535535

536-
// Hack to make ACHNBrowserUI/extensions/Path.swift insideOut-893:884 a
537-
// soft timeout. It seems to vary *wildly* between runs. We should
538-
// investigate why that is, but just get the stress tester to stop
539-
// failing for now.
540-
var forceSoftTimeout = false
541-
if case let .codeCompleteOpen(document, offset, _) = info,
542-
offset == 884,
543-
let modification = document.modification,
544-
modification.mode == .insideOut,
545-
modification.content.count == 893,
546-
document.path.hasSuffix("ACHNBrowserUI/extensions/Path.swift") {
547-
forceSoftTimeout = true
548-
}
549-
550-
if forceSoftTimeout || requestDuration > TimeInterval(SOURCEKIT_REQUEST_TIMEOUT) / 10 {
536+
if requestDuration > TimeInterval(SOURCEKIT_REQUEST_TIMEOUT) / 10 {
551537
// There was no error in the response, but the request took too long
552538
// throw a soft timeout.
553539
throw SourceKitError.softTimeout(request: info, duration: requestDuration, instructions: nil)

SourceKitStressTester/Sources/StressTester/StressTester.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,13 @@ public class StressTester {
129129
if case SourceKitError.softTimeout(request: let request, duration: _, instructions: let .some(instructions)) = error {
130130
reportPerformanceMeasurement(request: request, instructions: instructions, reusingASTContext: nil)
131131
}
132-
errors.append(error)
132+
if case SourceKitError.timedOut = error {
133+
// Ignore timeout errors. In practice, we have always just added the timeouts to the XFails and keeping track
134+
// of these timeouts is the major cause of stress tester failures, producing noise.
135+
// We use instruction count measurements to keep track of performance.
136+
} else {
137+
errors.append(error)
138+
}
133139
}
134140
}
135141

0 commit comments

Comments
 (0)