Re: The introduction of Sequenced collections is not a source compatible change

2023-05-17 Thread Maurizio Cimadamore
On 17/05/2023 18:52, Maurizio Cimadamore wrote: I believe that would be an experiment worth doing (if you can!), and report back if you find any compilation problems. Ah - I missed this critical last line: P.S.: To be honest: I tried to pass "--release 21" when compiling Lucene and it

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-17 Thread Maurizio Cimadamore
On 17/05/2023 08:58, Uwe Schindler wrote: If we would change to Java 21 as compilation target, we may need to adapt our code. I believe that would be an experiment worth doing (if you can!), and report back if you find any compilation problems. E.g. using --release 17 effectively shields

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-17 Thread Joe Darcy
On 5/17/2023 7:07 AM, Ethan McCue wrote: > if they have setup their projects correctly. Can you be more clear about what "setup their projects correctly" means? If you are referring to usage of --release, you seem to be making a pretty strong argument that this will not be the case. Use

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-17 Thread Ethan McCue
t; most of the time, explicitly fixing the type argument instead of inferring > it make the code compile again. > So the house is not burning, but we should raise awareness of this issue > given that it may have a bigger impact than other source incompatible > changes that occur

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-17 Thread Uwe Schindler
incompatible changes that occur previously. Rémi *From: *"joe darcy" *To: *"Ethan McCue" , "Raffaello Giulietti" *Cc: *"Remi Forax" , "Stuart Marks" , "core-

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-16 Thread Alan Snyder
I have not seen any explanation of how this issue is going to be resolved. Given the new information, shouldn’t the CSR review be reopened to re-evaluate the cost/benefit analysis?

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-11 Thread Joseph D. Darcy
inal Message - From: "Stuart Marks" To: "Remi Forax" Cc: "core-libs-dev" Sent: Tuesday, May 2, 2023 2:44:28 AM Subject: Re: The introduction of Sequenced collections is not a source compatible change Hi Rémi, Thanks for trying out the latest buil

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-05 Thread Maurizio Cimadamore
List> list = Stream.of(nestedDequeue, nestedList).toList(); This one is cool because no 'var' is involved and using collect(Collectors.toList()) instead of toList() solves the inference problem. Rémi - Original Message - From: "Stuart Marks" To: "Remi Forax" Cc: "

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-05 Thread forax
ot; > To: "Ethan McCue" , "Raffaello Giulietti" > > Cc: "Remi Forax" , "Stuart Marks" > , > "core-libs-dev" > Sent: Friday, May 5, 2023 4:38:16 AM > Subject: Re: The introduction of Sequenced collections is not a source > c

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-05 Thread Tagir Valeev
of toList() solves the inference problem. > > Rémi > > - Original Message - > > From: "Stuart Marks" > > To: "Remi Forax" > > Cc: "core-libs-dev" > > Sent: Tuesday, May 2, 2023 2:44:28 AM > > Subject: Re: The introduction of

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-05 Thread Jens Lideström
rs.toList()) instead of toList() solves the inference problem. Rémi - Original Message - From: "Stuart Marks" To: "Remi Forax" Cc: "core-libs-dev" Sent: Tuesday, May 2, 2023 2:44:28 AM Subject: Re: The introduction of Sequenced collections is not a

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-04 Thread Ethan McCue
o me by a fellow French guy, > >>>> > >>>> final Deque nestedDequeue = new ArrayDeque<>(); > >>>> nestedDequeue.addFirst("C"); > >>>> nestedDequeue.addFirst("B"); > >>>> nestedDequeue.

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-04 Thread Joseph D. Darcy
"Remi Forax" Cc: "core-libs-dev" Sent: Tuesday, May 2, 2023 2:44:28 AM Subject: Re: The introduction of Sequenced collections is not a source compatible change Hi Rémi, Thanks for trying out the latest build! I'll make sure this gets mentioned in the release note for Sequenced

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-04 Thread -
t; list = Stream.of(nestedDequeue, >> > nestedList).toList(); >> > >> > This one is cool because no 'var' is involved and using >> > collect(Collectors.toList()) instead of toList() solves the inference >> > problem. >> > >> > Rémi >

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-04 Thread Joseph D. Darcy
g collect(Collectors.toList()) instead of toList() solves the inference problem. > > Rémi > > - Original Message - >> From: "Stuart Marks" >> To: "Remi Forax" >> Cc: "core-libs-dev" >>

Re: [External] : The introduction of Sequenced collections is not a source compatible change

2023-05-04 Thread Alan Snyder
This is an interesting issue, and it raises the question of how such issues are resolved. My impression is that historically source code compatibility was given a high weight. Is that not the case now? Although the example may be carefully constructed, my understanding is that the problem

Re: [External] : The introduction of Sequenced collections is not a source compatible change

2023-05-04 Thread Stuart Marks
The introduction of Sequenced Collections in JDK 21+20 did make a difference in this specific case. One can compile Rémi's example on JDK 21+19 successfully, but it will fail on JDK 21+20. Here's Rémi's example:     public static void m(List>> factories) {     }     public static void

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-04 Thread Ethan McCue
t; nestedList.add("F"); > > > > final List> list = Stream.of(nestedDequeue, > nestedList).toList(); > > > > This one is cool because no 'var' is involved and using > collect(Collectors.toList()) instead of toList() solves the inference > problem.

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-04 Thread Raffaello Giulietti
art Marks" To: "Remi Forax" Cc: "core-libs-dev" Sent: Tuesday, May 2, 2023 2:44:28 AM Subject: Re: The introduction of Sequenced collections is not a source compatible change Hi Rémi, Thanks for trying out the latest build! I'll make sure this gets mentioned

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-03 Thread forax
nference problem. Rémi - Original Message - > From: "Stuart Marks" > To: "Remi Forax" > Cc: "core-libs-dev" > Sent: Tuesday, May 2, 2023 2:44:28 AM > Subject: Re: The introduction of Sequenced collections is not a source > compatible

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-01 Thread Stuart Marks
Hi Rémi, Thanks for trying out the latest build! I'll make sure this gets mentioned in the release note for Sequenced Collections. We'll also raise this issue when we talk about this feature in the Quality Outreach program. s'marks On 4/29/23 3:46 AM, Remi Forax wrote: I've several

The introduction of Sequenced collections is not a source compatible change

2023-04-29 Thread Remi Forax
I've several repositories that now fails to compile with the latest jdk21, which introduces sequence collections. The introduction of a common supertype to existing collections is *not* a source compatible change because of type inference. Here is a simplified example: public static void