i’m currently trying to help my swift mentorship program mentee make her first contribution to the SPM, and it is not going well because i myself am not able to build the package manager from source on main
; it appears something is broken in its TSC dependency:
/swift/swift-package-manager/Sources/Basics/FileSystem/FileSystem+Extensions.swift:23:13: error: enum 'FileSystemAttribute' does not exist in module 'TSCBasic'
import enum TSCBasic.FileSystemAttribute
^ ~~~~~~~~~~~~~~~~~~~
/swift/swift-package-manager/Sources/Basics/FileSystem/FileSystem+Extensions.swift:75:38: error: cannot find type 'FileSystemAttribute' in scope
public func hasAttribute(_ name: FileSystemAttribute, _ path: AbsolutePath) -> Bool {
^~~~~~~~~~~~~~~~~~~
/swift/swift-package-manager/Sources/Basics/FileSystem/FileSystem+Extensions.swift:206:62: error: cannot convert value of type 'TSCAbsolutePath' (aka 'AbsolutePath') to expected argument type 'AbsolutePath'
return try self.itemReplacementDirectories(for: path.underlying).compactMap { AbsolutePath($0) }
^
/swift/swift-package-manager/Sources/Basics/FileSystem/FileSystem+Extensions.swift:206:100: error: cannot convert value of type 'AbsolutePath' to expected argument type 'TSCAbsolutePath' (aka 'AbsolutePath')
return try self.itemReplacementDirectories(for: path.underlying).compactMap { AbsolutePath($0) }
^
/swift/swift-package-manager/Sources/Basics/FileSystem/FileSystem+Extensions.swift:561:53: error: value of type 'any WritableByteStream' has no member 'send'
try self.writeFileContents(path, body: { $0.send(bytes) })
~~ ^~~~
/swift/swift-package-manager/Sources/Basics/FileSystem/FileSystem+Extensions.swift:23:13: error: enum 'FileSystemAttribute' does not exist in module 'TSCBasic'
import enum TSCBasic.FileSystemAttribute
this smells like a wrong-resolved-dependency version problem, but unfortunately, the Package.resolved
pins have not been checked-in to that repository, so i have no straightforward way of constraining the build to only use compatible versions of swift-tools-support-core
.
any guidance on how to proceed would be appreciated!
3 posts - 2 participants