RFR: 7903672: Some issues with missing dependency errors [v2]

Jorn Vernee jvernee at openjdk.org
Mon Feb 19 15:45:16 UTC 2024


> - Only error on missing dependencies, if the dependent is not skipped
> - Scan element types of arrays for missing dependencies as well
> - Don't issue warnings about unsupported types/fields for skipped elements
> 
> I've pulled the code that issues errors for missing dependencies into a separate phase (`MissingDepWarner`), since the control flow in some of the visitor methods was kinda tricky to follow if this stayed mixed in with the `IncludeFilter` code. The new phase just cleanly checks whether the visited element has a `Skip` on it and then returns at the start, before doing any work.
> 
> I've also re-ordered the phases a bit so that the phases that add Skips run first, so that we don't issue warnings/errors for things that are skipped any way by a later phase. Since `UnsupportedFilter` both adds Skips and issues warnings, it sits right in the middle.
> 
> Q: should we also return early in `NameMangler` if an element is skipped? (Right now it's just doing extra work).

Jorn Vernee has updated the pull request incrementally with one additional commit since the last revision:

  review comments

-------------

Changes:
  - all: https://git.openjdk.org/jextract/pull/217/files
  - new: https://git.openjdk.org/jextract/pull/217/files/fa6e182b..397360ee

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jextract&pr=217&range=01
 - incr: https://webrevs.openjdk.org/?repo=jextract&pr=217&range=00-01

  Stats: 210 lines in 3 files changed: 104 ins; 104 del; 2 mod
  Patch: https://git.openjdk.org/jextract/pull/217.diff
  Fetch: git fetch https://git.openjdk.org/jextract.git pull/217/head:pull/217

PR: https://git.openjdk.org/jextract/pull/217


More information about the jextract-dev mailing list