You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@groovy.apache.org by Saravanan Palanichamy <ch...@gmail.com> on 2020/12/11 05:54:19 UTC

IDE support for multi assignment statements

Hello

I am using Groovy 3.0.5 and it supports multiple assignment statements from tuples when using static compile

    def(var1, var2) = Tuple.tuple("a", 1)

but it looks like the Intellij IDE still calls this out as a compile error. Also it defaults to identifying var1 and var2 as objects. This hinders code completion in subsequent code. Is this an issue for anyone else? or do I just have to upgrade my IDE? 

Re: IDE support for multi assignment statements

Posted by MG <mg...@arscreat.com>.
I don't know about RubyMine, but for IntelliJ Groovy support, uhm, yea, 
obviously, as you can see in the umbrella ticket I referenced: I created 
several tickets, asked people to upvote them if they cared about the 
issue, and over (an alas elongated period of) time things did get fixed G-)

On 11/12/2020 10:41, Dirk Heinrichs wrote:
> Am Freitag, den 11.12.2020, 10:29 +0100 schrieb MG:
>
>> If the newest IntelliJ version does not support what you need,
>> opening a ticket did help in the past
>
> Really? I have a RubyMine ticket open for more than 2 years now with 
> nothing happening... :-(
>
> Bye...
>
> Dirk
> -- 
> *Dirk Heinrichs*
> Senior Systems Engineer, Delivery Pipeline
> OpenText ™ Discovery | Recommind
> *Phone*: +49 2226 15966 18
> *Email*: dheinric@opentext.com <ma...@opentext.com>
> *Website*: www.recommind.de <www.recommind.de>
> Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
> Vertretungsberechtigte Geschäftsführer Gordon Davies, Madhu 
> Ranganathan, Christian Waida, Registergericht Amtsgericht Bonn, 
> Registernummer HRB 10646
> This e-mail may contain confidential and/or privileged information. If 
> you are not the intended recipient (or have received this e-mail in 
> error) please notify the sender immediately and destroy this e-mail. 
> Any unauthorized copying, disclosure or distribution of the material 
> in this e-mail is strictly forbidden
> Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte 
> Informationen. Wenn Sie nicht der richtige Adressat sind oder diese 
> E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den 
> Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie 
> die unbefugte Weitergabe dieser Mail sind nicht gestattet.


Re: IDE support for multi assignment statements

Posted by Dirk Heinrichs <dh...@opentext.com>.
Am Freitag, den 11.12.2020, 10:29 +0100 schrieb MG:

> If the newest IntelliJ version does not support what you need, 
> opening a ticket did help in the past

Really? I have a RubyMine ticket open for more than 2 years now with
nothing happening... :-(

Bye...

	Dirk
-- 
Dirk HeinrichsSenior Systems Engineer, Delivery PipelineOpenText ™ Discovery | RecommindPhone: +49 2226 15966 18Email: dheinric@opentext.comWebsite: www.recommind.deRecommind GmbH, Von-Liebig-Straße 1, 53359 RheinbachVertretungsberechtigte Geschäftsführer Gordon Davies, Madhu
Ranganathan, Christian Waida, Registergericht Amtsgericht Bonn,
Registernummer HRB 10646This e-mail may contain confidential and/or privileged information. If
you are not the intended recipient (or have received this e-mail in
error) please notify the sender immediately and destroy this e-mail.
Any unauthorized copying, disclosure or distribution of the material in
this e-mail is strictly forbiddenDiese E-Mail enthält vertrauliche und/oder rechtlich geschützte
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-
Mail irrtümlich erhalten haben, informieren Sie bitte sofort den
Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie
die unbefugte Weitergabe dieser Mail sind nicht gestattet.

Re: IDE support for multi assignment statements

Posted by MG <mg...@arscreat.com>.
Upvoted G-)
(I have thought about this, and in certain situations being able to have 
(Intellisense supported) multi-assignment would be beneficial in our 
framework, so it would definitely be good to have this)

Cheers,
mg

On 11/12/2020 23:47, Saravanan Palanichamy wrote:
> Thank you MG, I raised this ticket
>
> https://youtrack.jetbrains.com/issue/IDEA-257580 
> <https://youtrack.jetbrains.com/issue/IDEA-257580>
>
> regards
> Saravanan
>
> On Fri, Dec 11, 2020 at 8:59 PM MG <mgbiz@arscreat.com 
> <ma...@arscreat.com>> wrote:
>
>     You could try the newest version (2020.3), but if that does not
>     help, I would guess JetBrains might possibly not even be aware
>     that Groovy 3.x supports that feature. In that case creating a
>     ticket is imho your best option (there are people from Jetbrains
>     reading this ML, but they need a ticket to work on the issue*) - I
>     would recommend posting the ticket URL here, so people can upvote
>     - I sure will G-)
>
>     Cheers,
>     mg
>
>     *I would also recommend closely following the ticket guidelines,
>     i.e. describe current (erronous) state, and the expected behavior
>     - in short you want to make it easy for them to work on this.
>
>
>     On 11/12/2020 15:40, Saravanan Palanichamy wrote:
>>     Hi MG
>>
>>     I am using Intellij  IntelliJ IDEA 2020.2.3 (Community Edition)
>>     Build #IC-202.7660.26, built on October 6, 2020
>>
>>     I have attached the error as a picture. The intellij web page
>>     says 3.0 is supported. I am not sure what to make of it though.
>>     The code runs cleanly and as expected
>>
>>     https://www.jetbrains.com/help/idea/groovy.html
>>     <https://www.jetbrains.com/help/idea/groovy.html>
>>
>>     regards
>>     Saravanan
>>
>>     On Fri, Dec 11, 2020 at 2:59 PM MG <mgbiz@arscreat.com
>>     <ma...@arscreat.com>> wrote:
>>
>>         Hi Saravanan,
>>
>>         what IntelliJ version are you using ? We are not using multiple
>>         assignments in our code, but from my personal experience,
>>         IntelliJ can
>>         unfortunately sometimes be more than 2 years behind current
>>         Groovy
>>         features. If the newest IntelliJ version does not support
>>         what you need,
>>         opening a ticket did help in the past (see e.g.
>>         https://youtrack.jetbrains.com/issue/IDEA-193168
>>         <https://youtrack.jetbrains.com/issue/IDEA-193168>), but you
>>         have to be
>>         prepared to wait some time before seeing improvements.
>>         In addition to that, IntelliJ sometimes marks valid Groovy
>>         code as
>>         invalid, but reconsiders if one comments out the "offending"
>>         line(s),
>>         and then comments it in again (I assume doing this triggers a
>>         new
>>         Intellisense parser pass).
>>
>>         Interestingly afaik (disclaimer: I have not checked this
>>         recently, and
>>         we are still on Groovy 2.5.x), Groovy will treat e.g.
>>         var x = new Foo()
>>         and
>>         final x = new Foo()
>>         as x having type Object - it is just IntelliJ Intellisense
>>         that deduces
>>         x to be of type Foo*, thereby enabling auto completion, etc
>>         on x ;-)
>>
>>         Cheers,
>>         mg
>>
>>         *In all but the most obscure cases
>>
>>
>>         On 11/12/2020 06:54, Saravanan Palanichamy wrote:
>>         > Hello
>>         >
>>         > I am using Groovy 3.0.5 and it supports multiple assignment
>>         statements from tuples when using static compile
>>         >
>>         >      def(var1, var2) = Tuple.tuple("a", 1)
>>         >
>>         > but it looks like the Intellij IDE still calls this out as
>>         a compile error. Also it defaults to identifying var1 and
>>         var2 as objects. This hinders code completion in subsequent
>>         code. Is this an issue for anyone else? or do I just have to
>>         upgrade my IDE?
>>
>


