Re: How to specify a default array value for annotation attribute with static compilation?

2021-03-09 Thread Szymon Stępniak
You might actually don't need the @CompileStatic annotation in this
example. Here is what the bytecode decompiled to the Java class looks like
(an example without static compilation enabled):

//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

public @interface SomeAnnotation {
Class[] someAttribute() default {};
}


This is exactly what you could expect from using static compilation.
However, if your annotation has some other methods where using the static
compilation useful, you can annotate problematic method
with @CompileDynamic, something like this:

import groovy.transform.CompileDynamic
import groovy.transform.CompileStatic

@CompileStatic
@interface SomeAnnotation {

@CompileDynamic
Class[] someAttribute() default []
}


On Tue, Mar 9, 2021 at 12:30 PM Damir Murat  wrote:

> Without static compilation, annotation defined as bellow works as expected:
>
> @interface SomeAnnitation {
>  Class[] someAttribute default []
> }
>
> However, with static compilation,
>
> @CompileStatic
> @interface SomeAnnitation {
>  Class[] someAttribute default []
> }
>
> I'm getting an error saying "Cannot return value of type java.util.List  extends java.lang.Object> on method returning type java.lang.Class []"
>
> I tried several things but failed. Is there a way to do this in Groovy, or
> should I just create the annotation in Java?
>
> Tnx,
> Damir Murat
>


Re: 2020 Groovy Ecosystem Usage Report - I need your help

2020-09-14 Thread Szymon Stępniak
Hello everyone!

I just published a blog post with the survey's summary. Feel free to
comment and share your thoughts about the results.

https://e.printstacktrace.blog/groovy-ecosystem-usage-report-2020/

Best,
Szymon


On Mon, Sep 7, 2020 at 10:19 AM Szymon Stępniak 
wrote:

> Hello everyone!
>
> I want to share with you a quick update on the 2020 Groovy Ecosystem Usage
> Report survey. 254 responses collected in the 10 days - that's impressive!
> But I know we can do better. If you haven't cast your vote yet, here's the
> link to the survey - https://bit.ly/2020-groovy-ecosystem-usage-report It
> won't consume a lot of your time - as Dierk König said, it's a 30-sec
> survey <https://twitter.com/mittie/status/1302854113747705856> with a
> single multichoice question.
>
> I will keep the survey open a few more days, and then I will publish raw
> results + some aggregated information in the form of a blog post. The more
> information we get, the more accurate might be.
>
> Thank you so much for your help, and have a Groovy day! :-)
> Szymon
>
>
> On Fri, Aug 28, 2020 at 6:36 PM Szymon Stępniak 
> wrote:
>
>> Hello everyone!
>>
>> I want to ask you for help. I run into an idea today to research and
>> collect information about the usage of various frameworks, libraries, and
>> tools in the Groovy ecosystem in 2020. I create a one-question survey
>> (multiple choice) and I would like to invite you to participate in this
>> research. The survey is anonymous and it will take you less than a minute
>> to fill it out. Here's the link:
>>
>> https://bit.ly/2020-groovy-ecosystem-usage-report
>>
>> In about a week or two, I will publish raw results as well as a short
>> blog post that summarizes it.
>>
>> I will be grateful if you can help me.
>>
>> Thanks in advance, have a great weekend!
>> Szymon
>>
>


Re: 2020 Groovy Ecosystem Usage Report - I need your help

2020-09-07 Thread Szymon Stępniak
Hello everyone!

I want to share with you a quick update on the 2020 Groovy Ecosystem Usage
Report survey. 254 responses collected in the 10 days - that's impressive!
But I know we can do better. If you haven't cast your vote yet, here's the
link to the survey - https://bit.ly/2020-groovy-ecosystem-usage-report It
won't consume a lot of your time - as Dierk König said, it's a 30-sec survey
<https://twitter.com/mittie/status/1302854113747705856> with a single
multichoice question.

I will keep the survey open a few more days, and then I will publish raw
results + some aggregated information in the form of a blog post. The more
information we get, the more accurate might be.

Thank you so much for your help, and have a Groovy day! :-)
Szymon


On Fri, Aug 28, 2020 at 6:36 PM Szymon Stępniak 
wrote:

> Hello everyone!
>
> I want to ask you for help. I run into an idea today to research and
> collect information about the usage of various frameworks, libraries, and
> tools in the Groovy ecosystem in 2020. I create a one-question survey
> (multiple choice) and I would like to invite you to participate in this
> research. The survey is anonymous and it will take you less than a minute
> to fill it out. Here's the link:
>
> https://bit.ly/2020-groovy-ecosystem-usage-report
>
> In about a week or two, I will publish raw results as well as a short blog
> post that summarizes it.
>
> I will be grateful if you can help me.
>
> Thanks in advance, have a great weekend!
> Szymon
>


Re: 2020 Groovy Ecosystem Usage Report - I need your help

2020-08-29 Thread Szymon Stępniak
Great, thanks MG!

104 people answered up to this moment, which is a surprisingly good result.
I hope we can get even more, so the data reflects the reality better :)

Best,
Szymon

On Fri, Aug 28, 2020 at 7:29 PM MG  wrote:

> Hi Szymon,
>
> happy to participate, it literally took me under 30 seconds to do this.
>
> Just one question: I was not sure whether "Other" strictly meant "other
> Groovy based frameworks", so I put "Vaadin, Ebean" there, which are of
> course both not using Groovy, but which we use all the time with Groovy,
> and have found to play well with it*, especially when wrapped in a
> little Groovy closure magic :-)
>
> Cheers,
> mg
>
> *with the only exception of Ebean not seeing Groovy trait added class
> properties - not a big deal for me, and might work in a newer Ebean
> version than the one we use...
>
>
> On 28/08/2020 18:36, Szymon Stępniak wrote:
> > Hello everyone!
> >
> > I want to ask you for help. I run into an idea today to research and
> > collect information about the usage of various frameworks, libraries,
> > and tools in the Groovy ecosystem in 2020. I create a one-question
> > survey (multiple choice) and I would like to invite you to participate
> > in this research. The survey is anonymous and it will take you less
> > than a minute to fill it out. Here's the link:
> >
> > https://bit.ly/2020-groovy-ecosystem-usage-report
> >
> > In about a week or two, I will publish raw results as well as a short
> > blog post that summarizes it.
> >
> > I will be grateful if you can help me.
> >
> > Thanks in advance, have a great weekend!
> > Szymon
>
>


2020 Groovy Ecosystem Usage Report - I need your help

2020-08-28 Thread Szymon Stępniak
Hello everyone!

I want to ask you for help. I run into an idea today to research and
collect information about the usage of various frameworks, libraries, and
tools in the Groovy ecosystem in 2020. I create a one-question survey
(multiple choice) and I would like to invite you to participate in this
research. The survey is anonymous and it will take you less than a minute
to fill it out. Here's the link:

https://bit.ly/2020-groovy-ecosystem-usage-report

In about a week or two, I will publish raw results as well as a short blog
post that summarizes it.

I will be grateful if you can help me.

Thanks in advance, have a great weekend!
Szymon