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

Provide GraalVM metadata and substitutions #1357

Draft
wants to merge 14 commits into
base: master
Choose a base branch
from

Commits on Apr 3, 2024

  1. Configuration menu
    Copy the full SHA
    e249c02 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    61c0127 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f7ffe8a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    db998ac View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    92ac5ae View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    7b10c60 View commit details
    Browse the repository at this point in the history

Commits on Apr 5, 2024

  1. Do minor improvements

    - Improve logging
    - Use `clean` instead of `:graalvm-native-image-app:clean` in `readme.md`
    
    JAVA-5219
    stIncMale committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    18a1496 View commit details
    Browse the repository at this point in the history

Commits on Apr 7, 2024

  1. Remove Snappy-related GraalVM substitutions

    Given that the snappy compressor
    works in GraalVM, we don't need any substitutions for it.
    
    JAVA-5219
    stIncMale committed Apr 7, 2024
    Configuration menu
    Copy the full SHA
    261841a View commit details
    Browse the repository at this point in the history
  2. Move shared library resource entries to :graalvm-native-image-app

    Having these entries results in a larger native image,
    even if the shared libraries are not used by
    the application. Therefore, we won't supply
    the entries with our JARs, but will document
    this for users and propose the `resource-config.json`
    in :graalvm-native-image-app as an example
    where users may pick the necessary entries from
    if need be.
    
    JAVA-5219
    stIncMale committed Apr 7, 2024
    Configuration menu
    Copy the full SHA
    fe51f0e View commit details
    Browse the repository at this point in the history

