https://pantsbuild.org/ logo
#development
Title
# development
w

wide-midnight-78598

11/08/2022, 1:13 PM
A few recent conversations has brought something I've been wondering back to the forefront. For plugins that can be cross-backend (let's say I have a formatter that works across 3 backends), how should they be namespaced?
😅 1
b

bitter-ability-32190

11/08/2022, 1:38 PM
This question touches on a bigger-picture concern I have. I wonder if our naming strategy is ready for a large amount of plugins/ecosystems. For instance, we don't namespace our subsystems. (Not an answer, just an observation)
But there's always room for growth. "multi" might be a good namespacer (or something equivalent)
w

wide-midnight-78598

11/08/2022, 2:39 PM
"multi" might be a good namespacer
🫤
b

bitter-ability-32190

11/08/2022, 3:02 PM
🤷‍♂️
poly? 😛 polylang?
w

wide-midnight-78598

11/08/2022, 3:04 PM
`x`for xtremely many languages
💯 1
h

hundreds-father-404

11/08/2022, 3:19 PM
or literally put the same backend in 3 locations?
🤷‍♂️ 1
w

wide-midnight-78598

11/08/2022, 3:25 PM
That would be my current idea, but it feels very inelegant - buuuut maybe it's not, because if you're not using those multiple backends, you'd never know
h

hundreds-father-404

11/08/2022, 3:31 PM
and if you use all 3, doesn't really matter
c

careful-address-89803

11/08/2022, 3:35 PM
Yeah, I was thinking of how we namespace things to experimental, we just have a register in multiple locations that links to the original rules
b

bitter-ability-32190

11/08/2022, 3:36 PM
If we did that, would users expect activating
pants.backend.js.fmt.foobar
would also format toml files? (as a strawman)
w

wide-midnight-78598

11/08/2022, 3:37 PM
Copy code
backend_packages = [
    "pants.backend.cc.lint.myplugin",
     ...
    "pants.backend.javascript.lint.myplugin",
     ...
    "pants.backend.swift.lint.myplugin",
]

[myplugin-cc]
...
[myplugin-javascript]
...
[myplugin-swift]
...

or 
[myplugin]
swift.
cc.
javascript.
?
So, this is a real use case when it comes to
clang
languages, as some
clang
tools are cross-language