Closed tshortli closed 7 months ago
@swift-ci please test
@swift-ci please test Windows
Unless there are exceptional circumstances, please make changes on main
before/at the same time as landing them on swift/main
. Thanks!
Updating main
in #729.
Unless there are exceptional circumstances, please make changes on main before/at the same time as landing them on swift/main. Thanks!
Sorry, I think I'm just very confused about how this is supposed to work in this repo. It looked to me like main
was very out of date and therefore was abandoned or something but I must have been looking at the wrong thing.
A type conforming to
Error
must beSendable
, butDelimiterLexError
andCompilerLexError
carry source locations represented byUnsafeRawPointer
, which is inherently non-Sendable
. The compiler diagnoses the failure to meetSendable
requirements on these error types, which will prevent Swift 6 adoption in_RegexParser
and also generates build log spam every time the compiler and standard library are built. There are a couple ways to resolve this problem:Error
(the code using these errors would not requireSendable
if it were not forError
's inherentSendable
requirement).@unchecked Sendable
wrapper.Option 1 probably requires significant refactoring and option 2 seems undesirable since it means that the implementation must forgo the convenience of Swift's error handling model. Therefore this PR implements option 3 as the most expedient way to stop the diagnostic spam, leaving improvement on the status quo as a future exercise.
Also includes a drive-by fix for a trivial, unrelated warning.