Re: IDE support for multi assignment statements

Posted by Saravanan Palanichamy <ch...@gmail.com>.
Thank you MG, I raised this ticket

https://youtrack.jetbrains.com/issue/IDEA-257580

regards
Saravanan

On Fri, Dec 11, 2020 at 8:59 PM MG <mg...@arscreat.com> wrote:

> You could try the newest version (2020.3), but if that does not help, I
> would guess JetBrains might possibly not even be aware that Groovy 3.x
> supports that feature. In that case creating a ticket is imho your best
> option (there are people from Jetbrains reading this ML, but they need a
> ticket to work on the issue*) - I would recommend posting the ticket URL
> here, so people can upvote - I sure will G-)
>
> Cheers,
> mg
>
> *I would also recommend closely following the ticket guidelines, i.e.
> describe current (erronous) state, and the expected behavior - in short you
> want to make it easy for them to work on this.
>
>
> On 11/12/2020 15:40, Saravanan Palanichamy wrote:
>
> Hi MG
>
> I am using Intellij  IntelliJ IDEA 2020.2.3 (Community Edition)
> Build #IC-202.7660.26, built on October 6, 2020
>
> I have attached the error as a picture. The intellij web page says 3.0 is
> supported. I am not sure what to make of it though. The code runs cleanly
> and as expected
>
> https://www.jetbrains.com/help/idea/groovy.html
>
> regards
> Saravanan
>
> On Fri, Dec 11, 2020 at 2:59 PM MG <mg...@arscreat.com> wrote:
>
>> Hi Saravanan,
>>
>> what IntelliJ version are you using ? We are not using multiple
>> assignments in our code, but from my personal experience, IntelliJ can
>> unfortunately sometimes be more than 2 years behind current Groovy
>> features. If the newest IntelliJ version does not support what you need,
>> opening a ticket did help in the past (see e.g.
>> https://youtrack.jetbrains.com/issue/IDEA-193168), but you have to be
>> prepared to wait some time before seeing improvements.
>> In addition to that, IntelliJ sometimes marks valid Groovy code as
>> invalid, but reconsiders if one comments out the "offending" line(s),
>> and then comments it in again (I assume doing this triggers a new
>> Intellisense parser pass).
>>
>> Interestingly afaik (disclaimer: I have not checked this recently, and
>> we are still on Groovy 2.5.x), Groovy will treat e.g.
>> var x = new Foo()
>> and
>> final x = new Foo()
>> as x having type Object - it is just IntelliJ Intellisense that deduces
>> x to be of type Foo*, thereby enabling auto completion, etc on x ;-)
>>
>> Cheers,
>> mg
>>
>> *In all but the most obscure cases
>>
>>
>> On 11/12/2020 06:54, Saravanan Palanichamy wrote:
>> > Hello
>> >
>> > I am using Groovy 3.0.5 and it supports multiple assignment statements
>> from tuples when using static compile
>> >
>> >      def(var1, var2) = Tuple.tuple("a", 1)
>> >
>> > but it looks like the Intellij IDE still calls this out as a compile
>> error. Also it defaults to identifying var1 and var2 as objects. This
>> hinders code completion in subsequent code. Is this an issue for anyone
>> else? or do I just have to upgrade my IDE?
>>
>>
>

