I have a package with a macro (Pipeline), and its tests pass on macOS with Swift 6.2.1, but in Windows (ARM) also with Swift 6.2.1 I get the following errors:
macro expansion @Step:3:5: error: '#sourceLocation' cannot be an extended escaping string literal
...
macro expansion @Step:10:5: error: parameterless closing #sourceLocation() directive without prior opening #sourceLocation(file:,line:) directive
...
For both, swift-syntax is resolved to version 600.0.1.
I find it strange that those two results differ, and also what could be wrong?
The file path on Windows involves backslashes, I am guessing that this leads to the file path being written as #"..."# in the outer macro expansion which in turn leads to the described error. The compilation errors in the above package (you have to build including the tests: swift build --build-tests) are absent if I use the following code (with .fileID instead of .filePath):
...It. seems that with .fileID the relocation of errors does not work, .filePath seems to be needed?? I will try some code changes, but it might be that the described problem on Windows needs to be resolved...