[foreign-preview] RFR: 8280527: Move jdk.incubator.foreign to java.lang.foreign [v6]

Maurizio Cimadamore mcimadamore at openjdk.java.net
Mon Jan 31 11:04:55 UTC 2022


On Fri, 28 Jan 2022 13:26:13 GMT, Julia Boes <jboes at openjdk.org> wrote:

>> To prepare for preview, this change removes the jdk.incubator.foreign module and moves the public classes to java.base/java.lang.foreign, implementation classes to java.base/jdk.internal.foreign respectively. 
>> 
>> While here, `SystemLookup` is replaced with the method `ClassLoader::findNative` and the methods in `MemoryHandles` are moved to `MethodHandles`. The `@PreviewFeature(feature=PreviewFeature.Feature.FOREIGN)` annotation and the `--enable-preview` flag are added were needed.
>
> Julia Boes has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 11 commits:
> 
>  - Merge foreign-preview
>  - fix copyright line
>  -  revert to static helper method for consistency
>  - refactor test helper method and some cleanup
>  - address PR comments
>  - remove leftover jdk.incubator files and fix some test config
>  - Merge branch 'foreign-preview' into foreign-preview-move-to-java-base
>  - Merge branch 'foreign-memaccess+abi' into foreign-preview-premerge
>  - remove patch file
>  - remove leftover jdk.incubator files
>  - ... and 1 more: https://git.openjdk.java.net/panama-foreign/compare/4dfd4caf...574804d6

Are you saying that we should block progress in making this API a preview API because _your_ IDE environment happens to be broken by said changes? (Note that these preview changes are actually in a different branch - if you want stable changes, look elsewhere). Maybe file a bug against Netbeans (but, in my experience, when using a new release version like 19 this early in the cycle, all IDEs are equally "borked" and it takes one or two updates to get that up and running). Anyway, hard to see how any of this is relevant with this PR.

> _Mailing list message from [Ty Young](mailto:youngty1997 at gmail.com) on [panama-dev](mailto:panama-dev at mail.openjdk.java.net):_
> 
> Thanks for this. It looks like Netbeans really doesn't like preview APIs and is going absolutely haywire with errors saying that I need to add --enable-preview when it's already added for both the compiler and runtime. It's so broken that it will no longer provide any suggestions to add a import for a class. It looks like Maven will compile it once I fix the hundred or so errors, but Netbeans is borked.
> 
> On 1/31/22 3:12 AM, Julia Boes wrote:

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

PR: https://git.openjdk.java.net/panama-foreign/pull/633


More information about the panama-dev mailing list