Skip to content
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

[GR-52096] Set default locale at run-time. #9694

Merged
merged 1 commit into from
Sep 17, 2024
Merged

Conversation

graalvmbot
Copy link
Collaborator

No description provided.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Sep 17, 2024
@graalvmbot graalvmbot closed this Sep 17, 2024
@graalvmbot graalvmbot deleted the lottet/runtime-locale branch September 17, 2024 12:02
@graalvmbot graalvmbot merged commit c4cdb11 into master Sep 17, 2024
13 checks passed
zakkak added a commit to zakkak/quarkus that referenced this pull request Sep 23, 2024
Starting with GraalVM for JDK 24 (24.2) native image will no longer set
the locale default at build time. As a result, the default locale won't
be included by default in the native image unless explicitly specified.

See oracle/graal#9694
zakkak added a commit to zakkak/quarkus that referenced this pull request Sep 23, 2024
Starting with GraalVM for JDK 24 (24.2) native image will no longer set
the locale default at build time. As a result, the default locale won't
be included by default in the native image unless explicitly specified.

See oracle/graal#9694
zakkak added a commit to zakkak/quarkus that referenced this pull request Sep 24, 2024
Starting with GraalVM for JDK 24 (24.2) native image will no longer set
the locale default at build time. As a result, the default locale won't
be included by default in the native image unless explicitly specified.

See oracle/graal#9694
zakkak added a commit to zakkak/quarkus that referenced this pull request Sep 25, 2024
Starting with GraalVM for JDK 24 (24.2) native image will no longer set
the locale default at build time. As a result, the default locale won't
be included by default in the native image unless explicitly specified.

See oracle/graal#9694
zakkak added a commit to zakkak/quarkus that referenced this pull request Sep 30, 2024
Starting with GraalVM for JDK 24 (24.2) native image will no longer set
the locale default at build time. As a result, the default locale won't
be included by default in the native image unless explicitly specified.

See oracle/graal#9694
zakkak added a commit to zakkak/quarkus that referenced this pull request Oct 3, 2024
Starting with GraalVM for JDK 24 (24.2) native image will no longer set
the locale default at build time. As a result, the default locale won't
be included by default in the native image unless explicitly specified.

See oracle/graal#9694

# Conflicts:
#	core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/GraalVM.java
#	integration-tests/locales/some/src/test/java/io/quarkus/locales/it/LocalesIT.java
#	test-framework/junit5/src/main/java/io/quarkus/test/junit/GraalVMVersion.java
zakkak added a commit to zakkak/quarkus that referenced this pull request Oct 4, 2024
Starting with GraalVM for JDK 24 (24.2) native image will no longer set
the locale default at build time. As a result, the default locale won't
be included by default in the native image unless explicitly specified.

See oracle/graal#9694

# Conflicts:
#	core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/GraalVM.java
#	integration-tests/locales/some/src/test/java/io/quarkus/locales/it/LocalesIT.java
#	test-framework/junit5/src/main/java/io/quarkus/test/junit/GraalVMVersion.java
zakkak added a commit to zakkak/quarkus that referenced this pull request Oct 7, 2024
Starting with GraalVM for JDK 24 (24.2) native image will no longer set
the locale default at build time. As a result, the default locale won't
be included by default in the native image unless explicitly specified.

See oracle/graal#9694
zakkak added a commit to zakkak/quarkus that referenced this pull request Oct 7, 2024
Starting with GraalVM for JDK 24 (24.2) native image will no longer set
the locale default at build time. As a result, the default locale won't
be included by default in the native image unless explicitly specified.

See oracle/graal#9694
zakkak added a commit to zakkak/quarkus that referenced this pull request Oct 7, 2024
Starting with GraalVM for JDK 24 (24.2) native image will no longer set
the locale default at build time. As a result, the default locale won't
be included by default in the native image unless explicitly specified.

See oracle/graal#9694
zakkak added a commit to zakkak/quarkus that referenced this pull request Oct 22, 2024
Starting with GraalVM for JDK 24 (24.2) native image will no longer set
the locale default at build time. As a result, the default locale won't
be included by default in the native image unless explicitly specified.

As discussed in
quarkusio#43533 (reply in thread)
this patch updates the locales support so that:

- if neither `quarkus.locales` nor `quarkus.default-locale` is set, the
Quarkus applications should default to English (`en_US`), instead of the
build systems locale (which is the current behavior), at run-time.

- if `quarkus.default-locale` is set but `quarkus.locales` is not set,
then we should only include the locale `quarkus.default-locale` is set
to. This is the current behavior with GraalVM for JDK 21.

- if both `quarkus.default-locale` and `quarkus.locales` are set, then
we should include only the locales from `quarkus.locales` and the one
from `quarkus.default-locale` (this is the current behavior).

- if `quarkus.locales` is set but `quarkus.default-locale` is not set,
then we should include only the locales from `quarkus.locales` and
default to English, instead of the build systems locale (which is the
current behavior), at run-time (similarly to point 1).

- if `quarkus.default-locale` (which is build time fixed) is set, it is used to set the default `user.language` and `user.country` values at run-time, while users may still override them.

For points 2 and 3 starting with graalVM for JDK 24 we also include
`en_US` which shouldn't be a big issue as mentioned in
quarkusio#43533 (reply in thread),

CAUTION: Point 1 changes the current behavior, meaning we need to
clearly document and communicate it.

This patch also updates the Locales integration tests accordingly.

See oracle/graal#9694
bschuhmann pushed a commit to bschuhmann/quarkus that referenced this pull request Nov 16, 2024
Starting with GraalVM for JDK 24 (24.2) native image will no longer set
the locale default at build time. As a result, the default locale won't
be included by default in the native image unless explicitly specified.

As discussed in
quarkusio#43533 (reply in thread)
this patch updates the locales support so that:

- if neither `quarkus.locales` nor `quarkus.default-locale` is set, the
Quarkus applications should default to English (`en_US`), instead of the
build systems locale (which is the current behavior), at run-time.

- if `quarkus.default-locale` is set but `quarkus.locales` is not set,
then we should only include the locale `quarkus.default-locale` is set
to. This is the current behavior with GraalVM for JDK 21.

- if both `quarkus.default-locale` and `quarkus.locales` are set, then
we should include only the locales from `quarkus.locales` and the one
from `quarkus.default-locale` (this is the current behavior).

- if `quarkus.locales` is set but `quarkus.default-locale` is not set,
then we should include only the locales from `quarkus.locales` and
default to English, instead of the build systems locale (which is the
current behavior), at run-time (similarly to point 1).

- if `quarkus.default-locale` (which is build time fixed) is set, it is used to set the default `user.language` and `user.country` values at run-time, while users may still override them.

For points 2 and 3 starting with graalVM for JDK 24 we also include
`en_US` which shouldn't be a big issue as mentioned in
quarkusio#43533 (reply in thread),

CAUTION: Point 1 changes the current behavior, meaning we need to
clearly document and communicate it.

This patch also updates the Locales integration tests accordingly.

See oracle/graal#9694
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants