I’m considering scrapping the “external” repos protocol, discosrv, relaysrv, and relaypoolsrv. Maybe also syncthing-cli. These would be adopted back into the main repo. Why would I want such a thing? Because it keeps things in sync, without annoying vendoring steps on our own code.
I had to rebuild the discosrv for v0.11 yesterday, because I mislaid the binary. To do that, I had to
Check out the old commit that I wanted on discosrv.
Fail to build it. Realize that I had to find the corresponding commit in protocol and check that out.
Fail to build it. Realize that I had to find the corresponding commit in syncthing and check that out.
Fail to build it anyway, as it wanted stuff in internal/ which is no longer supported and was anyway a bad idea…
Build it with an older compiler that accepted the internal/ prefix.
Did I actually get the same code as I had running previously, or did I select the wrong commit somewhere along the way? Fuck if I know… In the end I ended up stopping and rolling back the VM where the binary lived from a snapshot instead.
So anyway, we could tag stuff in protocol whenever we release a discosrv, or we could vendor it into that repo… But it’s our own code, and it evolves in lockstep. Moving it all into the same repo would have these advantages, as I see it:
The above situation doesn’t come up.
We catch build breakage immediately. (Currently, I can hack on the protocol and fix syncthing for it, and not really notice I broke discosrv in the meantime.)
We avoid having to vendor our own stuff.
We get all the binaries we want, built in one fell swoop…
Those binaries all get version tagged by default.
There are some disadvantages, as always:
We’ll lose the history of those repos when importing them. Well, the history will still be visible in those repos, but won’t be imported into the main repo.
It gets more cumbersome to use just the library in question, for non-syncthing consumers. I think the only place where this is relevant is the protocol package, and if there are any actual users of that out there I can commit to maintaining it at it’s current location, as a mirror of that inside the syncthing repo.
The things have different licenses. This doesn’t differ from now really though, as the code gets included with it’s own license anyway by the vendoring mechanism.
We lose one level of access control, as you could today theoretically be a contributor with push access to discosrv but not syncthing. I don’t see this as an issue at all - you’re welcome to more push access.
Is a possibility. We’d get syncthing including protocol as a submodule, and for example the relayserver including both syncthing and protocol as submodules. It’s not super pretty in my opinion, but it is better than now.
Not sure how we’d handle “releases” of the discovery and relay servers, I mean where the binaries are made available and so on. In their own repos, that only contain a README pointing to syncthing? Just link to whatever’s the latest on the build server?
Yeah. The most important binary is syncthing. I think the relay- and discoserverstuff could be moved somewhere else. Distributions will build their packages by themselves anyway… So, personally I don’t really think that prebuild binaries of the server stuff are that important.
syncthing-cli should imho be bundled with syncthing.
So I feel number of tweaks on relaysrv and other standalone tools all are relatively small, and they are quite independant. On the other hand, protocol is a core part, and a bitch to work with being on a separate repo.
My proposal would be to move protocol back into lib, move relay protocol and client into lib/relay, and just fix broken *srv jobs as they break, or add vendoring to *srv (which should be painless as we don’t expect them to change much)
cli is also packaged by some people, so perhaps should stay where it is.
I think I’ll go with that. That’ll be one change on the syncthing repo, then vendoring on the “outliers”. So ironically, more godep (but maybe used less often).