-
Notifications
You must be signed in to change notification settings - Fork 258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Required version in Trunk.toml
?
#641
Comments
At the same time we do this, I think we also inform users to upgrade versions consistently. "Hey, looks like you're on Trunk 0.17.2 - The current version is 0.17.4. To upgrade, please type |
IMO the ideal way would be if Cargo had support for custom tasks[1], and Trunk were a dependency like everything else. Then Trunk could just live in the Cargo.toml file, add a bunch of commands and it'd work as expected. [1] custom tasks like https://github.com/sagiegurari/cargo-make or https://github.com/matklad/cargo-xtask or maybe https://rust-lang.github.io/rfcs/3424-cargo-script.html |
@stefnotch True, but I think extending |
@ctron Yeah, it's probably quite a lot of effort at the moment. It might become easier in the future as cargo develops. I personally am worried about how one would best manage multiple trunk versions on one machine. If I have two projects that depend on Trunk, but one of them still depends on an older, incompatible version of Trunk, how do I best deal with that? Hence my wish for
Hopefully that explanation and the reasoning makes sense? |
Makes total sense, and good to know about that use case. I am worried about the case where be come up with breaking changes, and that results in "doesn't work" kind of errors ports, just because the version doesn't match. I think a good first step would be to make the user aware of that situation. And that could be achieved by requiring a specific version of trunk, in one form or another. |
Another variant that'd be amazing would be rust-lang/cargo#2267 |
Absolutely. To but my understanding, that is not available today. And requires some work in cargo first. |
Released with trunk 0.19.0. |
@ctron There is actually one way of doing custom cargo commands at the moment. It's a lot more verbose than one would like, but I figured that it'd be interesting nonetheless. Especially since it avoids versioning issues by making Trunk a proper dependency. |
I guess that could be achieved by making Trunk a lib too (which might be great addition anyway) and then having a simple (or similar): fn main() {
Trunk::run("./Trunk.toml");
} And that would work with |
@ctron I figured you might find this interesting leptos-rs/cargo-leptos#399 (comment) If that's interesting enough, I can open a new issue to properly track this. |
@stefnotch I can't really follow what the ask is. In general, everything that you think makes trunk better is worth an issue. |
I was considering a way to ensure that a trunk version actually supports the configuration options of a project.
An easy approach to this could be to have a
required_version
in theTrunk.toml
file. Assuming there is one of course. However, that could allow for an easy check if the project is compatible with the trunk version.On the other side, it might make things more complicated? Any thoughts?
The text was updated successfully, but these errors were encountered: