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

incalculable-yacht-75851

05/10/2022, 5:11 PM
I'm trying to move from 2.9 to 2.11. One issue that comes up every time we introduce a new Pants version is that it always sets the latest version of black as of the time of release. Is there a way to bump the version of pants but not the version of black for existing projects while allowing future projects to use the version of black that ships with pants?
1
The problem is that each existing project would need formatted, and I'd like to decouple the pants upgrade from the black upgrade.
h

hundreds-father-404

05/10/2022, 5:12 PM
f

flat-zoo-31952

05/10/2022, 5:12 PM
Jinx @hundreds-father-404
i

incalculable-yacht-75851

05/10/2022, 5:13 PM
I don't exactly want to pin it, I want to pin it only for existing projects.
So they can choose a different version of black than what is configured in pants.toml
h

hundreds-father-404

05/10/2022, 5:14 PM
If you don't pin, then you're going to get whatever Pants's version is set to We try to continually update so that new projects have the latest and greatest. We want our defaults to be sensible
I want to pin it only for existing projects.
So they can choose a different version of black than what is configured in pants.toml
I'm not sure I follow - with Pants atm, you can only use a single version of Black for the entire repository
f

flat-zoo-31952

05/10/2022, 5:15 PM
I don't think Pants has a notion of "different versions of a backend tool", where "backend" is the name for the mechanism Pants uses to load functionality from tools like Black
i

incalculable-yacht-75851

05/10/2022, 5:15 PM
Thanks. I'm just dreaming up a feature for you ;)
c

curved-television-6568

05/10/2022, 9:11 PM
This is the second time this has come up now…. 🤔
Per project tools in a single repo..
👍 1
f

flat-zoo-31952

05/10/2022, 10:35 PM
I'm curious... if you're wanting per-project tools, why are you doing a monorepo? I've always seen tool consistency as one of the main draws of a monorepo approach
👍 1
i

incalculable-yacht-75851

05/10/2022, 11:17 PM
I only want per-project tools to not mix a pants upgrade w/ a black upgrade. I don't want 1000 files changed when upgrading pants. As it sits right now, we have different codeowners for different projects and I don't want 100% of our codeowners needing to review something that is not core to their application business logic.
2 Views