Following up on <https://pantsbuild.slack.com/arch...
# general
b
Following up on https://pantsbuild.slack.com/archives/C046T6T9U/p1642007275215400 from your perspective, when you were evaluating whether to choose a monorepo arch, what are the top 3 or 4 questions you needed answered? What were the top 3 or 4 challenges you faced in reaching a decision (whether personally, as a team, or as an org)? Answer this any way you want. There's no correct pov here. We're trying to learn from you how to help newcomers better. Thank you for sharing insights into your thought process!
w
For me, I was getting annoyed by all the individual repos I had to update when I made a specific class of change (let's say, a breaking change in a shared common library meant I had 4 repos to update, or something). I ended up on this post, written by a friend - which was the first time I heard of Pants: https://medium.com/pinterest-engineering/building-a-python-monorepo-for-fast-reliable-development-be763781f67 My use of Pants wasn't JUST for monorepo purposes - it was largely spurred by packaging Python for executable distribution - which can be done other ways, but its a pain. Some questions I thought about at the time (strictly process related, not much about whether I should or should not go one route or the other): 1. What are some pros/cons of monorepo vs polyrepo? 2. What is the delineation point between the two (e.g. Neither solution is perfect, and they might have to work together - with, say, a protobuf repo pulled into one or more monorepos per product/project) 3. What is a reasonable file/naming convention for a monorepo? 4. Can a hybrid monorepo/git subtree or git submodule system work well? 5. How can I pull public and private packages down (e.g. a private python library in a separate repo 6. What level of vendor lock-in will I suffer and have to deal with? 7. How are my dependencies shared between projects? Are they always all pinned to the same versions - or can I use multiple versions of a given dep? Pants didn't solve all of my problems, but a combination of Pants, bash scripts, and general Python/Pip did the trick. Aside: A big win for me is being able to isolate and vendor all of my build-tools into Pants, while keeping a clean requirements.txt for production-only deps. Typically I have requirements.txt, requirements.dev.txt, etc
1
b
Wow, @wide-midnight-78598, that is so thorough and useful that it could be a blog post virtually as-is. Would you be interested? Last week @fresh-cat-90827 converted a Slack thread into a terrific Pants blog post, so sincerely that's very doable if you're into it.
w
@busy-vase-39202 Sure! I'd love to, but probably not until I get this pants plugin into a half-decent prototype 🙂
b
Cool! When is a good time to check in with you? One week? Two?
w
Two weeks probably!
❤️ 1
b
Will do