charm plugin should include rust compiler in build dependencies
Metadata
Current evaluation
Proposal rejected: PR #2005 was closed unmerged after concerns that implicit system Rust packages conflict with Charmcraft's shift to explicit parts and reproducible builds.
Resolution: closed stale
Reason: PR #2005 was closed without merging after @lengau requested validator checks for user-selected Rust toolchains. @lengau explained that newer bases require explicit parts and adding system cargo could introduce unpinned, outdated compiler dependencies.
Evaluated by: mr-cal-bot
No scores available.
Issue body
### What needs to get done
Add `"cargo"` to the charm plugin build dependencies for deb based charms (see PR #2005).
I'm not 100% sure what's needed for `yum` and `dnf` systems.
### Why it needs to get done
It's increasingly common that some python packages require a rust compiler at build time. We first noticed this a few months ago in the Juju SDK's ['Write your first Kubernetes charm' tutorial](https://juju.is/docs/sdk/observe-your-charm-with-cos-lite#heading--build-packages). Here we needed to [add](https://github.com/canonical/juju-sdk-tutorial-k8s/pull/42) `cargo` to `build-packages` for the `charm` `part` when adding [cos-lite](https://charmhub.io/cos-lite).
This came up again recently with the 2023 Operator Day tutorial ([video](https://www.youtube.com/watch?v=GkQ3OLJp2Gs), [repo](https://github.com/operatorinc/zinc-k8s-operator)) that most new starters [are asked to do](https://sites.google.com/canonical.com/engineeringonboarding/fundamentals/charms). Here the need for `cargo` comes from adding the [`traefik_k8s.v2.ingress`](https://github.com/canonical/traefik-k8s-operator/blob/main/lib/charms/traefik_k8s/v2/ingress.py) lib, because it includes the popular PyPI package `pydantic` (note: the lib is using `PYDEPS`). We considered another documentation fix here (which would have to include both the tutorial and the `ingress` lib, as well as any other libs using `pydantic`), but it seems like it might be a better idea to just include `cargo` in the charm plugin's build dependencies by default.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed stale | Proposal rejected: PR #2005 was closed unmerged after concerns that implicit system Rust packages conflict with Charmcraft's shift to explicit parts and reproducible builds. | |
| stealth/space-bunny-alpha | — | closed stale | Implicit cargo support was not added: linked PR #2005 closed unmerged as Charmcraft moved toward explicit build parts and user-declared Rust toolchains. | |
| stealth/space-bunny-alpha | — | closed not a bug | Proposal rejected: PR #2005 was closed unmerged; newer bases require explicit parts, so charms must declare cargo/rustc instead of inheriting system Rust packages. | |
| stealth/space-bunny-alpha | — | closed not a bug | Cargo was not added: Charmcraft is moving to explicit, minimal build dependencies to avoid version-drift failures. Linked implementation PR #2005 closed unmerged. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Rejected. The team is shifting away from implicit build dependencies to prevent version drift and unexpected failures. Users must explicitly declare cargo and rustc in their charmcraft.yaml parts. | |
| qwen/qwen3.6-35b-a3b | — | — | Rejected. Maintainers declined to add the Rust compiler to default build dependencies, citing a strategic shift toward explicit, minimal build configurations to prevent unexpected version conflicts across different OS bases. | |
| qwen/qwen3.6-35b-a3b | — | — | Rejected. The team is moving away from implicit build dependencies to ensure minimal, predictable builds. Adding cargo by default risks unexpected failures from system package version drift, so the feature request was closed. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Rejected. Maintainers prefer explicit parts definitions over implicit dependencies. Including cargo by default is avoided to prevent unexpected build failures from system updates. Users must manually specify the rust toolchain. |
Update history
No update history recorded yet.
Related work
-
Related To:
canonical/charmcraft#2005
(confidence 100%)
Implementation PR for adding cargo; it was closed unmerged after maintainer feedback.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #2005 feat: add "cargo" to deb build dependencies for charm plugin | charmcraft | closed | PR #2005 was closed unmerged as stale after a request for Poetry-style validation protecting user-installed Rust toolchains; no resolving commit was merged. |