Skip to content

Conversation

@okafke
Copy link
Member

@okafke okafke commented Jan 27, 2025

Added a GraalVM launcher for HeadlessMc

  • Added Java downloading capabilities (extensible, Temurin distribution only for now).
    • Had to add a large dependency on apache-commons-compress for tars
  • Pulled headlessmc-os and headlessmc-java out of the launcher (was not necessary in the end, because the graalvm module still depends on the launcher, but they make for good standalone-libraries)
  • Added a GraalVM launcher for HeadlessMc:
    • It simply runs the headlessmc-launcher-wrapper with a java executable it finds/downloads.
    • This approach has been chosen for three reasons:
      • Plugin support with GraalVM is challenging, potentially resolvable with Truffle?
      • In-memory launching is also problematic in the same way.
      • Current instrumentation loads classes to determine common superclasses for ASM.
        • It's a wonder this has not blown up yet: Imagine loading a class for a newer JVM version. Also, I do not think this actually loads the entire classpath, but just the jar, so it would also fail if the common superclass is in another jar. There's scope for developing an ASM-only analyzer to scan JAR files for common superclasses without loading them. This is noted as TODO for future improvement.
  • Bumped the project version to 2.5.0

@3arthqu4ke
Copy link
Member

This is a lot to go through, next time multiple commits, please.

Copy link
Member

@3arthqu4ke 3arthqu4ke left a comment

Choose a reason for hiding this comment

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

Awesome stuff, with some nitpicks. I think you can ignore codacy for now, I will clean this up a bit later.

@3arthqu4ke
Copy link
Member

And lots of failed tests?

@3arthqu4ke 3arthqu4ke self-requested a review January 27, 2025 22:04
Copy link
Member

@3arthqu4ke 3arthqu4ke left a comment

Choose a reason for hiding this comment

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

Thanks, will improve some of the code, add 1-2 features and release soon.

@3arthqu4ke
Copy link
Member

Codacy seems to have a problem and can be ignored for now.

@3arthqu4ke 3arthqu4ke merged commit 28456a1 into headlesshq:graalvm Jan 27, 2025
67 of 68 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants