← Back to issue list

cli: reserve the --debug option for snapcraft projects

View original Github issue

Metadata

Project
snapcraft
Number
#2185
Type
pull request
State
merged
Author
sergiusens
Labels
—
Created
Updated
Closed

Current evaluation

Merged #2185 in commit 49cf505fc, reserving --debug for snapcraft projects and moving Snapcraft's internal debug logging to the SNAPCRAFT_DEBUG environment variable.

Resolution: closed resolved

Reason: PR #2185 was approved and merged into master as commit 49cf505fc, implementing the documented CLI separation.

Evaluated by: mr-cal-bot

No scores available.

Issue body

--debug has been conflated to debug snapcraft as a project itself and snapcraft projects users of snapcraft work on. For the former we introduce an environment variable to enable the existing debug logs statements in the snapcraft code base. LP: #1782772 Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com> - [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [x] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)? - [x] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)? - [x] Have you successfully run `./runtests.sh static`? - [x] Have you successfully run `./runtests.sh unit`? -----

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged #2185 in commit 49cf505fc, reserving --debug for snapcraft projects and moving Snapcraft's internal debug logging to the SNAPCRAFT_DEBUG environment variable.
stealth/space-bunny-alpha — closed resolved Merged #2185: --debug is reserved for snapcraft projects; SNAPCRAFT_DEBUG enables Snapcraft's internal logging. Commit 49cf505fc.
qwen/qwen3.6-35b-a3b — — Merged. Reserves the --debug CLI flag for snapcraft projects and introduces an environment variable to debug snapcraft itself, resolving option conflation. Approved and merged after passing CI.
qwen3.6-35b-a3b-mtp-q6 — — Merged into master. Reserved the --debug CLI flag for snapcraft projects and introduced an environment variable to enable debug logging for snapcraft itself, resolving Launchpad bug #1782772. All tests passed with a minor coverage decrease.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1782772 --debug should not print logger.debug messages snapcraft (launchpad) closed Merged snapcore/snapcraft#2185 as commit 49cf505fc, making --debug a project-command option and preventing it from enabling developer debug logs.
78%
#2976 cli: formalize developer debug as hidden build option snapcraft merged Merged in snapcore/snapcraft#2976 (669e936ac), formalizing developer debug as a hidden build option and forwarding it to LXD/Multipass build environments.
74%
#1782773 Add --debug for lifecycle steps snapcraft (launchpad) closed Merged snapcraft#3718 (e2ff471b9) added --debug to open a shell in the part build environment after lifecycle errors.
72%
#1548492 Snapcraft swallows exceptions snapcraft (launchpad) closed Added a global --debug flag for tracebacks and debug logs via merged PR ubuntu-core/snapcraft#332 (commit 580c43ebc).
72%
#1609803 snapcraft cleanbuild --no-clean-up snapcraft (launchpad) closed Cleanbuild debugging landed in snapcore/snapcraft PR #740 (commit a24083e75); follow-up PR #1404 made --debug enter a shell when builds fail.
71%