Compile error when using guava-r05.jar

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Compile error when using guava-r05.jar

Tom Pines
Hello,

Google has transitioned their Collections API http://code.google.com/p/google-collections/ into Guave http://code.google.com/p/guava-libraries/ and added a new Constraint class.

Would you mind updating org.carrot2.util.attribute.AttributeDescriptor to fully qualify the org.carrot2.util.attribute.constraint.Constraint import ?

It would eliminate the following error when compiling with the Guave jar:

org\carrot2\util\attribute\AttributeDescriptor.java:116: reference to Constraint is ambiguous, both class com.google.common.collect.Constraint in com.google.common
.collect and class org.carrot2.util.attribute.constraint.Constraint in org.carrot2.util.attribute.constraint match
    [javac]     private ArrayList<Constraint> constraintInstances;


Thanks,
Tom
Reply | Threaded
Open this post in threaded view
|

Re: Compile error when using guava-r05.jar

Dawid Weiss-2
Hi Tom,

I think we can add an explicit import first, this should solve the
import conflict. I'll add an issue of moving to Guava, but this will
take some time since we need to review all the dependencies (including
proprietary algorithm deps.).

http://issues.carrot2.org/browse/CARROT-685

Dawid

On Fri, Jun 18, 2010 at 10:54 PM, Tom Pines <[hidden email]> wrote:

>
> Hello,
>
> Google has transitioned their Collections API
> http://code.google.com/p/google-collections/ into Guave
> http://code.google.com/p/guava-libraries/ and added a new Constraint class.
>
> Would you mind updating org.carrot2.util.attribute.AttributeDescriptor to
> fully qualify the org.carrot2.util.attribute.constraint.Constraint import ?
>
> It would eliminate the following error when compiling with the Guave jar:
>
> org\carrot2\util\attribute\AttributeDescriptor.java:116: reference to
> Constraint is ambiguous, both class com.google.common.collect.Constraint in
> com.google.common
> .collect and class org.carrot2.util.attribute.constraint.Constraint in
> org.carrot2.util.attribute.constraint match
>    [javac]     private ArrayList<Constraint> constraintInstances;
>
>
> Thanks,
> Tom
> --
> View this message in context: http://carrot2-users-and-developers-forum.607571.n2.nabble.com/Compile-error-when-using-guava-r05-jar-tp5196937p5196937.html
> Sent from the Carrot2 Users and Developers Forum mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit.  See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> Carrot2-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/carrot2-developers
>

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers
Reply | Threaded
Open this post in threaded view
|

Re: Compile error when using guava-r05.jar

Dawid Weiss-2
I've added explicit imports in the trunk (looked only at
AttributeDescriptor). There may be other classes that have the same
glob-import pattern though.

D.

On Sat, Jun 19, 2010 at 11:06 AM, Dawid Weiss
<[hidden email]> wrote:

> Hi Tom,
>
> I think we can add an explicit import first, this should solve the
> import conflict. I'll add an issue of moving to Guava, but this will
> take some time since we need to review all the dependencies (including
> proprietary algorithm deps.).
>
> http://issues.carrot2.org/browse/CARROT-685
>
> Dawid
>
> On Fri, Jun 18, 2010 at 10:54 PM, Tom Pines <[hidden email]> wrote:
>>
>> Hello,
>>
>> Google has transitioned their Collections API
>> http://code.google.com/p/google-collections/ into Guave
>> http://code.google.com/p/guava-libraries/ and added a new Constraint class.
>>
>> Would you mind updating org.carrot2.util.attribute.AttributeDescriptor to
>> fully qualify the org.carrot2.util.attribute.constraint.Constraint import ?
>>
>> It would eliminate the following error when compiling with the Guave jar:
>>
>> org\carrot2\util\attribute\AttributeDescriptor.java:116: reference to
>> Constraint is ambiguous, both class com.google.common.collect.Constraint in
>> com.google.common
>> .collect and class org.carrot2.util.attribute.constraint.Constraint in
>> org.carrot2.util.attribute.constraint match
>>    [javac]     private ArrayList<Constraint> constraintInstances;
>>
>>
>> Thanks,
>> Tom
>> --
>> View this message in context: http://carrot2-users-and-developers-forum.607571.n2.nabble.com/Compile-error-when-using-guava-r05-jar-tp5196937p5196937.html
>> Sent from the Carrot2 Users and Developers Forum mailing list archive at Nabble.com.
>>
>> ------------------------------------------------------------------------------
>> ThinkGeek and WIRED's GeekDad team up for the Ultimate
>> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
>> lucky parental unit.  See the prize list and enter to win:
>> http://p.sf.net/sfu/thinkgeek-promo
>> _______________________________________________
>> Carrot2-developers mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/carrot2-developers
>>
>

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers
Reply | Threaded
Open this post in threaded view
|

Re: Compile error when using guava-r05.jar

Tom Pines
That fixed it for me.

Thanks !
Tom

Dawid Weiss wrote:
I've added explicit imports in the trunk (looked only at
AttributeDescriptor). There may be other classes that have the same
glob-import pattern though.

D.

On Sat, Jun 19, 2010 at 11:06 AM, Dawid Weiss
[hidden email] wrote:
  
Hi Tom,

I think we can add an explicit import first, this should solve the
import conflict. I'll add an issue of moving to Guava, but this will
take some time since we need to review all the dependencies (including
proprietary algorithm deps.).

http://issues.carrot2.org/browse/CARROT-685

Dawid

On Fri, Jun 18, 2010 at 10:54 PM, Tom Pines [hidden email] wrote:
    
Hello,

Google has transitioned their Collections API
http://code.google.com/p/google-collections/ into Guave
http://code.google.com/p/guava-libraries/ and added a new Constraint class.

Would you mind updating org.carrot2.util.attribute.AttributeDescriptor to
fully qualify the org.carrot2.util.attribute.constraint.Constraint import ?

It would eliminate the following error when compiling with the Guave jar:

org\carrot2\util\attribute\AttributeDescriptor.java:116: reference to
Constraint is ambiguous, both class com.google.common.collect.Constraint in
com.google.common
.collect and class org.carrot2.util.attribute.constraint.Constraint in
org.carrot2.util.attribute.constraint match
   [javac]     private ArrayList<Constraint> constraintInstances;


Thanks,
Tom
--
View this message in context: http://carrot2-users-and-developers-forum.607571.n2.nabble.com/Compile-error-when-using-guava-r05-jar-tp5196937p5196937.html
Sent from the Carrot2 Users and Developers Forum mailing list archive at Nabble.com.

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers

      

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers
  


------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers