:wave: Hi everyone! I was following the following ...
# general
b
👋 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
Hey, welcome! What exactly is the problem you are facing? I will try to see if I can help.
b
I want to know what is command to upgrade pants version
r
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
Check, I will try! Thanks in advance
👍 1
r
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
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
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
Thanks Shantanu! Tomás, Let us know if you have questions on the plugin upgrade part.
❤️ 2
b
I managed to update it successfully 🤩. Thank you very much guys, really appreciate it
🙌 2