'charm-strict-dependencies' requires at least one requirements file. in field 'parts.charm.charm-strict-dependencies'
Metadata
Current evaluation
Closed without a confirmed fix. Maintainer referenced PR #1808 and suggested a workaround, but the author confirmed the validation error persists in v2.7.3. The issue remains unresolved.
Suggested action: —
No scores available.
Issue body
### Bug Description
I'm guessing `charm-strict-dependencies` defaults to requirements.txt during charmcraft pack? Looks like the same default doesn't apply to `charmcraft clean`
### To Reproduce
charmcraft installed from edge (rev 1824 2.5.0.post16+git23bf390)
1. clone https://github.com/canonical/mysql-router-k8s-operator
2. charmcraft pack
3. charmcraft clean
```
Bad charmcraft.yaml content:
- 'charm-strict-dependencies' requires at least one requirements file. in field 'parts.charm.charm-strict-dependencies'
Full execution log: '/home/ubuntu/.local/state/charmcraft/log/charmcraft-20231124-090230.749172.log'
```
### Environment
Ubuntu 22.04
### charmcraft.yaml
```shell
# Copyright 2022 Canonical Ltd.
# See LICENSE file for licensing details.
type: charm
bases:
- build-on:
- name: "ubuntu"
channel: "22.04"
run-on:
- name: "ubuntu"
channel: "22.04"
parts:
charm:
override-pull: |
craftctl default
if [[ ! -f requirements.txt ]]
then
echo 'ERROR: Use "tox run -e build" instead of calling "charmcraft pack" directly' >&2
exit 1
fi
charm-entrypoint: src/kubernetes_charm.py
prime:
- charm_version
- workload_version
- scripts
charm-strict-dependencies: true
build-packages:
- libffi-dev
- libssl-dev
- pkg-config
- rustc
- cargo
```
### Relevant log output
[charmcraft-20231124-090230.749172.log](https://github.com/canonical/charmcraft/files/13457115/charmcraft-20231124-090230.749172.log)
[charmcraft-20231124-084822.286563.log](https://github.com/canonical/charmcraft/files/13457116/charmcraft-20231124-084822.286563.log)
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed without a confirmed fix. Maintainer referenced PR #1808 and suggested a workaround, but the author confirmed the validation error persists in v2.7.3. The issue remains unresolved. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed despite author confirming the bug persists in v2.7.3. Maintainer referenced PR #1808 and a workaround, but validation still fails for clean and upload commands without an explicit requirements file. Unresolved. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. Maintainer cited PR #1808 as a fix, but the reporter confirmed the validation error persists in charmcraft 2.7.3 for pack and version commands. The issue remains unfixed. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed without resolution. A maintainer referenced PR #1808 as a fix, but the author confirmed the validation error persists in charmcraft v2.7.3 despite workarounds. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed despite reporter confirming the bug persists in charmcraft 2.7.3. Maintainer referenced PR #1808 and suggested a charm-requirements workaround, but validation errors remain. Issue closed without a verified fix. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1797 Charmcraft 3 does not install dependencies. | charmcraft | closed | Closed as intended behavior. charm-strict-dependencies requires the requirements file to explicitly list all packages. The previous implicit installation was a bug. See issue #1473. | |
| #1456 Strict dependencies prevents charm from building | charmcraft | closed | Strict dependencies build failed due to outdated pip. Maintainers identified pip>=23.2.1 as required. The issue was closed without a fix, as the reporter confirmed charmcraft 2.7.1 still lacks the update. |