Introduction
This is a proposal to separate out (some) target's runtime into separate repos for better project integration.
For e.g.: The current way of importing the Swift Antlr4 runtime is not ideal because:
- It can only work with Xcode. (all of the configuration is Xcode dependent) so it does not work on non-darwin platforms.
- It does not work with Swift Package Manager (1st party support for Swift's dependency management), neither Carthage (3rd party package manager) which also requires a git repo or at least a remote space that stores the artifact (not ideal for Swift because of ABI stability).
Motivation
Although in 4.6 release we added SPM integration, but without a separate repo for swift target, the workflow is like this:
- clone/fork the antlr4 repository
- 'git init' in the swift runtime folder, and tag the runtime repository
- create a remote repository that should hold the swift runtime
- push to the remote repository just created
- add the remote repository as dependency in our projects SPM manifest file.
- run 'swift build' will then pull dependency from the repository
This workflow is awkward. Reference.
This change will end all the hassle in adding swift runtime to a project, and instead, make it as easy as adding the git repository to Package.swift:
let package = Package(
name: "ProjectUsingSwiftRuntime",
targets: [
Target(name: "ProjectUsingSwiftRuntime", dependencies: []),
],
dependencies: [
.Package(url: "https://github.com/antlr/antlr4-swift-runtime.git", majorVersion: x.x.x)
]
)
Introduction
This is a proposal to separate out (some) target's runtime into separate repos for better project integration.
For e.g.: The current way of importing the Swift Antlr4 runtime is not ideal because:
Motivation
Although in 4.6 release we added SPM integration, but without a separate repo for swift target, the workflow is like this:
This workflow is awkward. Reference.
This change will end all the hassle in adding swift runtime to a project, and instead, make it as easy as adding the git repository to Package.swift: