[foreign] thoughts on finalizing foreign APIs

Uwe Schindler uschindler at apache.org
Sat Sep 18 10:24:37 UTC 2021


Hi Maurizio,

I did not find the PR yesterday, otherwise I would have commented there, but now I am aware of it. I will check it out and test later and report any issues with performance or other API issues back.

Uwe

-----
Uwe Schindler
uschindler at apache.org 
ASF Member, Member of PMC and Committer of Apache Lucene and Apache Solr
Bremen, Germany
https://lucene.apache.org/
https://solr.apache.org/

> -----Original Message-----
> From: Maurizio Cimadamore <maurizio.cimadamore at oracle.com>
> Sent: Friday, September 17, 2021 1:35 PM
> To: Uwe Schindler <uschindler at apache.org>; panama-dev at openjdk.java.net
> Subject: Re: [foreign] thoughts on finalizing foreign APIs
> 
> Thanks for the comment - I will fix in the PR!
> 
> Cheers
> Maurizio
> 
> On 17/09/2021 12:32, Uwe Schindler wrote:
> > Hi Maurizio,
> >
> > Thanks, great new API. I fully agree (see also other response in this thread)!
> >
> > When reviewing the API, I found a small problem (I think it already exists in
> JDK 17): The return value of method "MemorySegment#mapFile(...)" has a
> wrong description of the @return value: It says that the scope is "confined",
> which is wrong. It uses the scope given as parameter! The @return should
> possibly be copied over from the other static "allocate" methods taking a
> ResourceScope.
> >
> > Uwe
> >
> > -----
> > Uwe Schindler
> > uschindler at apache.org
> > ASF Member, Member of PMC and Committer of Apache Lucene and Apache
> Solr
> > Bremen, Germany
> >
> https://urldefense.com/v3/__https://lucene.apache.org/__;!!ACWV5N9M2RV9
> 9hQ!c1P6c9-690NCzI4q5XZdBH_cpPs6aPqyux2bp9egMSXE5tTCK6-
> fDhPU3J3BJKbxAdbvR88$
> >
> https://urldefense.com/v3/__https://solr.apache.org/__;!!ACWV5N9M2RV99h
> Q!c1P6c9-690NCzI4q5XZdBH_cpPs6aPqyux2bp9egMSXE5tTCK6-
> fDhPU3J3BJKbxpwO-Z7w$
> >
> >> -----Original Message-----
> >> From: panama-dev <panama-dev-retn at openjdk.java.net> On Behalf Of
> >> Maurizio Cimadamore
> >> Sent: Thursday, September 16, 2021 4:59 PM
> >> To: panama-dev at openjdk.java.net
> >> Subject: [foreign] thoughts on finalizing foreign APIs
> >>
> >> Hi,
> >> we have spent the last few weeks looking at the foreign APIs more
> >> holistically, to see what we could do to improve them, in order to get
> >> them preview/finalization ready. The resulting changes are described in
> >> the following write up:
> >>
> >> https://urldefense.com/v3/__https://inside.java/2021/09/16/finalizing-the-
> foreign-apis/__;!!ACWV5N9M2RV99hQ!c1P6c9-
> 690NCzI4q5XZdBH_cpPs6aPqyux2bp9egMSXE5tTCK6-
> fDhPU3J3BJKbxmXotFRA$
> >>
> >> We think the proposed API [2, 3] is much simpler, tighter and safer -
> >> while retaining the same expressiveness of the existing API.
> >>
> >> Moving forward, we would like to start integrating the proposed changes
> >> into the panama repo, and incubate those changes in 18. We will then
> >> (finger crossed!) move towards finalizing the API, by making it a
> >> preview API in 19 (the document describes some basic shuffling moves on
> >> how we might want to do that). While we could technically preview things
> >> in 18, we believe that the extra steps required to move the API into
> >> java.base would push us too close to the code freeze deadline; besides
> >> there are still outstanding performance issues (such as [1]) which we'd
> >> like to have addressed, so that user experience can be as smooth as
> >> possible. For these reasons, incubating in 18 and previewing in 19 seems
> >> like the most sensible option at this point in time.
> >>
> >> Cheers
> >> Maurizio
> >>
> >> [1] - https://bugs.openjdk.java.net/browse/JDK-8259609
> >> [2] -
> >> http://cr.openjdk.java.net/~mcimadamore/panama/foreign-finalize-
> >> javadoc/javadoc/jdk/incubator/foreign/package-summary.html
> >> [3] -
> >> https://urldefense.com/v3/__https://github.com/mcimadamore/panama-
> foreign/tree/foreign-__;!!ACWV5N9M2RV99hQ!c1P6c9-
> 690NCzI4q5XZdBH_cpPs6aPqyux2bp9egMSXE5tTCK6-fDhPU3J3BJKbxGs--Xbc$
> >> finalize%2Bjextract
> >



More information about the panama-dev mailing list