Hi, does 2.17 have any breaking changes for custom...
# general
c
Hi, does 2.17 have any breaking changes for custom plugins? Running
pants
with no (or any) arguments results in a big stack trace with
Copy code
File "[snip]/site-packages/pants/backend/python/subsystems/python_tool_base.py", line 211, in default_lockfile_url
    assert cls.default_lockfile_resource is not None
AssertionError
at the bottom. (Full stack trace in thread.)
Untitled
c
unfortunate that the assert didn’t include details about which class it was..
does your plugin register any custom python tools?
e
Looks like the short answer is yes, here: https://github.com/pantsbuild/pants/commit/02b66572aedcdf31d3e168ce63e4f58239bfce87 That went out in 2.17.0a0.
c
Thanks both - I will take a look.
unfortunate that the assert didn’t include details about which class it was
luckily we only have one custom tool so I think I know the culprit
Thanks, it turned out to be a one-liner. Just adding
Copy code
default_lockfile_resource = ("package-name", "whatever.lock")
to the subclass of
PythonToolBase
seemed to do the trick!
👍 1
c
The
default_lockfile_resource
requirement for
PythonToolBase
based classes seems to be missing in the plugin upgrade guide for 2.17.