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

witty-crayon-22786

06/16/2020, 6:03 PM
@cuddly-window-48195: new thread for the
dependencies
issue
about 98% sure it exists, although it’s possible it isn’t documented in v1. sigh.
c

cuddly-window-48195

06/16/2020, 6:30 PM
Ok, well we look forward to it in v2. Sorry for being noisy in the other thread. :)
w

witty-crayon-22786

06/16/2020, 6:31 PM
to be clear: it exists in v1… if it’s not in the goals list, that’s a bug with the goals list
try running
./pants dependencies $target
c

cuddly-window-48195

06/16/2020, 6:31 PM
Copy code
Unknown goals: dependencies
Use `./pants goals` to list goals.
Use `./pants help` to get help.
That’s what prompted me to check
pants goals
w

witty-crayon-22786

06/16/2020, 6:32 PM
!!! interesting. do you have any backends disabled?
anything relevant in
backend_packages
and
plugins
?
c

cuddly-window-48195

06/16/2020, 6:32 PM
Copy code
; Set to avoid having to depend on Java
; See: <https://github.com/pantsbuild/pants/issues/4782>
; See: <https://github.com/pantsbuild/pants/issues/3815>
backend_packages: [
    # Pants built-ins:
    'pants.backend.codegen.thrift.python',
    'pants.backend.graph_info',
    'pants.backend.python',
  ]
Copy code
plugins: [
    'pantsbuild.pants.contrib.awslambda_python==%(pants_version)s',
    'pantsbuild.pants.contrib.node==%(pants_version)s',
    'pantsbuild.pants.contrib.go==%(pants_version)s',
  ]
Not that I can tell?
I’m not sure what a disabled backend/plugin would look like…
w

witty-crayon-22786

06/16/2020, 6:35 PM
and this is
1.25.x
? i think that it’s possible that that goal is now in v2, so you’d want to add
'pants.backend.graph_info'
to a
backend_packages2
option? cc @hundreds-father-404
c

cuddly-window-48195

06/16/2020, 6:35 PM
1.25.0 specifically. I haven’t had time to get back to porting to v2, but when I do I’ll keep that in mind.
h

hundreds-father-404

06/16/2020, 6:35 PM
Try adding
pants.backend.project_info
to that list
🙏 1
w

witty-crayon-22786

06/16/2020, 6:36 PM
…oh, project
yea, sorry. that’s it.
c

cuddly-window-48195

06/16/2020, 6:36 PM
Ah yep, that did it.
💯 1
w

witty-crayon-22786

06/16/2020, 6:36 PM
thanks Eric.
❤️ 2
h

hundreds-father-404

06/16/2020, 6:36 PM
In v1, we have both
project_info
and
graph_info
. We consolidated them with v2 and also made it so that you never can deactivate the backend
c

cuddly-window-48195

06/16/2020, 6:37 PM
cool. Is there documentation about what is a backend and how it differs from a plugin?
h

hundreds-father-404

06/16/2020, 6:37 PM
c

cuddly-window-48195

06/16/2020, 6:38 PM
Thank you!
I guess that doesn’t help me understand the difference between a backend and a plugin? Is a backend just a first-party plugin?
Or maybe plugins (may?) contain backends?
h

hundreds-father-404

06/16/2020, 6:59 PM
Hm good point that the difference is not very clear. You’re right with both of those. A backend corresponds to a
register.py
file, and it brings some new functionality like new goals, new linters, new target types, etc. Every plugin has a backend, which is almost always activated by default. So when you have a plugin, you don’t usually need to also specify it in
backend_packages
. Pants has a couple of backends that come built in, but are not activated by default. For example,
pants.backend.python.lint.black
. So, these are indeed sort of like first-party plugins, in spirt at least.
❤️ 1
🙏 1
h

happy-kitchen-89482

06/16/2020, 8:00 PM
We might try and remove this distinction, since it's just confusing.
👍 1