beeware / briefcase

Tools to support converting a Python project into a standalone native application.
https://briefcase.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
2.64k stars 371 forks source link

Expose more features of the underlying tools managed by Briefcase #747

Open freakboy3742 opened 2 years ago

freakboy3742 commented 2 years ago

The briefcase upgrade command provides a convenient interface to force an update of the tools Briefcase is managing. However, there are other "tool related" features that would be helpful to expose:

We currently compute the version of tools as part of the verification process, but we don't generally surface that information except in debug mode.

The Android backend will dump the contents of the sdkmanger during debug, but doesn't expose a "non-debug" way to list the same information.

The only way to easily invoke the Android SDK manager at present is to use -v to see the command line and environment used to issue commands, and manually reproduce those commands.

There isn't an easy way to start a Docker shell in a project's environment.

Describe the solution you'd like

One option would be to replace the briefcase upgrade command with a new briefcase tool command. This new command would allow for the following usage patterns:

Describe alternatives you've considered

It may be preferable retain the upgrade command as-is, extend it to include more of the managed tools (e.g., it doesn't currently display the Xcode version because there's no upgrade path), and include the version numbers as part of the upgrade --list output.

The execution of specific tools would then be a feature of a specific backend - probably the run command. For example briefcase run android --sdkmanager <args> would invoke the SDK manager. This would then allow each backend to provide very specific tool executions, rather than needing to expose a generic API for gathering tools into the upgrade command.

freakboy3742 commented 2 years ago

Addendum: the contents of briefcase tools --list should be included as part of the output when the user runs any command with -v - if we ask a user to provide debug detail, automatically getting a dump of all the tools and their versions as part of that dump would be very helpful.