Skip to content

Conversation

grynspan
Copy link
Contributor

@grynspan grynspan commented Jan 8, 2025

When using WASI without multithreading, or when using a platform to which Swift Testing has been incompletely ported, we don't know what type to use as a lock/mutex, so we use Void. However, turns out that produces a diagnostic:

warning: UnsafeMutablePointer has been replaced by UnsafeMutableRawPointer

So use Never instead. (Yes, this will produce a pointer to an uninitialized instance of Never. If this affects you, please read Porting.md!)

Checklist:

  • Code and documentation should follow the style of the Style Guide.
  • If public symbols are renamed or modified, DocC references should be updated.

When using WASI without multithreading, or when using a platform to which Swift
Testing has been incompletely ported, we don't know what type to use as a
lock/mutex, so we use `Void`. However, turns out that produces a diagnostic:

> warning: UnsafeMutablePointer<Void> has been replaced by UnsafeMutableRawPointer

So use `Never` instead. (Yes, this will produce a pointer to an uninitialized
instance of `Never`. If this affects you, please read Porting.md!)
@grynspan grynspan added bug 🪲 Something isn't working workaround Workaround for an issue in another component (may need to revert later) wasi/wasm 🧭 WebAssembly support labels Jan 8, 2025
@grynspan grynspan added this to the Swift 6.x milestone Jan 8, 2025
@grynspan grynspan self-assigned this Jan 8, 2025
@grynspan
Copy link
Contributor Author

grynspan commented Jan 8, 2025

@swift-ci test

@grynspan grynspan merged commit 6783a1a into main Jan 8, 2025
3 checks passed
@grynspan grynspan deleted the jgrynspan/locked-fallback-type-never branch January 8, 2025 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working wasi/wasm 🧭 WebAssembly support workaround Workaround for an issue in another component (may need to revert later)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants