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

best-byte-73775

12/06/2022, 10:17 AM
👋 Hi everyone! I was following the following link in order to update our current pants version v.2.12.0 to v.2.14.0, but I was unsuccessful, could you please help me upgrade pants? link: https://www.pantsbuild.org/docs/upgrade-tips
1
r

refined-addition-53644

12/06/2022, 10:25 AM
Hey, welcome! What exactly is the problem you are facing? I will try to see if I can help.
b

best-byte-73775

12/06/2022, 10:26 AM
I want to know what is command to upgrade pants version
r

refined-addition-53644

12/06/2022, 10:27 AM
Ah, there is no command. You just have to change the
pants_version
line in pants.toml under [GLOBAL]. This is my pants.toml
Copy code
[GLOBAL]
pants_version = "2.14.0"
After this first time you run any pants goal (
tests
,
lint
,
fmt
etc) it will install this version. Otherwise you can run
Copy code
./pants --version
b

best-byte-73775

12/06/2022, 10:30 AM
Check, I will try! Thanks in advance
👍 1
r

refined-addition-53644

12/06/2022, 10:31 AM
I suppose this part is missing from the docs i.e. changing the version line itself.
No actually it says in the
Reminder
at the top of the link you have posted.
b

best-byte-73775

12/06/2022, 10:35 AM
Copy code
ImportError: cannot import name 'FmtRequest' from 'pants.core.goals.fmt' (/Users/tdafonseca/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.9It2GP/install/lib/python3.9/site-packages/pants/core/goals/fmt.py)
11:34:31.67 [ERROR] Failed to load the experimental.sql.lint.sqlfluff.register backend: ImportError("cannot import name 'FmtRequest' from 'pants.core.goals.fmt' (/Users/tdafonseca/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.9It2GP/install/lib/python3.9/site-packages/pants/core/goals/fmt.py)")
After running the
./pants export ::
r

refined-addition-53644

12/06/2022, 11:24 AM
Do you have some local plugins? This is bit beyond my expertise. You might have to wait for core maintainers (mostly in US/NA timezones) to wake-up.
https://www.pantsbuild.org/docs/plugin-upgrade-guide Yeah so there seems to be change in plugin API itself in 2.14
In order to support non-target formatting (like
BUILD
files) we’ll be introducing additional
fmt
request types. Therefore
FmtRequest
has been renamed to
FmtTargetsRequest
to reflect the behavior.
2
h

hundreds-father-404

12/06/2022, 1:20 PM
Thanks Shantanu! Tomás, Let us know if you have questions on the plugin upgrade part.
❤️ 2
b

best-byte-73775

12/06/2022, 3:26 PM
I managed to update it successfully 🤩. Thank you very much guys, really appreciate it
🙌 2
2 Views