-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Scala jar contains the scala standard library #13528
Comments
@larroy Hi Pedro, indeed. It contains all Scala needs. You can run your code by simply starting with
|
This doesn't sound like a good idea. Libraries shouldn't include the scala standard library. You should use scala -cp to run , and not java -cp. |
In fact, all Scala code are generated to |
While I think is ok to provide a fat jar for people trying MXNet in the console as you point out, we should provide a standard version with just MXNet and the binary dynamic libraries inside, without standard scala library or other dependencies that can be pulled from maven. Some of the comments I got from other engineers when I explained this issue were:
I don't want to irritate anyone with this issue because you guys have done great work putting the Scala package forward. But my feedback about this topic stands as it is if there's no new information provided. I asked other senior engineers in Amazon about this issue and their feedback was the same as mine. I suggest you guys do your due diligence about this topic and find out what's the best practice if my arguments are not convincing. If you need people to contact to gather more opinions I can suggest the Scala lists inside Amazon, external sources like stackoverflow or I can provide some names. If you need more help or feedback from my side, let me know. Happy to help. |
@larroy I think your explanation does make sense in this case. For Scala users essentially this is ok since they should already have Scala in their system. However, it would not be friendly to Java/Clojure users as it is the dependencies for them. Wrapping them up into a single Jar would reduce the dependencies they need as they can just import the package and it works. Currently, the assembly wrapping the following things
After packing up to jar file:
|
That's why maven / SBT etc. have the concept of transitive dependencies: slf4j and scala language should not be in the package. Only libmxnet.so/jnilib Dependencies from the MXNet backend and libmxnet.so/jnilib Dependencies from the MXNet backend. What you describe is considered a bad practice. |
@larroy This problem are fixed now. We include them into the pom file instead of binding together. Please feel free to close this issue |
@larroy I'm suggesting to close this issue, since we've dealt with it now. @lanking520 Can you close this issue ? |
Close it for now, please feel free to reopen if you are still seeing the same problems in the package |
Description
Created scala package with make && make scalapkg
Following command shows that it contains the scala standard library in addition to mxnet classes.
Environment info (Required)
f2dcd7c
The text was updated successfully, but these errors were encountered: