sandstorm-org / tempest

A modern take on Sandstorm written in Go
Apache License 2.0
1 stars 0 forks source link

How should we handle generated .capnp.go files? #1

Open ocdtrekkie opened 1 month ago

ocdtrekkie commented 1 month ago

So, the full backstory for @troyjfarrell's consideration:

  1. tempest (and powerbox-http-proxy) used to import go.sandstorm, which provided the generated Go code for capnp interfaces.
  2. go.sandstorm was vendored directly into tempest, and go.sandstorm became unmaintained at that point. tempest contains the latest changes.
  3. powerbox-http-proxy needs to update all of it's imports so they work without zenhack.net.

The problem is that Tempest has .capnp.go in it's gitignore, and hence does not commit the actual generated Go files, so I cannot import them from the Tempest repository with Go's build system. I asked @lthibault about this and he did not know why they were gitignored, though I imagine it is to ensure there is a single source of truth in the repo.

We could either:

orblivion commented 1 month ago

My initial reasoning was just a hypothetical way to maintain one source of truth, as Jacob mentioned. However another consideration that comes to mind is that Tempest might get (or might already be) much bigger than these capnp files, and might have many more dependencies, which powerbox-http-proxy won't need. So, splitting it out could also speed up the build of powerbox-http-proxy.