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

happy-kitchen-89482

12/13/2019, 8:49 PM
OK, how do people feel about v2 backends being named
component
, e.g.,
pants.component.python
, or
unit
, e.g.,
pants.unit.python
? This helps avoid code confusion with existing v1 backends. Note that all these words are somewhat overloaded.
h

hundreds-father-404

12/13/2019, 8:49 PM
we can’t name it
pants.python
,
pants.node
?
h

happy-kitchen-89482

12/13/2019, 8:53 PM
We could, but it's harder to avoid collisions with internal core code.
And also harder to keep them separate in our minds, unless we create a new source root for them
Which we could
But there would still be the confusion about whether
pants.foo
is the foo plugin or some random core code relating to foo.
h

hundreds-father-404

12/13/2019, 8:56 PM
pants.backend.python
,
pants.unit.python
, and
python.component.python
all seem like a leaky abstraction to me as a user - the fact that it’s implemented in the backend is an implementation detail
What about
pantsbuild.python
,
pantsbuild.node
?
h

happy-kitchen-89482

12/13/2019, 9:38 PM
Seems arbitrary, but we could
it means, e.g., having
src/python/pants
and
src/python/pantsbuild
Why is one the core and the other the backends? Unclear
h

hundreds-father-404

12/13/2019, 9:40 PM
Could we move all the core code into
pants.core
or
pants_core
? Your every day user who just wants to turn on functionality and not write new plugins would be able to active
pants.python
,
pants.node
Us Pants devs and any plugin authors would import
pants.core
when adding new functionality (I do realize this would be a majorly breaking change. Ignoring that for the moment to think about what design we’d use if we had zero legacy to support)
h

happy-kitchen-89482

12/13/2019, 9:50 PM
If we were willing to make big breaking changes, I'd move existing
pants.backend
to
pants.backendv1
h

hundreds-father-404

12/13/2019, 9:51 PM
and keep it as
pants.backend.python
?
h

happy-kitchen-89482

12/13/2019, 10:32 PM
No
it would be
pants.backendv1.python
, which would be disruptive
h

hundreds-father-404

12/13/2019, 10:32 PM
No, I’m asking what would the V2 name be if we used
pants.backendv1.python
h

happy-kitchen-89482

12/13/2019, 10:32 PM
but the v2 plugin could then reuse the name
pants.backend.python
👍 1