Skip to content

feat: Conform to Sendable #69

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 36 additions & 36 deletions Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ let package = Package(
dependencies: [
.package(
url: "https://github.com/vapor/vapor.git",
.upToNextMajor(from: "4.92.1")
.upToNextMajor(from: "4.102.1")
),
.package(
url: "https://github.com/netreconlab/Parse-Swift.git",
.upToNextMajor(from: "5.8.2")
.upToNextMajor(from: "5.10.0")
)
],
targets: [
Expand Down
2 changes: 1 addition & 1 deletion Sources/App/entrypoint.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ enum Entrypoint {
var env = try Environment.detect()
try LoggingSystem.bootstrap(from: &env)

let app = Application(env)
let app = try await Application.make(env)

defer { app.shutdown() }

Expand Down
2 changes: 1 addition & 1 deletion Sources/ParseServerSwift/Parse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
try await checkServerHealth()
} catch {
await deleteHooks(app)
app.shutdown()
try await app.asyncShutdown()

Check warning on line 76 in Sources/ParseServerSwift/Parse.swift

View check run for this annotation

Codecov / codecov/patch

Sources/ParseServerSwift/Parse.swift#L76

Added line #L76 was not covered by tests
}
} else {
Parse.configuration = configuration
Expand Down
6 changes: 3 additions & 3 deletions Tests/ParseServerSwiftTests/AppTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -195,16 +195,16 @@ final class AppTests: XCTestCase {
from: encoded)

let options = hookRequest.options()
let installationOption = options.first(where: { $0 == .installationId("") })
let installationOption = options.first(where: { $0 == .installationId(installationId) })
XCTAssertEqual(options.count, 1)
XCTAssertTrue(installationOption.debugDescription.contains(installationId))

let uri = URI(stringLiteral: urlString)
let request = Request(application: app, url: uri, on: app.eventLoopGroup.any())
let options2 = try hookRequest.options(request,
parseServerURLStrings: configuration.parseServerURLStrings)
let installationOption2 = options2.first(where: { $0 == .installationId("") })
let serverURLOption = options2.first(where: { $0 == .serverURL("") })
let installationOption2 = options2.first(where: { $0 == .installationId(installationId) })
let serverURLOption = options2.first(where: { $0 == .serverURL(urlString) })
XCTAssertEqual(options2.count, 2)
XCTAssertTrue(installationOption2.debugDescription.contains(installationId))
XCTAssertTrue(serverURLOption.debugDescription.contains("\"\(urlString)\""))
Expand Down