← Back to issue list

Add a warning for the default command

View original Github issue

Metadata

Project
snapcraft
Number
#5525
Type
issue
State
closed
Author
mr-cal
Labels
Status: Triaged Type: Enhancement
Created
Updated
Closed

Current evaluation

Closed unimplemented: #6074 removed the default command, but #6178 reverted that removal, leaving the requested warning absent pending craft-cli support.

Resolution: closed stale

Reason: No warning was implemented. PR #6074 removed the default command, but PR #6178 reverted that removal; the issue was later closed while upstream craft-cli support was still pending.

Evaluated by: mr-cal-bot

No scores available.

Issue body

### What needs to get done Snapcraft should emit a deprecation warning if the default command is used (`snapcraft` defaults to `snapcraft pack`). This requires upstream work in craft-cli, which is the most reliable place to [detect this](https://github.com/canonical/craft-cli/blob/7f1408f30b255ff9d05c1dcdeafbce82b445176b/craft_cli/dispatcher.py#L523-L531). ### Why it needs to get done The default command is scheduled for removal in a future version of Snapcraft. Blocked by #5425 and #5426

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed stale Closed unimplemented: #6074 removed the default command, but #6178 reverted that removal, leaving the requested warning absent pending craft-cli support.
stealth/space-bunny-alpha — closed stale The default-command warning was closed without implementation, awaiting craft-cli support. PR #6074 removed the command, but PR #6178 reverted that removal.
qwen/qwen3.6-35b-a3b — — Closed without implementation. The deprecation warning enhancement remains blocked by upstream craft-cli changes and appears abandoned.
qwen/qwen3.6-35b-a3b — — Closed without implementation. The enhancement was abandoned as it remains blocked by upstream craft-cli changes and related issues. No fix or merge occurred.
qwen3.6-35b-a3b-mtp-q6 — — Deferred to Jira ticket SNAPCRAFT-1149. The deprecation warning enhancement remains blocked by upstream craft-cli updates and related issues, with no implementation completed.

Update history

No update history recorded yet.

Related work

  • Related To: canonical/snapcraft#6074 (confidence 99%)

    Merged as db7c53f21 to remove the default command, temporarily superseding the warning request.

  • Related To: canonical/snapcraft#6178 (confidence 99%)

    Merged as e5aaf0683 to revert #6074, restoring the default command and leaving the warning unimplemented.

Related issues

Issue Project State Summary Similarity
#349 Add `is_default_command() -> bool` craft-cli closed Closed as unnecessary: craft-cli added its own default-command deprecation warning in PR #362 (commit 5396c87), so no public detection API was added.
76%