sources: introduce SnapcraftSourceNotFoundError
Metadata
Current evaluation
Merged. Introduces SnapcraftSourceNotFoundError to improve error messaging for missing sources, chaining to FileNotFoundError. Adds unit tests, fixes formatting, and resolves internal tickets SNAPCRAFT-VV, VN, TJ, T9, and TE. Approved and CI-passed.
Suggested action: —
No scores available.
Issue body
Many of the errors seen by users indicate source not found.
- introduce SnapcraftSourceNotFoundError with helpful error
message
- chain to FileNotFoundError raised by shutil.copy2(), a common
cause of the captured FileNotFoundError exceptions
Signed-off-by: Chris Patterson <chris.patterson@canonical.com>
- [ ] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [ ] Have you successfully run `./runtests.sh static`?
- [ ] Have you successfully run `./runtests.sh tests/unit`?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged. Introduces SnapcraftSourceNotFoundError to improve error messaging for missing sources, chaining to FileNotFoundError. Adds unit tests, fixes formatting, and resolves internal tickets SNAPCRAFT-VV, VN, TJ, T9, and TE. Approved and CI-passed. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Introduces SnapcraftSourceNotFoundError to improve error messaging for missing source files. Adds unit tests, simplifies related logic, and resolves multiple SNAPCRAFT tracking issues. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged introduces SnapcraftSourceNotFoundError to improve error messaging for missing sources. Chains to FileNotFoundError from shutil.copy2(), adds unit tests, simplifies logic, and resolves multiple SNAPCRAFT tracking tickets. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #2109 sources: clean up IncompatibleOptionsError | snapcraft | merged | Merged refactoring splitting IncompatibleOptionsError into SnapcraftSourceIncompatibleOptionsError and SnapcraftSourceInvalidOptionError. Updated tests to use new classes and assert properties. Approved and merged after passing CI. | |
| #1126 feat: source handler snap support | craft-parts | merged | Added support for source types to specify required snaps for handling. Merged after approval by three reviewers and passing all CI checks. Changes span four files with 46 additions, resolving CRAFT-4561. |