about summary refs log tree commit diff
path: root/.rgignore
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2023-09-10T10·40+0200
committerclbot <clbot@tvl.fyi>2023-09-10T11·43+0000
commit9786255267671f5a8f1ed856d938283139ccf41d (patch)
treee38724dab4c3fb757ba2385b67a9ad43f16cbd8b /.rgignore
parent6fa80ecc3def2145b4af0c292ffc0d1b82df3030 (diff)
feat(ops/modules/code.tvl.fyi): fix go get for tvix store protos r/6575
There's a go.mod in in tvix/store/protos, which sets the module path to
code.tvl.fyi/tvix/store/protos.

While this path makes kinda sense, it's currently not possible to `go
get` it from that location, as we serve the cgit interface from there.

Fortunately, `go get` has a mechanism to determine clone URLs for a
given go module path, as documented in https://go.dev/ref/mod#vcs-find.

We simply need to serve a small HTML file at that path, describing the
proper clone URL.

This points the clone URL for code.tvl.fyi/tvix/store/protos to a josh-
provided subtree of just :/tvix/store/protos, which will contain the
root go.mod file.

We need another layer of indirection as nginx can't have an `alias`
directive inside a conditional block (but can have a redirect).

Contrary to https://b.tvl.fyi/issues/299#comment-464, it seems to work
for our usecase. It might become a problem if we actually serve `go.mod`
files in a nested fashion at some point, but let's look at that once we
get there.

Fixes b/299.

Change-Id: Idcad795105af5d57e6d06de6e232881dccf9110b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9290
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: adisbladis <adisbladis@gmail.com>
Reviewed-by: tazjin <tazjin@tvl.su>
Diffstat (limited to '.rgignore')
0 files changed, 0 insertions, 0 deletions