Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.4.2 version does not build in Swift 5 mode #250

Closed
balazserdeszlogmein opened this issue Nov 26, 2024 · 2 comments
Closed

2.4.2 version does not build in Swift 5 mode #250

balazserdeszlogmein opened this issue Nov 26, 2024 · 2 comments

Comments

@balazserdeszlogmein
Copy link

Hi, I added the package to a very basic project, created with Xcode 15.4, supporting macOS 13.0 or later. Zero references have been added to Factory in the project, and still, 2.4.2 release build fails:

Screenshot 2024-11-26 at 4 23 51 PM

Factory/Factory/Containers.swift:

/// Defines the default factory helpers for containers
extension ManagedContainer {
    /// Syntactic sugar allows container to create a properly bound Factory.
    @inlinable @inline(__always) public func callAsFunction<T>(
        key: StaticString = #function,
        _ factory: @escaping @Sendable @isolated(any) () -> T // error here: Attribute can only be applied to declarations, not types
    ) -> Factory<T> {
        Factory(self, key: key, factory)
    }

    [...]
}

I thought Factory supported Swift 5, based on its Package.swift. 2.4.1 builds without any issue.

@hmlongco
Copy link
Owner

See 2.4.3

@balazserdeszlogmein
Copy link
Author

Thank you, the build is now successful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants