RFR: 7903672: Some issues with missing dependency errors
Jorn Vernee
jvernee at openjdk.org
Mon Feb 19 14:39:22 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).
-------------
Commit messages:
- MissingDepWarner + reorder passes
- add dummy field
- scan element types of array fields
- Only error on skipped dependencies, if the dependent is not skipped
Changes: https://git.openjdk.org/jextract/pull/217/files
Webrev: https://webrevs.openjdk.org/?repo=jextract&pr=217&range=00
Issue: https://bugs.openjdk.org/browse/CODETOOLS-7903672
Stats: 274 lines in 9 files changed: 246 ins; 24 del; 4 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