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

breezy-apple-27122

03/17/2023, 11:31 AM
If I set a package manually in `pyproject.toml`(like
mypy = "1.1.1"
), will the
[mypy].version
config follow the one installed? Because then I could use renovatebot to keep the version of this tool maintained and updated.
n

narrow-vegetable-37489

03/17/2023, 11:37 AM
Nope! I do believe there are plans to move away from separate tooling lockfiles though, so maybe in the future?
a

average-father-89924

03/17/2023, 12:01 PM
Does that mean we also need to specify something like this:
lockfile = "3rdparty/mypy_lockfile.txt"
If I don't explicitly specify a lock file for mypy I am getting the following error when running
pants export
125825.11 [ERROR] 1 Exception encountered:
Engine traceback:
in
export
goal - environment:local_linux
InvalidLockfileError: You are using the
<default>
lockfile provided by Pants to install the tool
mypy
, but it is not compatible with your configuration:
- You have set different requirements than those used to generate the lockfile. You can fix this by updating
[mypy].version
,
[mypy].source_plugins
, and/or
[mypy].extra_requirements
, or by using a new custom lockfile.
In the input requirements, but not in the lockfile: ['mypy==1.1.1']
In the lockfile, but not in the input requirements: ['mypy==0.961']
To generate a custom lockfile based on your current configuration, set
[mypy].lockfile
to where you want to create the lockfile, then run
pants generate-lockfiles --resolve=mypy
.
r

refined-addition-53644

03/17/2023, 12:09 PM
yeah if you set a custom mypy version, then you need to have a corresponding lockfile. This is true about all the tools.
👍 1
a

average-father-89924

03/17/2023, 12:09 PM
Thanks!
👍 1
2 Views