Open hiragram opened 4 years ago
Would be good to see a proposal for how this carries over into the command line arguments as well
@yonaskolb Do you mean something like $ mint install xcodegen version:1.0.0
?
I generally agree that it will be much easier to maintain the new Mintfile approach. I just wanted to throw in some ideas.
The current approach by @hiragram looks like Ruby actual Ruby-Code. Which makes sense as both, CocoaPods and Carthage, rely on Ruby for their syntax.
Pros: No parsing, consistent Cons: whole new ecosystem (ruby dependency, bundler, ...) to depend on
As alternative approach to using Ruby, we could use actual Swift code: e.g. Mintfile.swift
.
Pros: Uses the main language for the task Cons: More complex to execute, flickery without IDE support
Edit: we could also use PackageConfig#custom-configuration-types for this task. Though its docs are a bit confusing.
We could use PackageConfig to store our CLI-dependencies into a Package.swift file.
#if canImport(PackageConfig)
import PackageConfig
let config = PackageConfiguration([
"mint": [
// the actual format might differ
"target": [
"github": "yonaskolb/mint",
"version": "1.0.0"
]
],
]).write()
#endif
Pros: No parsing, can be combined with other approaches (Dictionaries are JSON encodable), consistent with Rocket and Komondor Cons: External dependency, wouldn't make sense with custom-parsing Mintfile-format
We could just use YAML as format for the Mintfile:
target:
git: https://github.com/yonaskolb/mint
version: 1.0.0
Pros: works great with PackageConfig
(using YAMLDecoder and some JSONDecoder)
Cons: yikes, three dependencies?
Hi @vknabel , thank you. Yes, my concept is strongly inspired by Carthage. YAML seems nice, and @yonaskolb has much experience Swift+YAML in XcodeGen project.
Now I think that adding support for YAML-style definition is better than modifying structure of existing Mintfile. If @yonaskolb thinks it's good, I start implementing YAML support.
Hi @yonaskolb,
do you plan any solution to update the Mintfile
automatically including versioning? From my point Podfile
and Package
has good approaches to do this. Also other dependency managers has this option.
I'm big thumb-up for the YAML support. 🙆♂️ Maybe better to have a new issue for YAML support, as we don't intend to "re-design Mintfile" any more, right?
Actually, YAML support implementation is almost completed. I'm going to send a PR in several days.
Why is this ticket still open? It's been more than 2 years now and latest message was talking about an ongoing PR?
one year later, would really love to be able to depend on branches ! Anything that can be done to help this move forward?
I'd be happy with a YAML Mintfile. @hiragram do you have WIP you'd like to share?
would really love to be able to depend on branches !
@hakkurishian you can currently depend on branches using the same syntax org/package@my_branch
.
Hello.
I propose a new design of Mintfile, and want to hear opinions from other developers.
Overview
Currently supported Mintfile looks like:
And new Mintfile that I propose looks like:
Pros/Cons
Pros
Cons
Conclusion
I don't believe that my idea is the best way. If you have better one, please tell me and let's discuss.
Refs
background: https://github.com/yonaskolb/Mint/pull/150#issuecomment-600802465