This repository has been archived by the owner on Jan 4, 2020. It is now read-only.
[WIP]: Multi dependency package support & other proposed fixes/improvements #193
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is a WIP of fixes for issues in #189, #191 as well as some other things I'll mention in notes below.
The changes are primarily trying to address importing dependencies from a package that may not go by the same name as the package, or situations where there are multiple libraries from a package that you are trying to import. Along the way, I noticed some issues with the Master Package Description and the way it acts as a template for the
Package.swift
files used in every script. As a result, in this current WIP code, the MasterPackage.swift
is mostly unused and package update functionality is currently disabled.I was mostly working with MarathonCore directly, not via CLI, but problems with the Master Package Description pattern I saw were:
Package.swift
, which are then copied over into the scriptPackage.swift
files.Package.swift
will make the scripts depend on each other's librariesPackage.swift
files weren't consistent enough because they only used the major version. It could cause issues duringswift package update
as it tried to resolve the dependencies correctlyNotes:
Dependency
struct has been introduced that maintains the name of the specific library you want to include, not just the name of the package..package(path:"")
formatThis work is currently incomplete but I wanted to open a PR with my first shot at the problem as a proposal. Since it's a big change and there is lots of room for discussion.
Thanks for reading/reviewing!