Skip to content

Commit 0555f65

Browse files
committed
2 parents c6dd19c + eef5670 commit 0555f65

File tree

253 files changed

+14736
-14696
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

253 files changed

+14736
-14696
lines changed
54.5 KB
Loading
182 KB
Loading

LOCAL_DEVELOPMENT_SETUP.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@ Close the scheme editor and run the application by selecting "Run" from the Xcod
3838
[ NOTICE ] Server starting on http://127.0.0.1:8080 [component: server]
3939
```
4040

41+
When Xcode opens the `Package.swift` file, it will auto-create a test plan based on all tests in the project. This works for most cases, but we need to tell Xcode to run our tests sequentially, not in parallel. The first thing to do is to persist the autocreated test plan. From the Product menu, select "Test Plan" then "Manage Test Plans...", then click the small arrow button:
42+
43+
![A screenshot of Xcode's scheme editor showing a small arrow next to 'SPI-Server-Package (Autocreated)'.](.readme-images/manage-test-plans.png)
44+
45+
Once you open the autocreated test plan, you will be asked if you would like to persist the test plan. Click "Save" and accept the default location in the `.swiftpm` directory. Then, for each item in the test plan, click the "Options" and select "Disabled" for the "Paralellization" setting.
46+
47+
![A screenshot of Xcode's test plan editor showing the parallelization options.](.readme-images/test-plan-options.png)
48+
4149
When working locally, it's helpful to have a database with pre-populated data from the live system. [Talk to us on Discord](https://discord.gg/vQRb6KkYRw), and we'll supply you with a recent database dump that you can load with `./scripts/load-db.sh`.
4250

4351
### Setup the Front End
@@ -310,4 +318,4 @@ psql 'postgres://[email protected]:5432/spi_test' -c 'select count(*
310318
psql 'postgres://[email protected]:6432/spi_dev' -c 'select count(*) from packages;'
311319
```
312320

313-
##
321+
##

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ run:
3535

3636
test: xcbeautify
3737
set -o pipefail \
38-
&& swift test --disable-automatic-resolution --sanitize=thread \
38+
&& swift test --disable-automatic-resolution --sanitize=thread --no-parallel \
3939
2>&1 | ./xcbeautify --renderer github-actions
4040

4141
test-query-performance: xcbeautify
@@ -55,7 +55,7 @@ test-fast:
5555
xcbeautify:
5656
rm -rf .build/checkouts/xcbeautify
5757
git clone https://github.com/cpisciotta/xcbeautify.git .build/checkouts/xcbeautify
58-
cd .build/checkouts/xcbeautify && git checkout 2.6.0 && make build
58+
cd .build/checkouts/xcbeautify && git checkout 2.25.1 && make build
5959
binpath=`cd .build/checkouts/xcbeautify && swift build -c release --show-bin-path` && ln -sf $$binpath/xcbeautify
6060

6161
docker-build: version

Package.resolved

Lines changed: 20 additions & 38 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,8 @@ let package = Package(
3636
.package(url: "https://github.com/SwiftPackageIndex/SemanticVersion.git", from: "0.3.0"),
3737
.package(url: "https://github.com/SwiftPackageIndex/ShellOut.git", from: "3.1.4"),
3838
.package(url: "https://github.com/swiftlang/swift-package-manager.git", branch: "release/5.10"),
39-
.package(url: "https://github.com/dankinsoid/VaporToOpenAPI.git", from: "4.4.4"),
4039
.package(url: "https://github.com/pointfreeco/swift-custom-dump.git", from: "1.0.0"),
41-
.package(url: "https://github.com/pointfreeco/swift-dependencies", from: "1.5.2"),
40+
.package(url: "https://github.com/pointfreeco/swift-dependencies", from: "1.8.0"),
4241
.package(url: "https://github.com/pointfreeco/swift-parsing.git", from: "0.12.0"),
4342
.package(url: "https://github.com/pointfreeco/swift-snapshot-testing.git", from: "1.11.1"),
4443
.package(url: "https://github.com/scinfu/SwiftSoup.git", from: "2.3.2"),
@@ -75,7 +74,6 @@ let package = Package(
7574
.product(name: "SwiftPMDataModel-auto", package: "swift-package-manager"),
7675
.product(name: "SwiftPMPackageCollections", package: "swift-package-manager"),
7776
.product(name: "Vapor", package: "vapor"),
78-
.product(name: "VaporToOpenAPI", package: "VaporToOpenAPI"),
7977
.product(name: "SotoCognitoAuthentication", package: "soto-cognito-authentication")
8078
],
8179
swiftSettings: swiftSettings,
@@ -94,6 +92,7 @@ let package = Package(
9492
swiftSettings: swiftSettings),
9593
.testTarget(name: "AppTests",
9694
dependencies: [
95+
.product(name: "DependenciesTestSupport", package: "swift-dependencies"),
9796
.product(name: "SnapshotTesting", package: "swift-snapshot-testing"),
9897
.product(name: "InlineSnapshotTesting", package: "swift-snapshot-testing"),
9998
.product(name: "XCTVapor", package: "vapor"),

Public/robots.txt

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,4 @@
11
Sitemap: https://swiftpackageindex.com/sitemap.xml
22

3-
User-agent: Bytespider
4-
Disallow: /
5-
6-
User-agent: GPTBot
7-
Disallow: /
8-
9-
User-agent: ClaudeBot
10-
Disallow: /
11-
12-
User-agent: anthropic-ai
13-
Disallow: /
14-
15-
User-agent: Applebot
16-
Disallow: /
17-
18-
User-agent: Google-Extended
19-
Disallow: /
20-
21-
User-agent: Cohere-ai
22-
Disallow: /
23-
24-
User-agent: Seekr
25-
Disallow: /
3+
User-agent: *
4+
Disallow: /api/

Sources/App/Commands/Alerting.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ private extension TimeAmount {
306306

307307
private extension TimeInterval {
308308
func rounded(decimalPlaces: Int) -> Self {
309-
let scale = (pow(10, decimalPlaces) as NSDecimalNumber).doubleValue
309+
let scale = Double.pow(10, decimalPlaces)
310310
return (self * scale).rounded(.toNearestOrAwayFromZero) / scale
311311
}
312312
}

Sources/App/Commands/Analyze.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ extension Analyze {
180180
// 2024-10-05 sas: We need to explicitly weave dependencies into the `transaction` closure, because escaping closures strip them.
181181
// https://github.com/pointfreeco/swift-dependencies/discussions/283#discussioncomment-10846172
182182
// This might not be needed in Vapor 5 / FluentKit 2
183-
// TODO: verify this is still needed once we upgrade to Vapor 5 / FluentKit 2
183+
// TODO: verify if this is still needed once we upgrade to Vapor 5 / FluentKit 2
184184
try await withEscapedDependencies { dependencies in
185185
try await database.transaction { tx in
186186
try await dependencies.yield {

0 commit comments

Comments
 (0)