Open dabrahams opened 1 year ago
@compnerd any ideas here? All of the errors listed here seem wrong
The warnings about @_implementationOnly
are correct and that should be removed in favor of import acls
@rauhul hmm, I think that the @_implementationOnly import
are predating the import
ACLs - the intent is to avoid leaking the imports into the clients, and as long as that is done, I don't see a problem in changing them.
The fatal error is related to the missing -parse-as-library
due to the use of @main
which is a long standing issue.
Correct the use of implementation only was to avoid leaking api, but it also can produce complete broken code for non resilient libraries.
The fatal error is related to the missing -parse-as-library due to the use of @main which is a long standing issue.
Is this a windows specific thing?
The fatal error is related to the missing -parse-as-library due to the use of @main which is a long standing issue.
Is this a windows specific thing?
No, this is a general Swift issue. https://github.com/apple/swift/issues/56843 was the original bit of discussion around this, and there has always been a requirement to pass -parse-as-library
for the use of @main
.
@compnerd I'm a bit confused. @main seems to work on Mac (and Linux IIRC) without that flag. Is this due to Windows having a stricter symbol linking model? If it's going to be a general requirement we should diagnose failures to pass the flag (on all platforms) rather than trapping in the compiler, right?
@dabrahams no this behavior is not windows specific. The issue is reported by the frontend if you note. This really should be diagnosed on all platforms.
Replace this paragraph with a short description of the incorrect incorrect behavior. If this is a regression, please note the last version that the behavior was correct in addition to your current version.
ArgumentParser version: the
main
branch Swift version: Swift version 5.9-dev (LLVM ad32770d6738638, Swift 753d54576e043ca) Target: aarch64-unknown-windows-msvcChecklist
main
branch of this packageSteps to Reproduce
Check it out on Windows. "swift test"
Expected behavior
All tests pass.
Actual behavior