Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Modify Bootstrap API to provide access to the console, logger, and overrides #2114

Merged
merged 2 commits into from
Jan 17, 2025

Conversation

freakboy3742
Copy link
Member

Briefcase's Bootstrap interface provides a mechanism for projects to define code and configuration items that describe certain "starting states" for a project. The intention is that GUI frameworks would provide bootstraps for "getting started" apps.

However, in the process of actually trying to use the bootstrap interface to resolve #1288, the interface exposed is not actually as useful as intended. Although the extra_context() entry point is documented as "This is where you could ask additional questions", there's no way to access any of Briefcase's console handling or logging, nor is there any way to access overrides that have been specified at the command line.

This PR modifies the API for boostraps to provide access to these tools.

Although this modifies the API for bootstraps in a way that is strictly backwards incompatible, the changes don't impact the automation bootstraps, or the two known bootstraps that are in the wild:

If there are any others, the changes required are very minor.

PR Checklist:

  • All new features have been tested
  • All new features have been documented
  • I have read the CONTRIBUTING.md file
  • I will abide by the code of conduct

Copy link
Member

@rmartin16 rmartin16 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me. I was thinking this would now expose Log and Console as public APIs....but I guess really most of Briefcase is public already....insofar as a custom output format plugin would have access to all these internals.

@freakboy3742
Copy link
Member Author

We don't really have a formal published API for anything in Briefcase at the moment, mostly because most users aren't interacting with Briefcase as an API. We probably should formalize an API... but that's a much bigger fish to fry. In the meantime, "try not to break things" is about as good as we're going to get.

@freakboy3742 freakboy3742 merged commit f81e3b8 into beeware:main Jan 17, 2025
49 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create new project with Positron template (Django or Static)
2 participants