chore(legacy-cli): remove unused help and version commands#5777
chore(legacy-cli): remove unused help and version commands#5777
Conversation
… test This commit removes the legacy CLI modules that are no longer used: - snapcraft_legacy/cli/help.py - snapcraft_legacy/cli/version.py - tests/unit/cli/test_version.py Also updates references in _runner.py and plugin loader accordingly. Part of issue #5682.
2922650 to
5509b9f
Compare
|
I have raised a PR on top of this to solve the failing integration tests - #5778 |
|
@Nalin-Kumar-Gupta the only test failures in this PR are an unrelated bug (canonical/craft-providers#829) and a timeout from a test taking too long, though it was working. What failure are you referring to with your new PR? |
Thanks for clarifying! To be more precise, my PR addresses the failure that occurs specifically when running snapcraft --version after the legacy help/version commands were removed. Without restoring @click.version_option, snapcraft --version exits with an error instead of printing the version. The other integration test failures you mentioned (craft-providers bug + timeout) are indeed unrelated. My changes don’t affect those.
|
|
I'm not able to reproduce that error. I cloned this PR's branch, packed & installed Snapcraft, and it appears to work: |
Thanks for checking! I just re-tested and both snapcraft --version and snapcraft version work fine after packing & installing. I must have misunderstood earlier — the failures I mentioned weren’t related to this change. You can merge this I have closed my PR. |
|
@Nalin-Kumar-Gupta it's true that the legacy entrypoint won't have a I tried in a directory with a core20 snap, which would be the primary way of entering a legacy entrypoint. If you or @bepri can come up with a way that this snap (which is published for amd64 on the |
Okay let me see if I can write a test for this. Reopened my PR. |
Hi @lengau
While the main |
|
Interesting. I wonder if anybody uses that? The modern Still, I think that probably means we should continue to support it until Snapcraft 9. Thoughts @lengau? |
Hi @lengau please review |
|
Pretty sure the |
|
I see. I was able to invoke it earlier but I must've been mistakenly in the Python virtual environment for Snapcraft. From a normal install, indeed there is no way to invoke it. We should probably remove that entrypoint. Thanks for the investigation @Nalin-Kumar-Gupta! |
This is a merge of #5731 and #5773, which both implement this change.
Authors: @Serena6688 and @Nalin-Kumar-Gupta
make lint?make test?