core
core copied to clipboard
🌎 Utility package containing tools for byte manipulation, Codable, OS APIs, and debugging.
similar with recent fix in #206
References: https://github.com/vapor/vapor/issues/1804 The `stackTrace` was optional and was unreachable by trying cast `error: Error` to `Debuggable`, it was always returning nil.
at least the following tests experience thread unsafety: - `AsyncTests.AsyncTests testSyncFlatten` - `CoreTests.CoreTests testProcessAsyncExecute` - `CoreTests.CoreTests testProcessExecute` - ... ``` $ swift test --sanitize=thread [146/146] Linking CorePackageTests Test Suite 'All...
I have a table with over 100 columns. Using migrations `addProperties(to: builder)` has no issues, but when specifying each column using `builder.field(for: \.myColumn)`, then bad things happen. Memory usage climbs...
I am not sure if this is a linux, swift, or core issue. Core/Process+Execute.swift:163:17: warning: 'launchPath' is deprecated: renamed to 'executableURL' Core/Process+Execute.swift:167:17: warning: 'launch()' is deprecated: renamed to 'run' Do...
I think when the context is active, it should return the `reflected.1`. However currently it returns `reflected.0`. ``` func decode(_ type: T.Type, forKey key: K) throws -> T where T...
At the moment we are implementing `flatten ourself in https://github.com/vapor/core/blob/3b72f2cc3fb21d505fbe97215418951a8e4a2871/Sources/Async/Future%2BFlatten.swift#L42. We could investigate whether we could replace that with an almost-trivial call to https://github.com/apple/swift-nio/blob/82a6e4d8215660005127547106aa8cf10817cb78/Sources/NIO/EventLoopFuture.swift#L915.
Currently, `Future.flatMap` is implemented like this: https://github.com/vapor/core/blob/fda3ebda8046af7c9a886fa4a5cfd886111ac23e/Sources/Async/Future%2BMap.swift#L45 Would it be possible to call through to SwiftNIO's implementation of `Future.then` instead? https://github.com/apple/swift-nio/blob/6f3671de4ed1350b86762e0da317075f69983f7d/Sources/NIO/EventLoopFuture.swift#L437 Let me know if I'm missing something.
`Process.asyncExecute` contains this code: https://github.com/vapor/core/blob/96ce86ebf9198328795c4b9cb711489460be083c/Sources/Core/Process%2BExecute.swift#L99-L117 In particular, there's an unsynchronised, shared variable `running` that's read and written to from multiple threads. That is undefined behaviour which might amongst random crashes,...