-
-
Notifications
You must be signed in to change notification settings - Fork 375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change templates to one branch per Briefcase version #824
Comments
These are all valid points; there's clearly a need to do something about Briefcase version compatibility. Reproducibility of builds in particular is a definite concern that I have. At least in the short term, I'm comfortable telling users "fix problems by updating everything"; but as we mature as a project, I agree that becomes less viable as a strategy. Your analysis of template differences is correct AFAICT for 3.9->3.10 templates; however, that's an example of a Python version update where not much changed. You see much more substantial changes if you look at 3.7->3.8. That version update included 2 major themes in template changes:
(1) is a relatively minor inconvenience; it's annoying, but it shouldn't be too hard to add an Regarding the specific implementation approach - my inclination would be slightly different to what you propose. Instead of cutting a branch at the start of development of a new Briefcase release, I'd suggest we use a "release branch" approach. We maintain a dev/main branch which remains the "bleeding edge" against which PRs are merged. When it comes time to make a Briefcase release, we cut a This means we don't need to commit to our next version number at the start of the development cycle, and we don't have to handle FWIW: there's a related set of concerns around the support packages. Although those generally only vary as a result of updates to Python (or other key libraries), very occasionally we need to make changes to the structure of those packages, and those structural changes are usually accompanied by template changes. For example, the changes I'm currently looking at for binary module compatibility on iOS will likely result in significant changes to the iOS and macOS support packages - and will require parallel changes to the iOS and macOS templates (both Xcode and App). I think we may need to include an allowance in templates to set a min/max support package version so that we can publish a support package version update without the risk of breaking compatibility with older template versions. |
After discussion, we agreed the following:
We'll hold off on doing this until we know exactly what template changes come out of the current work on iOS, macOS and Android. |
One more thought: if Briefcase detects a development version number like 0.3.9.devX or 0.3.9+dYYYYMMDD, it should still attempt to use a But if Briefcase detects a clean tagged version number like 0.3.9, it should never fall back on |
It's occurred to me that the Chaquopy template PR (beeware/briefcase-android-gradle-template#52) won't be compatible with old versions of Briefcase, because its briefcase.toml omits
app_support_path
, and replacesapp_packages_path
withapp_requirements_path
. The Flatpak template did both of these things too, but that was no problem because old versions of Briefcase didn't support Flatpak anyway.The issue of it being difficult to update the templates without breaking old versions of Briefcase has come up several other times in the last couple of months, most recently at #804 (comment). So I'd like to revisit the idea of a closer coupling between the Briefcase version and the template version,, which we previously discussed at #775 (comment):
Here are the differences between the 3.9 and 3.10 branches of each current template:
The strings are obviously easy to template. For the binaries, we can make the template contain them all side by side, with Python version numbers in their names, and provide a cookiecutter "post" hook which renames one of them to the target name and removes all the others. From the perspective of Briefcase, the cookiecutter output would be exactly the same as it is now.
This could be done by a cookiecutter "pre" hook.
In general I think we should avoid making hot fixes which affect already-released versions of Briefcase, as it makes app builds non-reproducible. Even if a hot fix doesn't actually break anything, if users notice that their app is constantly changing underneath them despite them staying on the same Briefcase version, it'll make them unwilling to trust us as the foundation of a serious project.
However, if we used a branch rather than a tag, then that would still leave us the option of making hot fixes, as well as making development more convenient:
The top-level briefcase-template doesn't currently have multiple branches, but since it also receives updates to support new Briefcase features (e.g. beeware/briefcase-template#31, which accidentally broke AppImage builds), it would make sense to handle that in exactly the same way.
Advantages of this scheme:
The text was updated successfully, but these errors were encountered: