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
Bump JDK 8u242-b08
to 17.0.7+7
#1271
Changes from 4 commits
20f0bf4
02fee05
97f7395
012bc9c
a588be4
5d14102
255d78e
a2ca022
2359725
c863323
2e494de
dabc190
dea0985
a0fd32c
e101460
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
The version of OpenJDK for Java was updated from 8 to 17. |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,6 +1,9 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
from typing import Optional | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
from briefcase.config import BaseConfig | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
from packaging.version import Version | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
import briefcase | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
from briefcase.config import AppConfig, BaseConfig | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
from briefcase.exceptions import BriefcaseCommandError | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
from .base import BaseCommand, full_options | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -14,16 +17,66 @@ def add_options(self, parser): | |||||||||||||||||||||||||||||||||||||||||||||||||||||
self._add_update_options(parser, context_label=" before building") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
self._add_test_options(parser, context_label="Build") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
def build_app(self, app: BaseConfig, **options): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
def build_app(self, app: AppConfig, **options): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
"""Build an application. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
:param app: The application to build | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
""" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
# Default implementation; nothing to build. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
def verify_template(self, app: AppConfig): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
"""Verify the template satisfies the Command's requirements.""" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
self.logger.info("Checking template compatability...", prefix=app.app_name) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
with self.input.wait_bar("Verifying Briefcase support..."): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure a waitbar is needed here. Verification should be near immediate. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IMO, this wait bar here is mostly intended to provide better continuity with the rest of the output. While I consider the Wait Bar to be mostly about communicating a task is ongoing, I think the consistency of I suppose the end state of the Wait bar output could be manually printed...but that feels a little awkward. Still want to remove/change this? Example output:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see what you're saying; I guess for me, "is this a valid template" is a fast validation check that should almost always pass. It's not "doing" anything - it's just verifying that everything else will work. 99% of the time, it won't be communicating anything - and the 1% of the time that it does, there will be a big "it won't work" error message. Some of the other "short lived" tasks (e.g., updating app metadata) are actually doing something - they're part of the build process, writing/modifiying files, etc. I can't think of another task that is (a) short lived and (b) doesn't write/add/delete anything to the disk, with the exception of no-op tasks that are flagged has doing something, but then the platform backend doesn't need to actually do anything. The closest I can think of is some of the Docker checks - but those (a) can take time, and (b) can fail in some creative ways, so flagging that you're in the middle of a Docker check can be useful debugging. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok...so, do you want this to print anything then? I feel like just printing the section header That makes sense if so. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh sorry - I thought that part was implied. My intention was to say that there should be no message when verifying the template version, unless there's a problem. Apologies for the ambiguity on my part. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
# check against the "release" for each Version since versions | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
# such as "0.3.15.dev123" are considered older than "0.3.15" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
if template_target := self.briefcase_target_version(app=app): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
template_target = Version(template_target).release | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
if platform_target := self.oldest_compatible_briefcase: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
platform_target = Version(platform_target).release | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
if platform_target and not template_target: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
raise BriefcaseCommandError( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
f"""\ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
The app template must declare a target version of Briefcase to confirm it is | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
compatible with this version of Briefcase. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
The template's target Briefcase version must be {'.'.join(map(str, platform_target))} or later. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
Once the template is updated, run the create command: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
$ briefcase create {self.platform} {self.output_format} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can't verify this renders 100% correctly, but suggested text:
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
""" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
current_version = Version(briefcase.__version__).release | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
if (platform_target and platform_target > template_target) or ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
template_target and template_target > current_version | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be an There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this has definitely been a sticking point...i guess i won't say too much more except these approaches are effectively the same...with slightly different implementations. I like the idea of an epoch....but I think using the Briefcase version is confusing....because people will think you're literally talking about the current version of Briefcase. I also like the idea of supporting a version inside the template that's independent of the platform version support declaration in Briefcase. This allows third party templates to specify an arbitrary level of support with Briefcase. If we limit this to Briefcase's internal platform version, then we're limiting the number of potential breaking changes third party can protect themselves from....which could be missed breaking changes or even just nuances among versions. At this point, I'm starting to feel we may just need an executive decision....if only because I'm a bit exhausted going round and round. I'm prepared to implement the epoch versioning or even something else. (I'm still working on promoting the check to all Commands since that's pretty impactful to the tests.) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In which case, I'm going to put on my BDFN hat and say "epoch-style numbering, using the Briefcase version as the epoch marker". Yes, there's a source of confusion in that a 0.3.16 template will have marker saying it is for 0.3.15. However, as this discussion has revealed, any discussion of compatibility and version numbers is going to be confusing; picking an identifier that has a clear interpretation (vs a new "epoch" number that will need it's own explanation) is about as good as we're going to get, IMHO. It's also not especially user-visible - it's a value in Using the 0.3.15 version is also implicit documentation of which release notes you need to look at for a migration guide. I acknowledge that there could be a need for a third-party template provider to lock against a different Briefcase version. However, we don't have any particular evidence that this requirement exists - it's mostly speculation and trying to foretell the future. On that basis, I'm comfortable living with the limitation until such time as we can clearly identify a specific use-case. If such a requirement were to develop, I can imagine adding an additional template option (or command line option) to ignore template version checks, or impose a different version check; however, I think we should cross that bridge when (and if) we come to it. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
minimum_version = ".".join(map(str, platform_target or current_version)) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
raise BriefcaseCommandError( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
f"""\ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
The app template is not compatible with this version of Briefcase since it is | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
targeting version {'.'.join(map(str, template_target))}. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
If you are using BeeWare's default template, then running the create command | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this grammar needs to be tweaked...i'll do it later if we're good with the rest of this.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
to update the app using a compatible version of the app template. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
If a custom template is being used, it must be updated to be compatible with | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
Briefcase version {minimum_version} before re-running the create command. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
To run the create command: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
$ briefcase create {self.platform} {self.output_format} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
""" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
def _build_app( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
self, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
app: BaseConfig, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
app: AppConfig, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
update: bool, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
update_requirements: bool, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
update_resources: bool, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -68,6 +121,7 @@ def _build_app( | |||||||||||||||||||||||||||||||||||||||||||||||||||||
else: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
state = None | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
self.verify_template(app) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
self.verify_app_tools(app) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
state = self.build_app(app, test_mode=test_mode, **full_options(state, options)) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be in the base command, and called as part of a more generic check (
finalize?
). If you've got an app that was generated for 0.3.14, and you try to run it without building, you're going to have the same class of problem - it's not exclusively a build problem.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah...I initially tried to put it there but ran in to issue. I'll try to move it up again.