axodotdev / axodotdev/cargo-dist

more rigorously handle "skipping installers" situations

Open
#312 0 comments 0 reactions 0 assignees View on GitHub
ux
Dominant language
Rust
Stars
2.1k
Forks
149
Avg merge
1d 11h
Merged PRs (30d)
32

Description

The installers code is riddled with checks for situations that make them invalid:

https://github.com/axodotdev/cargo-dist/blob/676214a910a97da55c3657aaff4b266a162dbaea/cargo-dist/src/tasks.rs#L1014-L1017

https://github.com/axodotdev/cargo-dist/blob/676214a910a97da55c3657aaff4b266a162dbaea/cargo-dist/src/tasks.rs#L1079-L1082

All of them produce warnings, allowing things to potentially progress in messed up situations. I made these all warnings so that `cargo dist build` run locally ("host mode") wouldn't be blocked by some installers not making sense on the current platform.

It would be nice if some of these could be hard errors when they should be (like `cargo dist plan`), and if they included more context for why things failed (super common for us to print a warning at the top about "inconsistent repository values", but it's easy to miss that the two warnings are related).

There's also this warning in init:

https://github.com/axodotdev/cargo-dist/blob/676214a910a97da55c3657aaff4b266a162dbaea/cargo-dist/src/init.rs#L432-L435

which is a little more subtle because it's genuinely "fine" for someone to not have repository set properly if all they care about is tarballs.

Contributor guide

Open the contributing guide

Research direction

Start with the linked checks in cargo-dist/src/tasks.rs and the warning in cargo-dist/src/init.rs, then compare how cargo dist build, cargo dist plan, and cargo dist init should treat invalid installer situations. Identify which cases should be hard errors and how related warnings should provide context. Done means the handling is consistent without blocking valid host-mode or tarball-only workflows.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
release
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.