https://pantsbuild.org/ logo
#general
Title
# general
p

polite-vase-75369

12/11/2020, 7:33 PM
i tracked it down to a kafka dependency, but im not sure why my managed dependencies is not overriding their value
w

witty-crayon-22786

12/11/2020, 8:12 PM
were you using
jar(…, force=True)
on the version of the annotations that you wanted?
p

polite-vase-75369

12/11/2020, 8:12 PM
no, but i thought this would force it?
Copy code
[jar-dependency-management]
default_target: 3rdparty:management
conflict_strategy: USE_MANAGED
w

witty-crayon-22786

12/11/2020, 8:13 PM
maybe. i don’t fully understand how the “managed” strategy worked.
the strategy we* (credit to @adamant-mouse-92628) had used in larger repositories was to mark nearly everything
force=True
so that any explicitly declared dependency was guaranteed to be used in favor of any implicit (transitive) dependencies
p

polite-vase-75369

12/11/2020, 8:19 PM
oh wow, good to know, thanks!
just like i always force commit to github
w

witty-crayon-22786

12/11/2020, 8:20 PM
lol
that works unless some dependency has multiple explicit declarations (valid in many cases), in which case the resolver will (rightly) bail to tell you that you can’t force to both X and Y. and that is a signal to your users that they’ve got a problematic dep graph
and at that point you can either unmark
force=…
or have the dependee change their graph.
but certainly in 2.0 the default for
jar(.. force=?)
will be
True
.
p

polite-vase-75369

12/11/2020, 8:23 PM
ah ok, pants 2 doesn’t have jvm yet, right?
w

witty-crayon-22786

12/11/2020, 8:23 PM
not yet.
4 Views