emaloney / CleanroomLogger

CleanroomLogger provides an extensible Swift-based logging API that is simple, lightweight and performant
MIT License
1.32k stars 153 forks source link

Install fails when using package manager #83

Closed fappelman closed 7 years ago

fappelman commented 7 years ago

I tried to install the CleanroomLogger using Swift Package Manager (SPM). The actual error is coming from CleanroomASL but I could not find a repository for this sub package where I could bring this up.

I got the following error:

swift build --build-path "./.build-macos" -Xlinker "
Fetching https://github.com/emaloney/CleanroomLogger
Fetching https://github.com/emaloney/CleanroomASL
Fetching https://github.com/emaloney/AppleSystemLogSwiftPackage
Cloning https://github.com/emaloney/CleanroomASL
Resolving https://github.com/emaloney/CleanroomASL at 1.5.2
Cloning https://github.com/emaloney/CleanroomLogger
Resolving https://github.com/emaloney/CleanroomLogger at 1.6.0
Cloning https://github.com/emaloney/AppleSystemLogSwiftPackage
Resolving https://github.com/emaloney/AppleSystemLogSwiftPackage at 1.0.1
error: the package has an unsupported layout, unexpected source file(s) found: .build-macos/checkouts/CleanroomASL--8725892078062580422/Tests/CleanroomASLTests.swift
fix: move the file(s) inside a module

It seems like CleanroomASL has test cases in the wrong place according to SPM.

The dependency in Package.swift was as follows:

.Package(url: "https://github.com/emaloney/CleanroomLogger", majorVersion: 1)

Thanks.

 Fred
emaloney commented 7 years ago

Hi Fred,

Sorry for the trouble. CleanroomASL has not been used (or supported) for a while. I believe the issue is simply that you're referencing an older version. Could you please try specifying majorVersion: 5 instead?

Hope this helps, E.

fappelman commented 7 years ago

That works. Thanks. Can I suggest you add a small section to the README about SPM? That would help for others.