Re: [go-nuts] Re: Weird error when trying to fetch a module.

2023-09-15 Thread 'Sean Liao' via golang-nuts
Modules in subdirectories should just work, tags are not necessary. I see there is a recent commit to correct the module name, that was necessary. As for your most recent invocation, the module path was wrong (missing a /src/ component) $ go get

[go-nuts] Re: Weird error when trying to fetch a module.

2023-09-15 Thread Brian Candler
> I can not find the go.mod for flatbuffers! It is not in the root of the repository and also not inside the go subdir where the code resides Presumably relies on this: https://go.dev/ref/mod#non-module-compat See also

[go-nuts] Re: Weird error when trying to fetch a module.

2023-09-15 Thread Bruno Albuquerque
So, I am still curious about something. Flatbuffers, which is a project I depend on, does have its go code in a subdirectory and I can go get it: ➜ ~ go get -x github.com/google/flatbuffers/go # get https://proxy.golang.org/github.com/@v/list # get

Re: [go-nuts] Re: Weird error when trying to fetch a module.

2023-09-15 Thread Bruno Albuquerque
Ok, this is promising. Thanks for testing it. -Bruno On Fri, Sep 15, 2023 at 4:58 AM Jan Mercl <0xj...@gmail.com> wrote: > On Fri, Sep 15, 2023 at 10:31 AM 'Jim Idle' via golang-nuts < > golang-nuts@googlegroups.com> wrote: > > > The go.mod at the root was one thing that might work, but it will

Re: [go-nuts] Re: Weird error when trying to fetch a module.

2023-09-15 Thread Bruno Albuquerque
Unfortunately that would be difficult for me to do as it is not my project. I just implemented the Go version of it so I had to follow the standard they set (implementations are inside src/[language]. But thanks for the detailed summary of the issues. I will try the tag approach and see how it

Re: [go-nuts] Re: Weird error when trying to fetch a module.

2023-09-15 Thread Bruno Albuquerque
That might be doable. I will discuss this with the maintainers. Thanks for the suggestion. It is still a shame that workarounds like this need to exist. -Bruno On Fri, Sep 15, 2023 at 3:15 AM Brian Candler wrote: > > Keep your go source at the root of the repo and tag that > > Or would it

Re: [go-nuts] Re: Weird error when trying to fetch a module.

2023-09-15 Thread Bruno Albuquerque
Hey Lenny. Generally speaking @master is not required but it appears it is in this case due to it being in a subdirectory. I understand the issues involved (changes outside the module would affect its version anyway) but I am fine with that as long as the module can be used. It looks to me this

Re: [go-nuts] Re: Weird error when trying to fetch a module.

2023-09-15 Thread Jan Mercl
On Fri, Sep 15, 2023 at 10:31 AM 'Jim Idle' via golang-nuts < golang-nuts@googlegroups.com> wrote: > The go.mod at the root was one thing that might work, but it will cause the entire repo to be pulled in so the tag will still have to be sec/go/ etc. tl;dr: Putting a go.mod in the repository

Re: [go-nuts] Re: Weird error when trying to fetch a module.

2023-09-15 Thread 'Jim Idle' via golang-nuts
The go.mod at the root was one thing that might work, but it will cause the entire repo to be pulled in so the tag will still have to be sec/go/ etc. On Fri, Sep 15, 2023 at 15:15 Brian Candler wrote: > > Keep your go source at the root of the repo and tag that > > Or would it be OK just to put

Re: [go-nuts] Re: Weird error when trying to fetch a module.

2023-09-15 Thread Brian Candler
> Keep your go source at the root of the repo and tag that Or would it be OK just to put go.mod at the root of the repo, containing module github.com/flatgeobuf/flatgeobuf - and leave the rest of the source where it is? I believe that will still allow someone to import or get

Re: [go-nuts] Re: Weird error when trying to fetch a module.

2023-09-14 Thread 'Jim Idle' via golang-nuts
It’s an absolute nightmare to publish modules from subdirectories. I gave up for ANTLR and created a new repo with the source code in the root directory. But the art is that you need to create a tag named with the subdirectory. I was able to make that work until we needed a v{n} tag. Which as far

[go-nuts] Re: Weird error when trying to fetch a module.

2023-09-14 Thread Lenny Kneller
Hi Bruno, This command works `github.com/flatgeobuf/flatgeobuf/src/go@master`. I wonder if `@master` is needed because the repo has no packages published? There's more info about pseudo-versions here -Lenny- On Thursday, September 14, 2023 at 5:59:39 PM