https://pantsbuild.org/ logo
s

stocky-portugal-83098

04/02/2019, 5:10 AM
Quick question, is it possible to use two different scala versions in the same monorepo ? like if some targets need spark so they need to be 2.11 but the rest of the scala projects are on 2.12?
a

aloof-angle-91616

04/02/2019, 6:16 AM
this is a frequently requested feature, and i would recommend making an issue at https://github.com/pantsbuild/pants/issues/new with a very brief outline of your use case if there isn't one already. currently, this might be accomplished (off the top of my head) by doing two pants runs, the first with
--scala-version=2.11
on only the targets which require 2.11, and the second with
--scala-version=2.12
. they won't share caching between the two runs because the option value changes the fingerprint, but pants caching is smart and subsequent runs should be able to use the cached results from previous runs to avoid compiling everything again
👍 1
s

stocky-portugal-83098

04/02/2019, 7:35 AM
thank you!
4 Views