Commits on Apr 8, 2024

  1. Add JDK-specific reachability metadata to `org.mongodb:mongodb-driver…

    …-core`
    
    Without this metadata an application using
    the driver won't work, and there is no other
    place this metadata may come from, unless
    it is gathered via the GraalVM tracing agent.
    
    It's weird that we have to include reachability
    metadata specific to JDK, but there is
    nothing to do about it, other than saying that
    users are to collect the metadata for their
    applications themselves. The latter actually
    seems like the only right way to do this, but it
    conflicts with the fact that there is Oracle's
    reachability metadata repository
    (https://github.com/oracle/graalvm-reachability-metadata).
    
    JAVA-5219
    stIncMale committed Apr 8, 2024
    Configuration menu
    Copy the full SHA
    7c8b08a View commit details
    Browse the repository at this point in the history
  2. Refactor UnixServerAddress substitutions

    Throwing from the constructor of `UnixServerAddress`
    seems better than from `SocketStreamFactory.create`. Not only this is more natural,
    but it also prevents the creation
    of a `MongoClient`, which wasn't he case previously.
    
    JAVA-5219
    stIncMale committed Apr 8, 2024
    Configuration menu
    Copy the full SHA
    3929143 View commit details
    Browse the repository at this point in the history

Commits on Apr 22, 2024

  1. Remove reactor.core/util entries

    Entries were removed from `graalvm-native-image-app/src/main/resources/META-INF/native-image/reflect-config.json` as
    `NativeImageApp` works without them
    
    JAVA-5219
    stIncMale committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    77cb614 View commit details
    Browse the repository at this point in the history

Commits on May 1, 2024

  1. Improve the tracing agent configuration

    JAVA-5219
    stIncMale committed May 1, 2024
    Configuration menu
    Copy the full SHA
    a244a63 View commit details
    Browse the repository at this point in the history
  2. Properly rearrange metadata based on the metadata origins

    Goes to mongodb-crypt from driver-core/src/main/resources/META-INF/native-image/reflect-config.json:
    
    {
      "name":"boolean",
      "fields":[{"name":"OPTIONS"}, {"name":"STRING_ENCODING"}, {"name":"STRUCTURE_ALIGNMENT"}, {"name":"TYPE_MAPPER"}]
    },
    {
      "name":"com.sun.crypto.provider.AESCipher$General",
      "methods":[{"name":"<init>","parameterTypes":[] }]
    },
    {
      "name":"com.sun.crypto.provider.HmacCore$HmacSHA256",
      "methods":[{"name":"<init>","parameterTypes":[] }]
    },
    {
      "name":"com.sun.crypto.provider.HmacCore$HmacSHA512",
      "methods":[{"name":"<init>","parameterTypes":[] }]
    },
    {
      "name":"int",
      "fields":[{"name":"OPTIONS"}, {"name":"STRING_ENCODING"}, {"name":"STRUCTURE_ALIGNMENT"}, {"name":"TYPE_MAPPER"}]
    },
    {
      "name":"java.lang.Throwable",
      "methods":[{"name":"addSuppressed","parameterTypes":["java.lang.Throwable"] }]
    },
    {
      "name":"java.lang.reflect.Method",
      "methods":[{"name":"isVarArgs","parameterTypes":[] }]
    },
    {
      "name":"java.nio.Buffer"
    },
    {
      "name":"long",
      "fields":[{"name":"OPTIONS"}, {"name":"STRING_ENCODING"}, {"name":"STRUCTURE_ALIGNMENT"}, {"name":"TYPE_MAPPER"}]
    },
    // NativePRNG also stays in driver-core
    {
      "name":"sun.security.provider.NativePRNG",
      "methods":[{"name":"<init>","parameterTypes":[] }, {"name":"<init>","parameterTypes":["java.security.SecureRandomParameters"] }]
    },
    {
      "name":"sun.security.provider.SHA2$SHA256",
      "methods":[{"name":"<init>","parameterTypes":[] }]
    },
    {
      "name":"sun.security.provider.SHA5$SHA512",
      "methods":[{"name":"<init>","parameterTypes":[] }]
    },
    {
      "name":"void",
      "fields":[{"name":"OPTIONS"}, {"name":"STRING_ENCODING"}, {"name":"STRUCTURE_ALIGNMENT"}, {"name":"TYPE_MAPPER"}]
    },
    
    Goes to mongodb-crypt from graalvm-native-image-app/src/main/resources/META-INF/native-image/reflect-config.json
    
    {
      "name":"org.slf4j.Logger"
    },
    
    Goes to graalvm-native-image-app/build/native/agent-output/run/reflect-config.json from driver-core/src/main/resources/META-INF/native-image/reflect-config.json
    
    {
      "name":"com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl",
      "methods":[{"name":"<init>","parameterTypes":[] }]
    },
    {
      "name":"java.io.FilePermission"
    },
    {
      "name":"java.lang.RuntimePermission"
    },
    {
      "name":"java.net.NetPermission"
    },
    {
      "name":"java.net.SocketPermission"
    },
    {
      "name":"java.net.URLPermission",
      "methods":[{"name":"<init>","parameterTypes":["java.lang.String","java.lang.String"] }]
    },
    {
      "name":"java.security.AllPermission"
    },
    {
      "name":"java.security.SecurityPermission"
    },
    {
      "name":"java.util.PropertyPermission"
    },
    {
      "name":"java.util.concurrent.atomic.AtomicBoolean",
      "fields":[{"name":"value"}]
    },
    {
      "name":"java.util.concurrent.atomic.AtomicReference",
      "fields":[{"name":"value"}]
    },
    {
      "name":"javax.smartcardio.CardPermission"
    },
    
    Goes to bson/src/main/resources/META-INF/native-image/reflect-config.json from driver-core/src/main/resources/META-INF/native-image/reflect-config.json
    
    {
      "name":"java.lang.Object",
      "queryAllDeclaredMethods":true
    },
    
    Goes to bson/src/main/resources/META-INF/native-image/reflect-config.json from graalvm-native-image-app/src/main/resources/META-INF/native-image/reflect-config.json
    
    {
      "name":"org.slf4j.Logger"
    },
    
    Goes to driver-core/src/main/resources/META-INF/native-image/reflect-config.json from graalvm-native-image-app/src/main/resources/META-INF/native-image/reflect-config.json
    
    {
      "name":"org.slf4j.Logger"
    },
    
    JAVA-5219
    stIncMale committed May 1, 2024
    Configuration menu
    Copy the full SHA
    3bc66d2 View commit details
    Browse the repository at this point in the history