Sharing a very minor victory. Just had our first n...
# random
b
Sharing a very minor victory. Just had our first non-me eng write Pants metadata šŸŽ‰
šŸ’Æ 5
šŸŽ‰ 3
h
nice! did they share any feedback?
b
nonesofar. Which no-news-is-good-news IMO
šŸ‘ 1
f
I'd count that as a better-than-minor victory. Getting buy-in is hard
āž• 1
b
When you have 18k lines of Bazel metadata, people see green grass anywhere šŸ˜…
🤪 1
b
EIGHTEEN THOUSAND šŸ‘€šŸ‘€
b
Copy code
$ find -name BUILD -print0 | wc -l --files0-from -
...
18481 total
😮 1
c
Good baseline to compare with when all those are pants metadata only.. ;)
b
My goal is <1k BUILD.pants lines
šŸ™Œ 1
h
The repositories we have heard of generally go down about 90% when adopting dependency inference, so that lines up
f
I am not deeply familiar with Bazel (just went through the docs and tutorials), but I am wondering why with the Google's resources available, they don't implement the dependency inference as well to save on the boilerplate code? šŸ˜• I assume they are aware of the extra burden on the user to specify the dependencies? Or is it considered to be a useful feature because the dependencies are listed explicitly (which I guess may have some benefits)?
b
The actual answer I'm sure has lots of historical detail, nuance, and baggage. But here's some things of note: • Bazel is the open source slice of their internal tool: blaze. Blaze, I'm told, has a really rich ecosystem. • Google cares most about Google's needs, which are heavy on the C++ side • Bazel has a different approach, and therefore running processes for dep inference might not be as feasible or desirable? • Gazelle is sort of the bazel equivalent: https://github.com/bazelbuild/bazel-gazelle. it codegens your build file by parsing your code
šŸ‘€ 1
h
it codegens your build file by parsing your code
At first, I advocated for this approach w/ Pants because "explicit is better than implicit". Benjy and Stu pushed hard for dep inference and were very persuasive: • noisy data hides intent. Now, when you see an explicit dep in a BUILD file, it's a signal it's something special like a runtime dep • dangerous for people to manually edit something machine generated (why
tailor
is only additive) • bad UX to have to run another command before you do anything (when changing imports) now I'm a total convert to dep inference
šŸ™ 1
āž• 1