charmcraft --project-dir does not work for build anymore
Metadata
Current evaluation
Closed as working as designed: maintainer facundobatista explained `build` selects its project dir with `--from`, not `--project-dir` (which `pack` uses), so `charmcraft build --from charm-slurmd/` works.
Resolution: closed not a bug
Reason: In the closing comment (2021-07-07) facundobatista clarified that `build` now runs in an LXC container like `pack` and takes `--from` rather than the global `--project-dir` option, so the reported behaviour was intended and no code fix was needed. The follow-up request for a deprecation warning was delivered separately in PR #683 (commit 98e78a1c), and the `build` command was eventually removed in PR #798.
Evaluated by: mr-cal-bot
Issue body
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed not a bug | Closed as working as designed: maintainer facundobatista explained `build` selects its project dir with `--from`, not `--project-dir` (which `pack` uses), so `charmcraft build --from charm-slurmd/` works. | |
| stealth/space-bunny-alpha | — | closed not a bug | Closed as working as intended: maintainer explained `build` selects the project dir with `--from`, not `--project-dir`; the requested deprecation warning for `build` was later added in #683 (commit 98e78a1c). | |
| stealth/space-bunny-alpha | — | closed not a bug | Reported behavior was confirmed as intended: build selected project directories with --from, while pack used --project-dir. Use charmcraft build --from charm-slurmd/ instead. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed as resolved. Usage clarified: build requires --from, not --project-dir. The build command is deprecated in favor of pack, with a deprecation warning to be added. | |
| qwen/qwen3.6-35b-a3b | — | — | Resolved without code changes. The build command requires --from instead of --project-dir to specify the directory. The build command is deprecated in favor of pack, with a deprecation warning planned. | |
| qwen/qwen3.6-35b-a3b | — | — | The --project-dir flag was unsupported for build. Maintainers clarified that build uses --from instead, and pack is the recommended replacement. The build command will be deprecated with a warning added. Closed as resolved. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed after clarifying that --project-dir was replaced by --from for the build command. Maintainers agreed to add a deprecation warning for the build command. |
Update history
No update history recorded yet.
Related work
-
Related To:
canonical/charmcraft#683
(confidence 92%)
Follow-up PR from this issue's conversation: added a deprecation notice to the `build` command (commit 98e78a1c).
-
Related To:
canonical/charmcraft#798
(confidence 80%)
Later removed the long-deprecated `build` command (commit 20b45e92), completing the deprecation path described in the closing comment.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #198 `charmcraft init` would be better off with explicit directory name | charmcraft | closed | Kept directory selection on --project-dir; missing directories are now created by #508 (commit 15d530ae). | |
| #2707 Charmcraft confuses the current directory with the project directory when both has a charmcraft.yaml | charmcraft | open | Charmcraft 4.2.1 mixed the CWD and -p project files when both had charmcraft.yaml, breaking nested pack builds and CI; targeted project-directory fixes are present in current code. | |
| #2498 fix: `charmcraft pack --project-dir` with metadata.yaml | charmcraft | closed | Closed unmerged; superseded by #2644, which fixed metadata lookup for --project-dir and shipped in Charmcraft 4.2.1. |