cargo-dist icon indicating copy to clipboard operation
cargo-dist copied to clipboard

make dist=false make a package inelligible for single-package-mode (also don't error for "unknown" tags?)

Open DJDuque opened this issue 1 year ago • 2 comments

I am using cargo-dist in a workspace and it would be good if I could push tags for some library crates without having cargo-dist create a release using the singular library hack. Ideally, packages marked with dist=false should be really ignored, even when they are the only thing tagged.

Currently I have to manually remove these releases because otherwise linking to the latest release breaks. For example, my workspace contains multiple libraries with independent versions and a single package with multiple binaries (this is the only one I want to actually have releases for).

DJDuque avatar Aug 08 '24 06:08 DJDuque

Yeah we should just make dist = false opt you out of singular libraries. This will require some rejigging of the logic around this, but worth it.

https://github.com/axodotdev/cargo-dist/blob/f18413aa273c2b0e8cd27b6f4ce739bf1504b6ae/cargo-dist/src/announce.rs#L428-L439

In the immediate-term you can also use the tag-namespace feature to make cargo-dist only notice certain tags https://opensource.axo.dev/cargo-dist/book/reference/config.html#tag-namespace

Gankra avatar Aug 22 '24 17:08 Gankra

Increasingly pondering if this config should be expanded to be more than just a boolean after triaging/discussing a bunch of related issues. There's several different "levels" to which you might want to say "pay attention to this package" or "ignore this package":

  • build and publish its binaries/staticlibs/dylibs
  • with a named tag match, make a github release for it but without any artifacts
  • if cargo publishing the workspace, include this one

Gankra avatar Sep 05 '24 21:09 Gankra