Skip to content

inline FluentIterable.of to be compatible with guava <18#67

Merged
uschi2000 merged 1 commit into
palantir:developfrom
Xenorith:bugfix/removeFluentIterableOf
Feb 24, 2016
Merged

inline FluentIterable.of to be compatible with guava <18#67
uschi2000 merged 1 commit into
palantir:developfrom
Xenorith:bugfix/removeFluentIterableOf

Conversation

@Xenorith

Copy link
Copy Markdown

No description provided.

@pwoody

pwoody commented Feb 24, 2016

Copy link
Copy Markdown

Can we shade guava?

@markelliot

Copy link
Copy Markdown
Contributor

I'd rather not, would prefer to rewrite this to remove the Guava dep rather than shade just for this one liner.

@pwoody

pwoody commented Feb 24, 2016

Copy link
Copy Markdown

cool - just something to be wary of for all of our libraries that interact with spark/hadoop. guava versions always cause issues (hence spark shaded theirs).

@markelliot

Copy link
Copy Markdown
Contributor

We use so little of the Guava library that forcing it to whatever version you need is probably fine in the current mode. If we force shading of the Guava Optional class then that sort of ruins how this gets used, so I'm pretty hesitant to do that.

From: Patrick Woody <notifications@github.commailto:notifications@github.com>
Reply-To: palantir/http-remoting <reply@reply.github.commailto:reply@reply.github.com>
Date: Wednesday, February 24, 2016 at 11:21 AM
To: palantir/http-remoting <http-remoting@noreply.github.commailto:http-remoting@noreply.github.com>
Cc: Mark Elliot <melliot@palantir.commailto:melliot@palantir.com>
Subject: Re: [http-remoting] inline FluentIterable.of to be compatible with guava <18 (#67)

cool - just something to be wary of for all of our libraries that interact with spark/hadoop. guava versions always cause issues (hence spark shaded theirs).


Reply to this email directly or view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_palantir_http-2Dremoting_pull_67-23issuecomment-2D188415586&d=CwMCaQ&c=izlc9mHr637UR4lpLEZLFFS3Vn2UXBrZ4tFb6oOnmz8&r=Vp81aOxWZvuVgVK_wp-VF3pIYG92B19LcCw6XKeYC0U&m=XGfgGkMp2hSS69bxiz8U8j7DMCbU-2JG4Bn1jsLngTU&s=aorI6zCxozPlUyVfaPRLaDMRtjlV2yVDmhn_uTqnQYg&e=.

@uschi2000

Copy link
Copy Markdown
Contributor

any objections to merging this for a 0.7.1 release?

if (cls.equals(Optional.class)) {
FluentIterable<Class<?>> paramAnnotations =
FluentIterable.of(annotations[i]).transform(EXTRACT_CLASS);
FluentIterable.from(Lists.newArrayList(annotations[i])).transform(EXTRACT_CLASS);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ImmutableList.of(). whatever. do it next time

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

went with inlining exactly what was in guava

public static FluentIterable of(E[] elements) {
return from(Lists.newArrayList(elements));
}

@pnepywoda

Copy link
Copy Markdown
Contributor

+1
We may want to actually downgrade guava in our widely-used libraries to guava 16, or even 14 which is what spark uses (http://mvnrepository.com/artifact/org.apache.spark/spark-core_2.10/1.6.0)

@uschi2000

Copy link
Copy Markdown
Contributor

can you rebase please, @Xenorith ?

@Xenorith Xenorith force-pushed the bugfix/removeFluentIterableOf branch from c668275 to 1c0d906 Compare February 24, 2016 21:02
uschi2000 added a commit that referenced this pull request Feb 24, 2016
inline FluentIterable.of to be compatible with guava <18
@uschi2000 uschi2000 merged commit bf30cc0 into palantir:develop Feb 24, 2016
hsaraogi pushed a commit to hsaraogi/http-remoting that referenced this pull request May 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants