Stream: t-compiler/wg-meta

Topic: out-of-tree crates - crates.io or git dependency


mw (Apr 02 2019 at 09:49, on Zulip):

Hey, for the https://github.com/rust-lang/measureme crate the question came up how to best depend on it in the compiler. Should publish to crates.io or should have a git dependency? What are the upsides and downsides of each approach?

davidtwco (Apr 02 2019 at 10:02, on Zulip):

Is there any existing precedent?

mw (Apr 02 2019 at 10:52, on Zulip):

rustc_hash is published on crates.io

mw (Apr 02 2019 at 10:53, on Zulip):

one advantage of a git dependency (probably) is that it's easier to modify for local experimentation

mw (Apr 02 2019 at 10:54, on Zulip):

i.e. it's simple to switch just part of the URL instead of having to look it up first

mw (Apr 02 2019 at 10:54, on Zulip):

although one probably more frequently has to change the dependency to a local one, which is just as "hard" with a git dependency

nikomatsakis (Apr 08 2019 at 19:40, on Zulip):

I've generally gone with crates.io dependency

nikomatsakis (Apr 08 2019 at 19:40, on Zulip):

But tbh I didn't think very hard about that decision

nikomatsakis (Apr 08 2019 at 19:40, on Zulip):

It just seemed to be good to get ourselves in the practice of doing publishing, thinking about semver, etc

Last update: Nov 18 2019 at 00:40UTC