Error from opening Debugging Symbols Toolchain package?
Hi! I'm currently unable to install the swift-6.0-DEVELOPMENT-SNAPSHOT-2024-04-10-a-osx-symbols toolchain. This error appears: “swift-6.0-DEVELOPMENT-SNAPSHOT-2024-04-10-a-osx-symbols.pkg” can’t be...
View ArticleMissing compiler diagnostics with ~Copyable property wrapper in function...
I'm trying to implement a closure that can only be called one time. Doing that I met weird compiler behaviour, which I describe in the comments below. @propertyWrapper struct OnceCalledClosureWrapper:...
View ArticleTrouble Adding OpenAPIGenerator Plugin to Run Build Tool Plug-ins in Xcode...
I'm using SPM in my project and am trying to integrate Apple/swift-openapi-generator. My project is divided into several modules, for which I'm using SPM. To manage dependencies, I have a...
View ArticleSwift package manager dependencies
Hi, I have a PackageA that uses swift code and has a dependency on a PackageB that also uses swift code only. In the main hosting app, I would like to just import PackageA and use the classes of...
View ArticleCan't add SwiftPM testTarget to Xcode test plan
In my project, I've broken out some components into local SPM packages. In Xcode, I've added these packages and the project compiles as expected. The SPM's have unit tests in a .testTarget and when I...
View ArticleSwiftPM manual cache management?
i have a CI/CD system that consumes a lot of network bandwidth downloading git repositories from GitHub. this happens because the build system clears the SwiftPM cache (.swiftpm/cache/repositories)...
View ArticleIs there a way to know when value types are passed by reference at runtime?
Hi, This is a bit of an obscure question but I have some code GitHub - johnno1962/SwiftTrace: Trace Swift and Objective-C method invocations that allows you to intercept function calls for logging and...
View ArticleWhy does breaking up SwiftPM targets list cause typechecking to fall off a...
i have a package manifest with a lot (>100) targets that was basically impossible to navigate. so i wanted to break it up into collapsible sections like this: var a:[Target] { [ // targets ... ] }...
View ArticleSurfacing Isolation through tools
I was reading this blog post about a cute little algorithm to run in your head to trace where a symbol’s isolation is defined, and it got me thinking: why are we making developers responsible for...
View Article[RFC] Conditional Runtime Records Revamped
Hi all, I'd like to socialize a patch I have that re-implements -conditional-runtime-records in a way I believe brings the feature closer to being safe for general adoption. My goals with this...
View ArticleStrategies for passing an enum value as a macro parameter and reading during...
Hi! Does anyone have experience passing an arbitrary enum value as an argument to a macro and then making use of that enum value in the macro implementation? I have a hack that seems to work (for...
View ArticleExhaustive Switch Completion from SourceKit-LSP
Xcode has a nice completion for an exhaustive switch statement. I was wondering it this is implemented and available in sourcekit-lsp / sourcekit? enum Message { case a case b case c } func...
View ArticleExtensionMacro on a nested type does not generate extension at top level?
Hi! I'm seeing some unexpected behavior with using ExtensionMacro. According to SE-0402[1] we can expect that an ExtensionMacro applied to a nested type will generate an extension at top-level. I am...
View ArticleMissing warning or error when messing up initializer inheritance?
So I managed to instantiate an object of a subclass that had a property (in this case storing a closure) not initialized. At least I believe so, thus I would appreciate somebody taking a look at this...
View ArticleUbuntu 23.04: /usr/bin/ld.gold: error: cannot find -lcurses
I am trying to compile swift using: ./utils/build-script --release-debuginfo Any help is greatly appreciated. Thanks in advance! 2 posts - 1 participant Read full topic
View ArticleCan os_unfair_lock be used with C++ interop enabled?
When os_unfair_lock_lock() is called with C++ interop enabled, it crashes with "os_unfair_lock is corrupt". When C++ interop is disabled, it works fine. I realized OSAllocatedUnfairLock exists, but...
View ArticleDebug Swift Build fails
No matter what I try, this comand always fails with: FAILED: SwiftCompilerSources/Basic.o...
View ArticleInvalid XCFramweork when generated with BUILD_LIBRARY_FOR_DISTRIBUTION=YES
Hi all, I'm attempting to generate an XCFramework that must maintain ABI stability. The framework is created from an SPM using the following script: #!/bin/bash set -x set -e # Pass scheme name as the...
View ArticleSwift dependencies in private Github repos
How do I add dependencies to a Swift Package, if those dependencies are in private repos? This works in the Package file, but exposes my personal access token if I commit it:...
View ArticleSwift Macro Member Named Symbols Interfering with Compiler Protocol...
Hi! I'm seeing some unexpected behavior when adding named symbols to a member macro declaration. The name seems to be interfering with some Swift Protocol Conformance (Equatable) in an unexpected way....
View ArticleBuildToolPlugin 'Multiple commands produce ...' error when embedding wachOS...
I'm an author of a tool called xcstrings-tool that offers a BuildToolPlugin to generate Swift source code for accessing localized strings that are declared in an Xcode Strings Catalog. While BuildTool...
View ArticleLinker warnings on Windows with Swift Argument Parser
I'm trying to understand a number of linker warnings that I'm getting on Windows, but not on macOS, when I build a command line utility using the Swift Package Manager. The utility depends on the...
View ArticleSwift/C++ interoperability: SWIFT_PRIVATE_ATTR compilation error on Ubuntu
Hi There I'm trying to tame Swift and C++ interoperability with CMake. On macOS, everything works fine, but I have an issue on Ubuntu: [3/4] /usr/bin/clang++-15...
View ArticleImproving Swift support and interoperability experience for Android
Hey everyone, Over the past several weeks @compnerd and I have been working on improving Swift support for Android. We now can build Android standard library on Windows (Linux still works as well!),...
View ArticleEnabling .enableExperimentalFeature("BodyMacros") doesn't work
Hey there, I am trying to enable BodyMacros experimental feature but BodyMacros still cannot be found. I am on the swift-6.0-DEVELOPMENT-SNAPSHOT-2024-04-20-a and the corresponding branch for...
View Article
More Pages to Explore .....