Re: IDE support for multi assignment statements

Posted by MG <mg...@arscreat.com>.
You could try the newest version (2020.3), but if that does not help, I 
would guess JetBrains might possibly not even be aware that Groovy 3.x 
supports that feature. In that case creating a ticket is imho your best 
option (there are people from Jetbrains reading this ML, but they need a 
ticket to work on the issue*) - I would recommend posting the ticket URL 
here, so people can upvote - I sure will G-)

Cheers,
mg

*I would also recommend closely following the ticket guidelines, i.e. 
describe current (erronous) state, and the expected behavior - in short 
you want to make it easy for them to work on this.


On 11/12/2020 15:40, Saravanan Palanichamy wrote:
> Hi MG
>
> I am using Intellij  IntelliJ IDEA 2020.2.3 (Community Edition)
> Build #IC-202.7660.26, built on October 6, 2020
>
> I have attached the error as a picture. The intellij web page says 3.0 
> is supported. I am not sure what to make of it though. The code runs 
> cleanly and as expected
>
> https://www.jetbrains.com/help/idea/groovy.html 
> <https://www.jetbrains.com/help/idea/groovy.html>
>
> regards
> Saravanan
>
> On Fri, Dec 11, 2020 at 2:59 PM MG <mgbiz@arscreat.com 
> <ma...@arscreat.com>> wrote:
>
>     Hi Saravanan,
>
>     what IntelliJ version are you using ? We are not using multiple
>     assignments in our code, but from my personal experience, IntelliJ
>     can
>     unfortunately sometimes be more than 2 years behind current Groovy
>     features. If the newest IntelliJ version does not support what you
>     need,
>     opening a ticket did help in the past (see e.g.
>     https://youtrack.jetbrains.com/issue/IDEA-193168
>     <https://youtrack.jetbrains.com/issue/IDEA-193168>), but you have
>     to be
>     prepared to wait some time before seeing improvements.
>     In addition to that, IntelliJ sometimes marks valid Groovy code as
>     invalid, but reconsiders if one comments out the "offending" line(s),
>     and then comments it in again (I assume doing this triggers a new
>     Intellisense parser pass).
>
>     Interestingly afaik (disclaimer: I have not checked this recently,
>     and
>     we are still on Groovy 2.5.x), Groovy will treat e.g.
>     var x = new Foo()
>     and
>     final x = new Foo()
>     as x having type Object - it is just IntelliJ Intellisense that
>     deduces
>     x to be of type Foo*, thereby enabling auto completion, etc on x ;-)
>
>     Cheers,
>     mg
>
>     *In all but the most obscure cases
>
>
>     On 11/12/2020 06:54, Saravanan Palanichamy wrote:
>     > Hello
>     >
>     > I am using Groovy 3.0.5 and it supports multiple assignment
>     statements from tuples when using static compile
>     >
>     >      def(var1, var2) = Tuple.tuple("a", 1)
>     >
>     > but it looks like the Intellij IDE still calls this out as a
>     compile error. Also it defaults to identifying var1 and var2 as
>     objects. This hinders code completion in subsequent code. Is this
>     an issue for anyone else? or do I just have to upgrade my IDE?
>


