Github user vanzin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/1813#discussion_r16493693
  
    --- Diff: pom.xml ---
    @@ -1017,6 +1018,21 @@
     
       <profiles>
     
    +    <!--
    +      This profile is enabled automatically by the sbt built. It changes 
the scope for the guava
    +      dependency, since we don't shade it in the artifacts generated by 
the sbt build.
    +    -->
    +    <profile>
    +      <id>sbt</id>
    +      <dependencies>
    +        <dependency>
    +          <groupId>com.google.guava</groupId>
    +          <artifactId>guava</artifactId>
    +          <scope>compile</scope>
    --- End diff --
    
    See previous discussion I had with Sean in this PR.
    
    There's really no good scope in maven for what we want to do. "compile" 
means that guava will show up in the user's compilation classpath, and since 
we're shading guava in the assembly, it may lead to runtime errors since guava 
won't be there. "provided" means that guava is not exposed to the user at all; 
so if the user wants to use guava, he'll need to add an explicit dependency and 
package it himself.
    
    I like "provided" better because it means things fail for the user at build 
time, not runtime, if the user is using guava but hasn't declared the 
dependency. And that's why I had all those hacks in the sbt build that you 
asked me to remove.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to