Electron100 / butane

An ORM for Rust with a focus on simplicity and on writing Rust, not SQL
Apache License 2.0
94 stars 13 forks source link

Cyclic dev-dep needs help when publishing #81

Closed jayvdb closed 1 year ago

jayvdb commented 1 year ago

We're in the process of publishing a new butane to https://cloudsmith.io, and ran into https://github.com/rust-lang/cargo/issues/4242 , because butane_test_helper is a dev-dep of butane_core.

I am not a fan of the version range trick suggested at https://github.com/rust-lang/cargo/issues/4242#issue-239959929

So we're going with the "remove dev-deps and publish dirty" approach like https://github.com/rust-lang/cargo/issues/4242#issuecomment-545806021 . https://github.com/rust-lang/futures-rs/tree/master/ci/remove-dev-dependencies is missing now, but it looks like it should be in the git history. Unfortunately not in crates.io

jayvdb commented 1 year ago

I was able to publish with

cargo hack publish --allow-dirty -p butane_core --no-dev-deps
cargo hack publish --allow-dirty -p butane_codegen
cargo hack publish --allow-dirty -p butane_test_helper
cargo hack publish --allow-dirty -p butane --no-verify
cargo hack publish --allow-dirty -p butane_cli

Tried making it a one-liner but ran into https://github.com/taiki-e/cargo-hack/issues/188

Electron100 commented 1 year ago

I think #84 fixes this. Let me know if you see issues with the approach there.

Electron100 commented 1 year ago

Closing due to the above. Let me know if I missed anything.