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

gentle-hydrogen-65984

02/09/2022, 4:19 AM
I'm on Pants 1.27 trying to compile scala 2.12.8. I see here that 2.12.8 is also the default internal version, I was getting errors with 2.12.<latest> so I decided to stick with .8. However I see 2.12.14 getting pulled in ๐Ÿงต
./pants depmap :myapp | grep 2.12.14
returns nothing, but
Copy code
./pants export :myapp | grep 2.12.14

            "default": "/Users/mitesh/.ivy2/pants/https/maven-central.storage-download.googleapis.com/maven2/org/scala-lang/scala-library/2.12.14/scala-library-2.12.14.jar"
more of the export output
Copy code
"src/scala/co/actioniq/service/streaming_lookup_update:streaming_lookup_update": {
            "targets": [                "src/scala/co/actioniq/rpc:trigger_misc", src/scala/co/actioniq/service/streaming_lookup_update:batch_streaming_lookup_spark_job",
                "//:scala-library-synthetic",
            ],
            "libraries": [
                "org.scala-lang:scala-library:2.12.8",
                "org.scala-lang:scala-library:2.12.14"
            ],
@happy-kitchen-89482 any ideas to debug this? we've got
scala-library
in our managed deps. I tried to define
scala-library-synthetic
but it wouldnt let me.
๐Ÿ‘€ 1
h

happy-kitchen-89482

02/10/2022, 3:38 PM
Does this recur if you
clean-all
and delete any caches? in ~/.cache/pants ?
g

gentle-hydrogen-65984

02/10/2022, 6:17 PM
Yep ive nuked
.pants.d
and
~/.cache
, and bumped
cache_key_gen_version
to be safe
Copy code
$> ./pants depmap src/scala/co/actioniq/functional:functional | grep scala-library
  internal-.scala-library
    internal-3rdparty.org.scala-lang.scala-library
      org.scala-lang-scala-library-2.12.8
  *org.scala-lang-scala-library-2.12.8

$> ./pants export src/scala/co/actioniq/functional:functional | grep scala-library
                "//:scala-library",
                "3rdparty/org/scala-lang:scala-library",
                "org.scala-lang:scala-library:2.12.14",
                "org.scala-lang:scala-library:2.12.8"
"/Users/mitesh/aiq/.pants.d/bootstrap/bootstrap-jvm-tools/2fa4e3b0d0bf/cache/relative/https/maven-central.storage-download.googleapis.com/maven2/org/scala-lang/scala-library/2.12.8/scala-library-2.12.8.jar",
ive got 2.12.8 in my
managed_dependencies
and
//:scala-library
defined
i dont see that 14 hardcoded in pants repo
Copy code
mitesh@pants $> git branch
* 1.27.x
  main
mitesh@pants $> > git grep "2\.12\.14"
mitesh@pants $> > git grep "2\.12\.8"
build-support/native-image/build-zinc-native-image.bash:  version='2.12.8'
Another clue, I printed out this line
jar_lib
and
jar_entry
and got this. Note the 2.12.8 vs 2.12.14 mismatch
Copy code
JarLibrary(3rdparty/com/twitter:twitter-server) ArtifactClasspathEntry(path='/Users/mitesh/aiq/.pants.d/export/export/cccdd42e27f0/cache/relative/https/maven-central.storage-download.googleapis.com/maven2/org/scala-lang/scala-library/2.12.8/scala-library-2.12.8.jar', coordinate=M2Coordinate(org='org.scala-lang', name='scala-library', rev='2.12.14', classifier=None, ext='jar'), cache_path='/Users/mitesh/.ivy2/pants/https/maven-central.storage-download.googleapis.com/maven2/org/scala-lang/scala-library/2.12.8/scala-library-2.12.8.jar', directory_digest=Digest(fingerprint='1e2608b75faf7af82846faacc31df7227f3e46a091061d7536458782842e7268', serialized_bytes_length=82))