Skip to content

Normalize path output for --dump-includes#307

Open
xpple wants to merge 1 commit into
openjdk:masterfrom
xpple:normalize-path-output
Open

Normalize path output for --dump-includes#307
xpple wants to merge 1 commit into
openjdk:masterfrom
xpple:normalize-path-output

Conversation

@xpple

@xpple xpple commented Jul 25, 2026

Copy link
Copy Markdown

This PR normalizes the path output for --dump-includes.

  1. Currently, when using jextract with multiple header files, the path outputs for --dump-includes may not be normalized. For example, the output could be:
    #### Extracted from: [...]/mylib/dir/../header.h
    
    --include-constant CONSTANT # header: [...]/mylib/dir/../header.h
    
  2. This is problematic because one may wish to use tools like grep to filter based on known paths to header files.
  3. To resolve this, I simply added a normalize() call in IncludeHelper.java.

I didn't test the PR locally using jtreg, but the tests on GitHub Actions ran successfully. I did also confirm that the new output correctly normalizes each path:

#### Extracted from: [...]/mylib/header.h

--include-constant CONSTANT # header: [...]/mylib/header.h

Progress

  • Change must not contain extraneous whitespace
  • Change must be properly reviewed (no review required)

Errors

 ⚠️ OCA signatory status must be verified
 ⚠️ Pull request body is missing required line: - [x] I confirm that I make this contribution in accordance with the [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jextract.git pull/307/head:pull/307
$ git checkout pull/307

Update a local copy of the PR:
$ git checkout pull/307
$ git pull https://git.openjdk.org/jextract.git pull/307/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 307

View PR using the GUI difftool:
$ git pr show -t 307

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jextract/pull/307.diff

@bridgekeeper bridgekeeper Bot added the oca Needs verification of OCA signatory status label Jul 25, 2026
@bridgekeeper

bridgekeeper Bot commented Jul 25, 2026

Copy link
Copy Markdown

Hi @xpple, welcome to this OpenJDK project and thanks for contributing!

We do not recognize you as Contributor and need to ensure you have signed the Oracle Contributor Agreement (OCA). If you have not signed the OCA, please follow the instructions. Please fill in your GitHub username in the "Username" field of the application. Once you have signed the OCA, please let us know by writing /signed in a comment in this pull request.

If you already are an OpenJDK Author, Committer or Reviewer, please click here to open a new issue so that we can record that fact. Please use "Add GitHub user xpple" as summary for the issue.

If you are contributing this work on behalf of your employer and your employer has signed the OCA, please let us know by writing /covered in a comment in this pull request.

@openjdk

openjdk Bot commented Jul 25, 2026

Copy link
Copy Markdown

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@xpple

xpple commented Jul 25, 2026

Copy link
Copy Markdown
Author

I am not able to sign the OCA:

image

Since it's only a one line change, the change can probably be integrated through means other than this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

oca Needs verification of OCA signatory status

Development

Successfully merging this pull request may close these issues.

1 participant