Closed kattouf closed 1 month ago
@pepicrft Could you also check Requires attention
section in PR description? None of this seems like a blocker to you right now?
We have already partially discussed points 3 and 4, so you can focus on 1, 2 and 3.ii
- Missed swift dependency
I'd be consistent with what the other backends do. If they install the required toolchain absent, we can error out telling users that "Swift was not found in the environment" until we install it ourselves. This is a scarce scenario because most developers using this backend will likely be Xcode developers with the toolchain available in their systems.
- Support for build artifacts on other platforms
I'm in a similar spot here. At least on Linux, if everything is statically linked, the binary should work, so the issues will likely arise when using dynamic dependencies, which I'm not entirely sure are supported on Linux. Similarly, this is a bit uncommon, so I'd ship this as it is and iterate on it as feedback comes our way.
- When we use different formats for the same package repo, they are perceived as different packages
This is a bit confusing, especially considering that they are referring to the same package. @jdx might be able to help with this one.
I'd be consistent with what the other backends do.
Currently mise
doesn't automatically install backend dependencies, instead the documentation suggests installing them using mise
or any other convenient method and gives an error message:
It seems that the backend is a feature that expects that it will be used by those people who already have the entire necessary tools, they just want to describe them in a single config
Similarly, this is a bit uncommon, so I'd ship this as it is and iterate on it as feedback comes our way.
Agree 🤝
Overall, fantastic work @kattouf 👏🏼. As one of the advocates of Mise in the Swift ecosystem, I couldn't be more excited of this work landing. We have to wait for @jdx to do the merge.
Implementation of backend for install executables managed by Swift Package Manager
Description
Discussion Compared to previous PR there are no dependencies on third parties other than Swift itself.
SPM does not support installing an executable, only the build command. This backend implementation itself covers this functionality and is described by a flow:
Package.swift
for a list of executablesmise
install directoryDemo screenshots:
P.S. I'm not full-time Rust developer, feel free to make comments if something is not done according to best practices in Rust community
Requires attention
swift
dependency I had some problems installingswift
with the current asdf plugin so I guess we'll just have to wait for https://github.com/jdx/mise/pull/1708 Now missed dependency leads to:swift
on other platforms (Linux, Windows) and can't be sure about finite list of resource and dynamic libraries formats we should support to copy together with binary. I decide dive into it after we are sure that everyone is happy with the feature and we will discuss merging it.spm:nicklockwood/SwiftFormat@0.53.10
spm:https://github.com/nicklockwood/SwiftFormat.git@0.53.10
Maybe we should add other options by community requestsI got some errors when trying to change the BackendArg name to generic format (shortened) in
SPMBackend::new(name)
Are there any other options to solve this problem?