Skip to content

Commit

Permalink
[GR-54784] Bump maximum Java compliance level.
Browse files Browse the repository at this point in the history
PullRequest: mx/1809
  • Loading branch information
fangerer committed Jun 18, 2024
2 parents 7da1967 + 9009ab4 commit c11de31
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/mx/_impl/mx.py
Original file line number Diff line number Diff line change
Expand Up @@ -18173,7 +18173,7 @@ def alarm_handler(signum, frame):
_CACHE_DIR = get_env('MX_CACHE_DIR', join(dot_mx_dir(), 'cache'))

# The version must be updated for every PR (checked in CI) and the comment should reflect the PR's issue
version = VersionSpec("7.26.0") # GR-54502
version = VersionSpec("7.26.1") # GR-54784

_mx_start_datetime = datetime.utcnow()

Expand Down
5 changes: 3 additions & 2 deletions src/mx/_impl/mx_ide_intellij.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class IntellijConfig:
external_projects: bool = True
java_modules: bool = True
native_projects: bool = False
max_java_compliance: int = 21
max_java_compliance: int = 99
import_inner_classes: bool = False
on_save_actions: bool = False
refresh_only: bool = False
Expand Down Expand Up @@ -323,7 +323,8 @@ def _intellij_exclude_if_exists(xml, p, name, output=False):
def _complianceToIntellijLanguageLevel(compliance):
# they changed the name format starting with JDK_10
if compliance.value >= 10:
# latest Idea 2021.2 requires the acceptance of a legal notice for beta Java specification to enable support for JDK17. Clamp at JDK16 by default
if config.max_java_compliance < compliance.value:
mx.warn(f"Requested Java compliance {compliance.value} is higher than maximum ({config.max_java_compliance}). Consider passing '--max-java-compliance'.")
return 'JDK_' + str(min(compliance.value, config.max_java_compliance))
return 'JDK_1_' + str(compliance.value)

Expand Down

0 comments on commit c11de31

Please sign in to comment.