I have to audit a swift project, but I'm not an Apple user. After some problems with the swift package for Ubuntu I compiled swift for debian 9 and it works.
As a Linux user I work under the assumption that Linux is the IDE, hence I use simple text editors to write software.
Now I want to write a simple main(), but include a project from github. Unfortunately I can not find any reference how to import github projects properly. afaik, xcode and similar systems automate that but that is not an option in my case.
So I would like to know, what to do exactly. Thanks
// swift-tools-version:5.2
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "xxxaudit",
dependencies: [
// Dependencies declare other packages that this package depends on.
.package(url: "https://github.com/xxx", from: "0.0.0"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
name: "xxxaudit",
dependencies: ),
.testTarget(
name: "xxxauditTests",
dependencies: ["xxxaudit"]),
]
)
The Github repo that you are adding as a dependency has to also be a Swift Package. Is it? e.g. Does it have a Package.swift file in its root? (not that that in itself makes a package, but if it is a package it will have a file like that at its root.)
I assume that the GitHub repo is in the Swift language?
Looking at the docs (linked below), it seems that Carthage is designed to be used with Xcode projects only, so that would limit them to working on macOS.