Hello! I added new microservice to my repo and it ...
# general
g
Hello! I added new microservice to my repo and it uses updated dependency (cats-effects 3). And I'm trying to
Copy code
./pants generate-lockfiles
And it generates a lot of errors, like
Copy code
org.typelevel:cats-effect_2.13:2.0.0 or 2.1.4 or 2.3.0-M1 or 2.3.1 or 2.5.0 or 2.5.1 or 2.5.4 or 2.5.5 or 3.3.14 wanted by

  co.fs2:fs2-core_2.13:2.5.6 wants 2.3.0-M1
  ├─ co.fs2:fs2-io_2.13:3.3.0 wants co.fs2:fs2-core_2.13:3.3.0
  │  └─ org.http4s:http4s-core_2.13:0.23.16
  │     ├─ org.http4s:http4s-ember-core_2.13:0.23.16
  │     │  └─ org.http4s:http4s-ember-server_2.13:0.23.16
  │     └─ org.http4s:http4s-server_2.13:0.23.16
  │        └─ org.http4s:http4s-ember-server_2.13:0.23.16
Scala compiler is ok, as it different projects. Issues only with pants. Maybe I missed something in docs, but Are there any variants to use different versions of one dependency in one repo?
Copy code
GROUP_ID = "org.typelevel"

# -- Versions --
EFFECT_VERSION = "3.3.14"

# -- Artifacts --

jvm_artifact(
    name="effect",
    group=GROUP_ID,
    artifact="cats-effect_2.13",
    version=EFFECT_VERSION,
    packages=["cats.effect.**"],
)
In another BUILD:
Copy code
jvm_artifact(
    name="effect",
    group=GROUP_ID,
    artifact="cats-effect_2.13",
    version="2.5+",
    packages=["cats.effect.**"],
)
r
I'm not scala/Java expert but for using multiple versions of same dependency you will have to use different resolves as it's explained here https://www.pantsbuild.org/docs/python-third-party-dependencies#lockfiles