Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8223413

Improve missing symbols handling in jextract

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • None
    • repo-panama
    • tools
    • None

      Currently jextract only do checking symbols if -l is specified on the command line, and it supports different options on how to deal with missing symbols via —missing-symbols.

      However, one option listed, warn, is missing implementation.

      With JDK-8223247, jextract now assumes we are using the default libraries within JVM if no -l option is provided. It makes sense to do symbol checking against default libraries for those case.

      Propose change of jextract to:

      - Check symbols remain same as current behavior if -l is specified.
      - Check symbols within default libraries if no -l is provided.
      - If a symbols is missing, handle accordingly based on the --missing-symbols option.
      - When --missing-symbols is not provided, default is to issue warnings if a symbol is missing when -l is not specified. Exclude otherwise.

      The new proposal only change behavior when -l is not specified, and it is mostly backward compatible as it doesn’t change generated code/classes, but show warnings to inform user about potential missing libraries.

      Use '—missing-symbols ignore’ to suppress the warning messages if current behavior is required.

            henryjen Henry Jen
            henryjen Henry Jen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: