The sound distributed version control system

#149 Cargo workspace corrections

Closed on January 5, 2021
pksunkara on November 30, 2020

I have noticed that you are still using the old pattern (which has it’s issues). I moved you to the new pattern.

Also, it looks like the version in pijul’s Cargo.toml is on alpha.8 but crates.io has alpha.11. What’s up with that?

pksunkara added a change on November 30, 2020
H565UUPCG3M3BQNQPC4DUYJN2GO3DYTODYSHQYIZ2FT6JVSHBE3AC
main
pmeunier on December 1, 2020

Hi! Thanks for this change.

Forgive me for not following the evolutions of Rust very closely, but why is this considered the “new” pattern? The “patch” way seemed more elegant to, since the Cargo.toml that get published are the same as the ones you have in your repository. Do you have a source explaining that this is the recommended way?

pmeunier on December 1, 2020

I forgot to answer about the versions. Don’t worry about it too much, I don’t always record Cargo.toml when publishing. There are multiple reasons for this:

  • Pijul is moving super fast, and gets many changes per day. Some of these changes are really cool, so we want them, but the best way to implement them is still in discussion. For example, the versions alpha.9-alpha.11 contain changes from #104 that are not on the main channel.

  • Cargo doesn’t support Pijul, so I always have to use --allow-dirty when publishing.

Now that Pijul works, we’re still figuring out how best to work with it. Maybe one channel per release (or at least for each of the last five releases) would be a good thing to do. Or tags (pijul record --tag), which act like commits in Git.

pksunkara on December 1, 2020

If this were a git repo, using from it directly in Cargo.toml would give us issues because of the old pattern. It’s not an issue for now, but the new pattern is used everywhere in famous workspace repos and thought I would fix it here for future.

https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-path-dependencies

cargo publish would intelligently remove the path when publishing. So, there are no issues with publishing.

Also, you can use tools like https://github.com/pksunkara/cargo-workspaces to publish all the crates easily with this new pattern. (It’s also used by many famous crates)

pmeunier on January 5, 2021

Hi @pksunkara! I finally found the time to read the documentation properly, and I agree. Thanks again for your change!

pmeunier closed this discussion on January 5, 2021