-
Notifications
You must be signed in to change notification settings - Fork 117
Open
Labels
bug🪲 Something isn't working🪲 Something isn't workingbuild🧱 Affects the project's build configuration or process🧱 Affects the project's build configuration or processwindows🪟 Windows support🪟 Windows support
Description
Description
When building swift-testing, we fail to load the TestingMacros.dll
S:\SourceCache\swift-project\swift-testing\Sources\Testing\Expectations\Expectation+Macro.swift:239:40: warning: external macro implementation type 'TestingMacros.RequireThrowsMacro' could not be found for macro 'require(throws:_:sourceLocation:performing:)'; failed to load library plugin 'S:\b\x86_64-unknown-windows-msvc\TestingMacros\TestingMacros.dll' in plugin server 'S:\b\5\bin\SwiftInProcPluginServer.dll'; loader error: 127
237 | /// this macro. The test will then fail if an error is thrown.
238 | @discardableResult
239 | @freestanding(expression) public macro require<E, R>(
| `- warning: external macro implementation type 'TestingMacros.RequireThrowsMacro' could not be found for macro 'require(throws:_:sourceLocation:performing:)'; failed to load library plugin 'S:\b\x86_64-unknown-windows-msvc\TestingMacros\TestingMacros.dll' in plugin server 'S:\b\5\bin\SwiftInProcPluginServer.dll'; loader error: 127
240 | throws errorType: E.Type,
241 | _ comment: @autoclosure () -> Comment? = nil,
Reproduction
Build swift-testing as part of the toolchain build
Expected behavior
For the macros to be loaded
Environment
Swift version 6.2-dev (LLVM 78f6e5fce7642cb, Swift 270ffa6855ecd96)
Target: x86_64-unknown-windows-msvc
Additional information
No response
Metadata
Metadata
Assignees
Labels
bug🪲 Something isn't working🪲 Something isn't workingbuild🧱 Affects the project's build configuration or process🧱 Affects the project's build configuration or processwindows🪟 Windows support🪟 Windows support
Type
Projects
Status
TODO
Milestone
Relationships
Development
Select code repository
Activity
grynspan commentedon Jun 4, 2025
This is, as we understand it, expected (and also not specific to Windows.) Nothing in the toolchain needs access to our macros while the toolchain is building.
stmontgomery commentedon Jun 5, 2025
It's true the macro plugin is not needed at this point during the toolchain build, but it does help if it is present because then, the module which declares the macros which the plugin implements (in our case, the
Testing
module) can validate that the macro implementation types it expects and references in each macro decl are in fact present in the plugin. That's what those warnings are about, it would like to attempt to perform that validation but can't. I agree this would be a useful thing to fix, even though it's not "needed", strictly speaking.