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

Errors after installing via Mint (SwiftPM) #14

Closed
Jeehut opened this issue Apr 30, 2019 · 5 comments
Closed

Errors after installing via Mint (SwiftPM) #14

Jeehut opened this issue Apr 30, 2019 · 5 comments

Comments

@Jeehut
Copy link
Contributor

Jeehut commented Apr 30, 2019

I just installed SwiftInfo via Mint (by running mint install rockbruno/SwiftInfo swiftinfo) and installation succeeded. But when I now try to run swiftinfo, I just get this error:

* SwiftInfo
<unknown>:0: error: module map file '/usr/local/bin/Csourcekitd/include/module.modulemap' not found
<unknown>:0: error: module map file '/usr/local/bin/Csourcekitd/include/module.modulemap' not found
<unknown>:0: error: missing required module 'SwiftShims'

Here's my Infofile.swift contents:

import SwiftInfoCore

FileUtils.buildLogFilePath = "./build/build_log/App-Development.log"
FileUtils.testLogFilePath = "./build/tests_log/App-Development.log"

let projectInfo = ProjectInfo(xcodeproj: "NewProjectTemplate.xcodeproj", target: "App", configuration: "Development")
let api = SwiftInfo(projectInfo: projectInfo)

let output = [
    api.extract(IPASizeProvider.self),
    api.extract(WarningCountProvider.self),
    api.extract(TestCountProvider.self),
    api.extract(TargetCountProvider.self),
    api.extract(CodeCoverageProvider.self),
    api.extract(LinesOfCodeProvider.self)
].joined()

// Save the output to disk.
api.save(output: output)

I'm running swiftinfo on macOS 10.14.4 with Swift 5.0.1 & Xcode 10.2.1.

@Jeehut Jeehut changed the title Ins Errors after installing via Mint Apr 30, 2019
@Jeehut Jeehut changed the title Errors after installing via Mint Errors after installing via Mint (SwiftPM) Apr 30, 2019
@rockbruno
Copy link
Owner

SwiftPM isn't supported. This is because I need to provide additional files for SourceKit which SwiftPM can't do natively.

@Jeehut
Copy link
Contributor Author

Jeehut commented Apr 30, 2019

Thanks for the clarification. Sad though, that installtion via SwiftPM isn't supported. But maybe we can add a Makefile and support installation via Homebrew instead? I've just opened an issue for that: #17

@rockbruno
Copy link
Owner

I can support SwiftPM if I get rid of SourceKit. I currently don't do anything with it but it could be useful in the future 😢 It's just that SwiftPM doesn't let me ship additional files with the binary, that's the only reason.

@Jeehut
Copy link
Contributor Author

Jeehut commented Apr 30, 2019

What files do you need to ship with the binary? Maybe there's some kind of workaround?

@rockbruno
Copy link
Owner

The tool manually runs swiftc to be able to read the Infofile, and because I support SourceKit (a C library) I need to link a modulemap file. I can't make SwiftPM copy this, so I ship it as a .zip with CocoaPods.

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