spec icon indicating copy to clipboard operation
spec copied to clipboard

Vanity go package name in spec.proto should work

Open shaunco opened this issue 4 years ago • 13 comments

Spec.proto uses a go package name of cloudevents.io/genproto/v1, but this URL does not contain the go vanity meta tags, which causes go to produce errors like:

cannot find module providing package cloudevents.io/genproto/v1: unrecognized import path "cloudevents.io/genproto": reading https://cloudevents.io/genproto?go-get=1: 404 Not Found

cloudevents.io/genproto should return a page that contains:

<meta name="go-import" content="cloudevents.io/genproto git https://github.com/cloudevents/genproto">
<meta name="go-source" content="cloudevents.io/genproto https://github.com/cloudevents/genproto https://github.com/cloudevents/genproto/tree/master{/dir} https://github.com/cloudevents/genproto/blob/master{/dir}/{file}#L{line}">

And a genproto repo should exist with the generated .pb.go files and a go.mod that has module cloudevents.io/genproto/v1

shaunco avatar Jan 20 '21 09:01 shaunco

@JemDay ^^^

duglin avatar Jan 20 '21 12:01 duglin

or @n3wscott @evankanderson since you guys might have some insight on how best to fix this too.

duglin avatar Jan 20 '21 12:01 duglin

We'll need to publish a static page like these on the Netlify site (assuming Netlify is what's being used).

Html fragments: https://github.com/knative/website/tree/master/static/golang

Netlify _redirects file: https://github.com/knative/website/blob/master/static/_redirects

evankanderson avatar Jan 20 '21 15:01 evankanderson

I've found https://github.com/leighmcculloch/vangen to be helpful.

shaunco avatar Jan 20 '21 18:01 shaunco

Someone wanna PR it? Yes I think we're using Netlify

duglin avatar Jan 21 '21 16:01 duglin

I would admit to having inserted the go directives based on commentary I got at the time.

I also don't claim to be a "go expert" and had naively assumed that this would only really be needed for local code generation and not require an actual repo.

As such I defer to those with much more hands-on than me :-)

JemDay avatar Jan 21 '21 23:01 JemDay

Scott will take a stab at this one

duglin avatar Feb 04 '21 17:02 duglin

@n3wscott any update on this one?

duglin avatar Mar 04 '21 03:03 duglin

Oh! I lost this thread, sure I will ping you @duglin and see what backs cloudevents.io, it would be cool to host the go sdk there too!!

n3wscott avatar Mar 04 '21 14:03 n3wscott

@n3wscott any update on this?

duglin avatar Jun 10 '21 11:06 duglin

@n3wscott is this one still an issue?

duglin avatar May 03 '22 19:05 duglin

still an issue.

n3wscott avatar Jun 15 '22 21:06 n3wscott

See: https://github.com/cloudevents/cloudevents-web for the hosting side of things. Scott to look into it

duglin avatar Jun 16 '22 16:06 duglin