sam
08/06/2019, 2:07 PMdave08
08/06/2019, 3:17 PMsam
08/06/2019, 3:31 PMdave08
08/06/2019, 3:32 PMsam
08/06/2019, 3:35 PMLeoColman
08/06/2019, 3:35 PMapi
vs implementation
probablydave08
08/06/2019, 3:35 PMsam
08/06/2019, 3:38 PMdave08
08/06/2019, 3:39 PMsam
08/06/2019, 3:40 PMdave08
08/06/2019, 3:41 PMsam
08/06/2019, 3:46 PMilya.gorbunov
08/06/2019, 6:53 PMruntime
scope, so it should be possible to represent the same concept in maven.sam
08/06/2019, 6:55 PMValidated
along with other uses. So it’s needed to both compile, and to run. It’s not possible to ship this without arrow as you need arrow to run it but…
I’d be open to copying the source files into the project itself and removing the dependency. It would only be 3 or 4.ilya.gorbunov
08/06/2019, 9:01 PMruntime means that it’s required at runtime but not at compilation time.I believe that's how Gradle's
implementation
dependency configuration should be mapped onto the Maven dependency scope. Maven pom produced from Gradle build describes how to consume the library, and not how to build it.sam
08/06/2019, 9:08 PMimplementation
compiles with the dependency and then puts runtime into the pom, when someone adds it to their build it will throw a class not found exception if they don’t also add the required classes. So what’s the advantage? They ultimately need to add the dependency anyway.ilya.gorbunov
08/06/2019, 9:16 PMapi
. We're talking about the situation when you don't expose them, which seems not to be the case here.jdiaz
08/06/2019, 9:18 PMsam
08/06/2019, 9:20 PMapi
. I’d be open to shading the dependencies though as it’s only a few files. That’s probably a better solution than requiring everyone to have arrow if that’s not what they want.LeoColman
08/06/2019, 9:43 PMsam
08/06/2019, 9:47 PMLeoColman
08/06/2019, 9:48 PMsam
08/06/2019, 9:49 PMLeoColman
08/06/2019, 9:49 PMAny
namespacejdiaz
08/06/2019, 9:51 PMLeoColman
08/06/2019, 9:52 PMsam
08/06/2019, 9:55 PMDecoder
instances to hoplite-arrow, and then shade the files the library uses. Thanks to @jdiaz @dave08 @ilya.gorbunov @LeoColman for the feedbackbdawg.io
08/06/2019, 11:48 PMapi
vs implementation
back at KotlinConf 2017 was implementation was meant to remove autocompletion of transitive dependencies that were purely implementation
details whereas api
was for dependencies exposed by your public APILeoColman
08/06/2019, 11:50 PMgildor
08/07/2019, 2:55 AMSo many libraries bring so much inside them, and we usually never even see themYou do, and even worse, you sometimes use it, but only because some library leaked implementation details, it;’s the same as use public everywhere
sam
08/07/2019, 5:55 AMcom.google.wibble.Foo
whether it's implementation
or api
, that class must be present on the classpath at runtime. So what exactly is this difference giving me ?gildor
08/07/2019, 5:58 AMcom.acme.wibble.Bar
in new version and it broke everyone who used it
With implementation
user of your library knows nothing about com.google.wibble.Foo
, it’s runtime dependencysam
08/07/2019, 5:59 AMgildor
08/07/2019, 6:00 AMsam
08/07/2019, 6:00 AMsam
08/07/2019, 6:00 AMgildor
08/07/2019, 6:00 AMsam
08/07/2019, 6:01 AMgildor
08/07/2019, 6:01 AMlike 99% of libraries, that magic is going awayNo
sam
08/07/2019, 6:01 AMgildor
08/07/2019, 6:02 AMsam
08/07/2019, 6:02 AMgildor
08/07/2019, 6:03 AMThis scope indicates that the dependency is not required for compilation, but is for execution. It is in the runtime and test classpaths, but not the compile classpath.
sam
08/07/2019, 6:03 AMgildor
08/07/2019, 6:03 AMsam
08/07/2019, 6:04 AMclass Foo { private val wibble = com.other.Wibble() }
gildor
08/07/2019, 6:04 AMruntime
transitive dependency, user of this library cannot use this dependencysam
08/07/2019, 6:04 AMgildor
08/07/2019, 6:04 AMsam
08/07/2019, 6:05 AMgildor
08/07/2019, 6:05 AMsam
08/07/2019, 6:05 AMgildor
08/07/2019, 6:06 AMsam
08/07/2019, 6:07 AMgildor
08/07/2019, 6:12 AMsam
08/07/2019, 6:12 AMgildor
08/07/2019, 6:12 AMsam
08/07/2019, 6:13 AMgildor
08/07/2019, 6:14 AMapi
, which mostly the same as compile
sam
08/07/2019, 6:19 AMgildor
08/07/2019, 6:50 AM