https://pantsbuild.org/ logo
b

bitter-ability-32190

07/08/2022, 6:13 PM
Can someone help me understand a few lines from
src/python/pants/backend/scala/dependency_inference/rules.py
? Specifically:
Copy code
if not target.has_field(JvmResolveField):
        return InjectedDependencies()

    scala_plugins = await Get(
        ScalaPluginTargetsForTarget, ScalaPluginsForTargetWithoutResolveRequest(target)
    )
Why are we using
ScalaPluginsForTargetWithoutResolveRequest
if the target does have a resolve? (as evidenced by the confition?)
f

fast-nail-55400

07/08/2022, 6:35 PM
oversight? cc @ancient-vegetable-10556 since
git
annotates that change to you
a

ancient-vegetable-10556

07/08/2022, 6:36 PM
👀
b

bitter-ability-32190

07/08/2022, 6:36 PM
This will be changed slightly in an upcoming PR, but the core of the issue will remain
a

ancient-vegetable-10556

07/08/2022, 6:38 PM
one moment
I don’t have good recollection of this work, it was several months ago HOWEVER
the naming might be a bit obtuse here. What you are seeing is scala source targets do have a resolve, but the plugins probably should not. You associate the scala sources with plugins, so that they’re flagged as dependencies
The request might better be named
ScalaPluginsWithoutResolveForTargetRequest
, maybe
b

bitter-ability-32190

07/08/2022, 6:44 PM
Ah then my change isn't breaking any assumption
👍 thanks yall
a

ancient-vegetable-10556

07/08/2022, 6:44 PM
Right
Now that my memory is returning on this: All scala targets have resolves
2 Views