Re: IDE support for multi assignment statements

Posted by Saravanan Palanichamy <ch...@gmail.com>.
Hi MG

I am using Intellij  IntelliJ IDEA 2020.2.3 (Community Edition)
Build #IC-202.7660.26, built on October 6, 2020

I have attached the error as a picture. The intellij web page says 3.0 is
supported. I am not sure what to make of it though. The code runs cleanly
and as expected

https://www.jetbrains.com/help/idea/groovy.html

regards
Saravanan

On Fri, Dec 11, 2020 at 2:59 PM MG <mg...@arscreat.com> wrote:

> Hi Saravanan,
>
> what IntelliJ version are you using ? We are not using multiple
> assignments in our code, but from my personal experience, IntelliJ can
> unfortunately sometimes be more than 2 years behind current Groovy
> features. If the newest IntelliJ version does not support what you need,
> opening a ticket did help in the past (see e.g.
> https://youtrack.jetbrains.com/issue/IDEA-193168), but you have to be
> prepared to wait some time before seeing improvements.
> In addition to that, IntelliJ sometimes marks valid Groovy code as
> invalid, but reconsiders if one comments out the "offending" line(s),
> and then comments it in again (I assume doing this triggers a new
> Intellisense parser pass).
>
> Interestingly afaik (disclaimer: I have not checked this recently, and
> we are still on Groovy 2.5.x), Groovy will treat e.g.
> var x = new Foo()
> and
> final x = new Foo()
> as x having type Object - it is just IntelliJ Intellisense that deduces
> x to be of type Foo*, thereby enabling auto completion, etc on x ;-)
>
> Cheers,
> mg
>
> *In all but the most obscure cases
>
>
> On 11/12/2020 06:54, Saravanan Palanichamy wrote:
> > Hello
> >
> > I am using Groovy 3.0.5 and it supports multiple assignment statements
> from tuples when using static compile
> >
> >      def(var1, var2) = Tuple.tuple("a", 1)
> >
> > but it looks like the Intellij IDE still calls this out as a compile
> error. Also it defaults to identifying var1 and var2 as objects. This
> hinders code completion in subsequent code. Is this an issue for anyone
> else? or do I just have to upgrade my IDE?
>
>

Re: IDE support for multi assignment statements

Posted by MG <mg...@arscreat.com>.
Hi Saravanan,

what IntelliJ version are you using ? We are not using multiple 
assignments in our code, but from my personal experience, IntelliJ can 
unfortunately sometimes be more than 2 years behind current Groovy 
features. If the newest IntelliJ version does not support what you need, 
opening a ticket did help in the past (see e.g. 
https://youtrack.jetbrains.com/issue/IDEA-193168), but you have to be 
prepared to wait some time before seeing improvements.
In addition to that, IntelliJ sometimes marks valid Groovy code as 
invalid, but reconsiders if one comments out the "offending" line(s), 
and then comments it in again (I assume doing this triggers a new 
Intellisense parser pass).

Interestingly afaik (disclaimer: I have not checked this recently, and 
we are still on Groovy 2.5.x), Groovy will treat e.g.
var x = new Foo()
and
final x = new Foo()
as x having type Object - it is just IntelliJ Intellisense that deduces 
x to be of type Foo*, thereby enabling auto completion, etc on x ;-)

Cheers,
mg

*In all but the most obscure cases


On 11/12/2020 06:54, Saravanan Palanichamy wrote:
> Hello
>
> I am using Groovy 3.0.5 and it supports multiple assignment statements from tuples when using static compile
>
>      def(var1, var2) = Tuple.tuple("a", 1)
>
> but it looks like the Intellij IDE still calls this out as a compile error. Also it defaults to identifying var1 and var2 as objects. This hinders code completion in subsequent code. Is this an issue for anyone else? or do I just have to upgrade my IDE?