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 faile

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 L

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 of

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

2023-05-17 Thread Ethan McCue
source incompatibility issue is not a big deal, as said in this thread, > 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

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

2023-05-17 Thread Uwe Schindler
it may have a bigger impact than other source incompatible changes that occur previously. Rémi *From: *"joe darcy" *To: *"Ethan McCue" , "Raffaello Giulietti" *Cc: *"Remi F

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
ce 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 change Hi Rémi, Thanks for tryi

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

2023-05-05 Thread Maurizio Cimadamore
inal 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&q

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

2023-05-05 Thread forax
. Rémi > From: "joe darcy" > 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

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

2023-05-05 Thread Tagir Valeev
ist()) 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

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

2023-05-05 Thread Jens Lideström
d using collect(Collectors.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 col

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

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

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

2023-05-04 Thread Joseph D. Darcy
"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 build! I'll make sure this gets mentione

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

2023-05-04 Thread -
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 Joseph D. Darcy
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: "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 surf

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 main(S

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 > pr

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

2023-05-04 Thread Raffaello Giulietti
"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 build! I'll make sure this

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

2023-05-03 Thread forax
lves 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 source > compa

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 reposit

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 m(L