I’ve recently added a trait “ConfigurationSupport” to the server framework package Hummingbird. This trait is also setup to be a default trait. I am now finding that for projects dependent on Hummingbird, the first time they update to the latest version of the package they get the following error
error: Traits [ConfigurationSupport] have been enabled on package 'hummingbird' (hummingbird) that declares no traits.
It appears it correctly ascertains the default traits, but when it tries to enable them it can’t find them.
I don’t know if this relevant, at the same time as adding the trait I also added version specific Package.swift files. The trait enabled code on the new swift-configuration package that requires swift 6.2 and the 6.0 and 6.1 Package.swift files don’t include it.
I don’t know if the error is caused by something I’ve done, or if it is an issue in SwiftPM. I’ve tried to narrow this down but can’t replicate with a simpler example.
You can replicate it using the following
swift clone https://github.com/herzi/hummingbird-update-failure
cd hummingbird-update-failure
swift package resolve
swift package update