Discussion of Monorepos in Python :thread:
# random
e
Discussion of Monorepos in Python 🧵
The Polylith metaphor/architecture-naming-scheme is pretty powerful way to use honk about a monorepo and your code base.
In practice (and I have not dug deep into polylith tooling so I might be missing something) it seems polylith is solving problems pants already solves. David Vujic says good things about pants so is familiar with it. So why did he feel he needed to build another tool? Was he unaware that pants runs all the tests that are affected by a commits change thus highlighting breaking changes irregardless of what ā€œprojectā€ the change occurs in? What he unaware of the code coverage plugins? Was he unaware of the flexibility pants has for building artifacts?
David V. might be an interesting person to interview to see how pants could be improved.
Maybe it’s just poor communication of existing features. Maybe there is a friction that could be addressed. I dunno.
e
So, I had no idea what you were talking about and googled and my high level question to you is why are you focused on David X?: https://polylith.gitbook.io/polylith/conclusion/who-made-polylith - that claims Joakim Tengstrand is the originator. I did not dig deeper, but he is a different person and perhaps he did not know about Pants? Perhaps he started this at a date preceeding Pants? It looks like this comes from Clojure roots as well which Pants has never supported.
A quibble with your title, FWICT this has ~nothing to do with Python. It has to do with monorepos ("polyliths") in general.
e
Ahh. I didn’t catch that. David Vujic wrote the poetry plug-in and I missed that it was Joamkim T. that originated polylith. I think that might of been mentioned at the beginning of the episode, which I started yesterday. I finished listening today. Thank you for clarifying.
The title comes from the Talk Python to Me podcast.
e
Much more generally, us developers are generally horrible about this sort of thing! Even when you know about a tool and it almost does what you want, there is a nasty tendency to prefer writing something new. No one likes maintenance.
šŸ‘šŸ½ 1
😰 1
e
We’ll there is a positive feedback to that bias. If I always find someone else’s tools to do what I want, I would never write any code.
e
Which is a good outcome. We should be in the job of putting ourselves out of a job.
šŸ‘šŸ½ 1
w
This is an interesting level of formality, added to what I think a lot of smaller teams using monorepos probably do. Shared "core" libraries. I'm glad they addressed a key issue of mixing languages (https://polylith.gitbook.io/polylith/conclusion/faq), because as I understand, one of the ideals of using microservices is sending teams to do whatever they want, so long as they adhere to their API contract (ambivalent to language or tooling - within some practical realities). Does polyliths address which part of a team is responsible for the shared code?
e
The point I wanted to emphasize is that this seems a slightly different good solution to the types of monorepos pants is also a good solution (not Google scale monorepos). Looking at their approach is a good learning exercise.
The right language for the job and ā€œculturalā€ boundaries between teams/projects instead of ridged tool imposed bounties are part of pants’ goals.
Obviously I need to look at polylith more closely.
e
I will say, at a glance polylith has opinions about project / repo structure. Pants decidedly does not. That has been seen as an advantage - we work (or can be made to) with your structure.
šŸ‘– 1
e
From the podcast, I got the idea that maybe leveraging
git
more might benefit pants and by extension
pex
.
e
So to now gain an opinion would be new!
e
./plugins/opinions/polylith
šŸ˜‚
ln -s pants jackets
Python has tools for making ones code work in different languages. Maybe it needs tools to make it work with different metaphors. But you got me off on a silly walk.
Right now
pants
doesn’t work on machines without Unix like file system aliases. I wonder if building venv using cheap and fast git repos (shallow clones or whatever) would solve that problem.
As someone who works with developers using locked down Windows boxes, it makes it impossible for me to convince the team to try pants.
e
Well, I've been working on WIndows support for Pex. The work is all done save for 10% of tests failing. It required using Windows developer mode (for symlink support). Are your Windows lock downs not allowing developer mode?
ā¤ļø 1
e
No developer mode. Too many security vulnerabilities with it for our environment
e
Well, ok. You won't get Windows support for a long while then.
šŸ˜… 1
So ... you develop on Windows but are not allowed to use developer mode?
e
Yeah.
Windows Developer mode and Internet browsing has many vectors for bad things to happen.
A few people have it, but not as their primary desktop. It has to be isolated. Which creates its own friction to development.
b
About one year late to the party, but now I have found this community. I'm the maintainer of the python tooling for Polylith. Let me know if you have any thoughts or questions! Currently, I am learning Pants and how to combine it with the Polylith Architecture (and tooling),.
šŸ”„ 1