Skip to content

Tags: vapor/vapor

Tags

4.114.1

Toggle 4.114.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Correct SessionData's Codable conformance (#3317)

4.114.0

Toggle 4.114.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Added a cache policy for file middleware (#3314)

4.113.2

Toggle 4.113.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fix warning in service fix (#3303)

4.113.1

Toggle 4.113.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Prevent stack overflow by using `NIOLock` instead of `NIOLockedValueB…

…ox` during service initialization (#3302)

* Prevent stack overflow by using `NIOLock` instead of `NIOLockedValueBox` during service initialization

At first glance, one could think that using a `NIOLockedValueBox<(@sendable (Application) -> ServiceType)?>` for `makeService` would be sufficient here. However, for some reason, calling `self.storage.makeService.withLockedValue({ $0 })` repeatedly in `Service.service` causes each subsequent call to the function stored inside the locked value to perform one (or several) more "trampoline" function calls, slowing down the execution and eventually leading to a stack overflow. This is why we use a `NIOLock` here instead; it seems to avoid the `{ $0 }` issue above despite still accessing `_makeService` from within a closure (`{ self._makeService }`).

- Replace `NIOLockedValueBox` with `NIOLock` to avoid adding trampoline function calls
- Add detailed comment explaining the rationale behind the locking mechanism change
- Simplify service initialization with direct fatalError instead of optional handling
- Remove redundant nil checks in service getter

* Add tests.

4.113.0

Toggle 4.113.0's commit message

Partially verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
Fix warnings from NIO 2.79.0 (#3285)

* Start migrating to NIOFileSystem and deprecating old APIs

* Fix all the FileSystem deprecations

* Don't run tracing tests on port 8080

* Match existing write behaviour

* Fix warnings in HTTPServer

* Fix more warnings

* Fix warnings in client tests

* Fix test

* Reduce test time

* Remove auth test warnings

* Fix a bunch more warnings in tests

* Fix a bunch more test warnings

* Migrate environment tests

* More test warnings

* Remove final warnings

* Fix subtle little upgrade bug

* Pull in new NIO release

* Fix tracing test

* Apply suggestions from code review

Co-authored-by: Gwynne Raskind <[email protected]>

* PR reviews

* Remove dodgy test

* PR feedback and migrate client tests to Swift Testing

---------

Co-authored-by: Gwynne Raskind <[email protected]>

4.112.2

Toggle 4.112.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Android support (#3282)

Co-authored-by: Tim Condon <[email protected]>

4.112.1

Toggle 4.112.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Use singleton NIOThreadPool by default (#3298)

* Use singleton NIOThreadPool by default

* Also catch the unsupported operation error when configuring a thread pool

* Add link to the source of the error we're ignoring

4.112.0

Toggle 4.112.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Adds Support for Tracing Header Extraction (#3280)

* feat: Adds callback for custom span attributes

* test: Fixes tracing test async warnings

* feat: Adds header extraction support to tracing

* fix: Split initializer to avoid API breakage

---------

Co-authored-by: Tim Condon <[email protected]>

4.111.1

Toggle 4.111.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
do not truncate response when streaming on error (#3283)

do not truncate response on error

4.111.0

Toggle 4.111.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Validation API | `Custom` Validator (#3263)

* feat(Validation): added custom validation validator

* style(ValidationTests): fixed indentation

* test(ValidationTests): added additional test cases

Goal is to have higher test coverage for https://app.codecov.io/gh/vapor/vapor/pull/3263/blob/Sources/Vapor/Validation/Validators/Custom.swift

* feat(ValidationTests,Custom): added tests and code changes to use "not" operator

* fix(ValidationTests.swift): reset to changes before custom validator tests were added

* feat(ValidationTests): added custom validation tests back

* docs(ValidationTests): added comments to improve readability, better naming

* fix(ValidationTests): simplified tests to only test custom validator functionality

* fix(ValidationTests): fixed dumb mistakes

---------

Co-authored-by: Tim Condon <[email protected]>