Skip to content

#1151: fix arm architecture detection#1772

Merged
hohwille merged 7 commits intodevonfw:mainfrom
shodiBoy1:bugfix/1151-fix-arm-architecture-detection
Mar 27, 2026
Merged

#1151: fix arm architecture detection#1772
hohwille merged 7 commits intodevonfw:mainfrom
shodiBoy1:bugfix/1151-fix-arm-architecture-detection

Conversation

@shodiBoy1
Copy link
Contributor

This PR fixes #1151

Implemented changes:

  • GraalVM native image bakes System.getProperty("os.arch") at compile time, which can report wrong architecture if the binary runs on a different CPU than it was compiled on
  • On Mac/Linux, the fix calls uname -m at runtime to detect the actual CPU architecture instead of relying on the baked value
  • On Windows, falls back to os.arch since uname is not available
  • Updated test to not compare against os.arch directly, since uname -m can return different but equivalent names (e.g. x86_64 vs amd64)

Checklist for this PR

  • When running mvn clean test locally all tests pass and build is successful
  • PR title is of the form #«issue-id»: «brief summary» (e.g. #921: fixed setup.bat). If no issue ID exists, title only.
  • PR top-level comment summarizes what has been done and contains link to addressed issue(s)
  • PR and issue(s) have suitable labels
  • Issue is set to In Progress and assigned to you or there is no issue (might happen for very small PRs)
  • You followed all coding conventions
  • You have added the issue implemented by your PR in CHANGELOG.adoc unless issue is labeled
    with internal

@coveralls
Copy link
Collaborator

coveralls commented Mar 24, 2026

Pull Request Test Coverage Report for Build 23639809731

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.02%) to 70.443%

Files with Coverage Reduction New Missed Lines %
com/devonfw/tools/ide/os/SystemInfoImpl.java 1 90.24%
Totals Coverage Status
Change from base Build 23639744235: 0.02%
Covered Lines: 10795
Relevant Lines: 14717

💛 - Coveralls

@shodiBoy1 shodiBoy1 moved this from 🆕 New to Team Review in IDEasy board Mar 24, 2026
@shodiBoy1 shodiBoy1 added ARM ARM CPU support macOS specific for Apple MacOS labels Mar 24, 2026
@shodiBoy1 shodiBoy1 marked this pull request as ready for review March 24, 2026 21:14
@shodiBoy1 shodiBoy1 self-assigned this Mar 24, 2026
@shodiBoy1 shodiBoy1 added urls ide-urls repo and related processes and features download download of tools, plugins, code from git, any HTTP traffic over the network bugfix PR that fixes a bug issue and removed urls ide-urls repo and related processes and features labels Mar 24, 2026
@shodiBoy1 shodiBoy1 requested a review from hohwille March 24, 2026 21:17
Copy link
Member

@hohwille hohwille left a comment

Choose a reason for hiding this comment

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

@shodiBoy1 thanks for your PR and taking care of this neglected bug issue. 👍
Your solution/workaround seems fine to me and should work.
I also tested it in Ubuntu.
I left a small review comment at your test changes that I did not understand.
Please have a look. When resolved, we can merge.

@github-project-automation github-project-automation bot moved this from Team Review to 👀 In review in IDEasy board Mar 26, 2026
@hohwille hohwille added this to the release:2026.04.001 milestone Mar 26, 2026
@hohwille hohwille changed the title Bugfix/1151 fix arm architecture detection #1151: fix arm architecture detection Mar 26, 2026
@hohwille hohwille merged commit 58f4488 into devonfw:main Mar 27, 2026
4 checks passed
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in IDEasy board Mar 27, 2026
laert-ll pushed a commit to laert-ll/IDEasy that referenced this pull request Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ARM ARM CPU support bugfix PR that fixes a bug issue download download of tools, plugins, code from git, any HTTP traffic over the network macOS specific for Apple MacOS urls ide-urls repo and related processes and features

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

Mac on ARM thinks the architecture is x86 and therefore does not download arm64 releases causing poor performance

3 participants