← Back to issue list

Snapcraft conflates standard PyPI packages with local plugins

View original Github issue

Metadata

Project
snapcraft
Number
#5217
Type
issue
State
closed
Author
bepri
Labels
Created
Updated
Closed

Current evaluation

Closed and abandoned publicly, moved to internal tracking (Jira CRAFT-4003). A PyPI package named 'rust' conflicts with Snapcraft's built-in plugin, causing incorrect local plugin loading. No fix implemented.

Suggested action:

No scores available.

Issue body

### Bug Description When upgrading dependencies, it was discovered that building Snapcraft with `cryptography==44.0.0` introduced a new `rust` module to the `site-packages` directory. Doing this caused Snapcraft to attempt to use the contents of this module instead of the proper `rust` plugin when specified during packing, under the impression that it was a local plugin. ### To Reproduce 1. Add `rust` into Snapcraft's virtual environment 1. Build any snap with the Rust plugin ### Environment 24.10, Snapcraft 8.5.1 ### snapcraft.yaml ```yaml name: rust-hello version: "1.0" summary: simple rust application description: build a rust app using core20 base: core20 confinement: strict apps: rust-hello: command: target/hello parts: hello: plugin: rust source: src ``` ### Relevant log output ```shell https://github.com/canonical/snapcraft/actions/runs/12682069561/job/35347202604?pr=5196#step:4:1051 ``` ### Additional context _No response_

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Closed and abandoned publicly, moved to internal tracking (Jira CRAFT-4003). A PyPI package named 'rust' conflicts with Snapcraft's built-in plugin, causing incorrect local plugin loading. No fix implemented.
qwen/qwen3.6-35b-a3b Closed without a fix. Internal ticket CRAFT-4003 was created to track the conflict between PyPI packages and local plugin loading. A maintainer identified the root cause in the legacy plugin loader, but the issue remains unresolved.
qwen3.6-35b-a3b-mtp-q6 Closed and tracked via internal Jira ticket. Root cause identified in the plugin loader incorrectly prioritizing site-packages modules over built-in plugins.
qwen3.6-35b-a3b-mtp-q6 Closed and triaged to CRAFT-4003. Root cause identified in the plugin loader, which incorrectly prioritizes local directories over PyPI packages, misidentifying the rust module as a local plugin. No public resolution provided.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1862219 Snapcraft Rust Plugin Does not Respect Cargo.lock snapcraft (launchpad) closed Abandoned and closed without resolution. The Snapcraft Rust plugin continues to ignore Cargo.lock files, causing dependency resolution mismatches during automated builds.
74%
#1561546 Snapcraft clean removes local plugins snapcraft (launchpad) closed Closed without a documented fix or resolution. The bug where snapcraft clean incorrectly removes local plugins remains unaddressed, likely abandoned due to prolonged inactivity.
71%
#1988858 snapcraft trying to install extra package causing conflict snapcraft (launchpad) closed Closed without a tracked fix or comments. The author reported a build dependency conflict caused by snapcraft pulling extra packages. The issue appears abandoned or resolved by the author.
70%