Fork me on GitHub
#squint
<
2023-01-02
>
borkdude11:01:46

FWIW, I removed the compiler-common repo and mirroring approach again since it came with too much complexity. Instead squint is now a dependency of cherry. So changes to the common compiler parts are a change in squint, which will run tests (as a first line of defence against regressions, similar to bb + SCI) and after that, the squint dependency can be upgraded in cherry (similar to SCI and nbb for example)

mkvlr11:01:01

@borkdude I guess this architecture was in the name all along

borkdude11:01:27

All of these complexities wouldn't have existed if tools.deps supported git submodules - I might reconsider when that happens

Chris McCormick11:01:21

I guess you already considered using a git subtree instead?

borkdude11:01:25

does that work with tools deps?

Chris McCormick11:01:11

If tools.deps supports regular git checkouts then yes.

borkdude11:01:17

It seems that comes with its own set of trade-offs • Contributing code back upstream for the sub-projects is slightly more complicated. • The responsibility of not mixing super and sub-project code in commits lies with you.

👍 2
borkdude11:01:09

It seems git subtrees are newer than submodules?

borkdude11:01:00

So the main decision factors are like: • Use subtree when you just want to copy code from an external repo once, or maybe with occasional pulls. • Use submodule when you want to make your relationship to the external repo really explicit, or if you intend to make changes to the submodule code from within the context of your repo and push to the external repo.

borkdude11:01:05

(copied from an article)

borkdude11:01:29

since the goal is to change the code in the sub-dependency, I think subtrees won't solve it, but it's good to know that it might work with tools-deps

Chris McCormick12:01:41

Ah ok, I haven't used subtrees myself. I thought it was possible to push code back up to the original repo without too much trouble.

borkdude12:01:24

Yeah, one issue I'm also having is that the code changes to the subtree must be tested but this currently isn't possible without using either squint or cherry

Chris McCormick12:01:27

I don't know too much about tools.deps but with Node and packages.json you can configure things to be run at different stages during install. If tools.deps had a facility like that you could run the git submodules init post install.

Chris McCormick12:01:40

I think the same is true in Python's setup.py.

borkdude12:01:09

tools deps does have a thing like that, it's called prep-deps. yeah, that could also work, hadn't thought of that

borkdude12:01:52

I guess you could "abuse" that to pull the git submodule, although I wonder how you would ensure the right version since this only runs on missing files