RFR: 8177650: JShell tool: packages in classpath don't appear in completions [v3]
Jan Lahoda
jlahoda at openjdk.org
Thu Aug 14 08:31:08 UTC 2025
> JShell provides the code completion feature, where it suggests possible follow ups for a given snippet prefix. To allow completion for packages, JShell uses a background task to go through known classes and create an index for them.
>
> There are two problems with this background task:
> - the classpath is read from the JShell's FileManager, but the FileManager may not be configured with the compile options yet, so the classpath may not be filled yet,
> - the module path is not included in the list of paths to paths to search
>
> This PR proposes to:
> - use FileManager configured by passing the compile options through javac
> - include the module path in the search path
Jan Lahoda has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision:
- Reading module paths directly from the FileManager, to avoid playing with JRT FS.
- Merge branch 'master' into JDK-8177650
- Avoiding problems with locked files on Windows.
- Correcting handling of modular paths.
- Improving test reliability.
- 8177650: JShell tool: packages in classpath don't appear in completions
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/26137/files
- new: https://git.openjdk.org/jdk/pull/26137/files/54eed125..b4e0b0f0
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=26137&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=26137&range=01-02
Stats: 69596 lines in 1762 files changed: 41124 ins; 19092 del; 9380 mod
Patch: https://git.openjdk.org/jdk/pull/26137.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/26137/head:pull/26137
PR: https://git.openjdk.org/jdk/pull/26137
More information about the compiler-dev
mailing list