#0.9.11 error when go.mod is present in a top level dir

1 messages ยท Page 1 of 1 (latest)

warm cloak
#

In the above gist it happens even without a go.work. But the issue prevails if all you have is a go.work too

#

I tried removing the engine and volume. So, it's unlikely it's related to my local env. In case you are curious it's a M1 Mac on Ventura.

robust saffron
#

Oh I'm currently afk, but did have an idea if you're still around - if you rename your top-level package name to something other than "main", does it work?

robust saffron
#

But I'll try reproing this tomorrow, thanks!

warm cloak
#

sorry I was at lunch, just got back. Let me try.

#

actually in my repro, the module is not named main

#

I tried chaning the package name in main.go to mypackage but that didn't fix the dagger issue either

robust saffron
#

ok, so i can't actually repro with the base of what you've got... but i can repro it if there's a go.work in a parent dir somewhere

#

i'm gonna work on improving the error messages here

#

and also there are some legitimate looking issues annoyingly that are related, but not the same

robust saffron
#

ok, any chance i could grab some logs from you that have dagger --progress=plain

#

you should be able to get more complete logs from that

warm cloak
#

sure! from the repro?

robust saffron
#

yeah, i can't quite get your repro to occur annoyingly

#

i can get something pretty close if i change the version number to 1.22.0 though

warm cloak
#

oops.. things were just working and I was wondering why.. It's because I was on 0.9.10.. switching now.

#

oh man.. let me pipe this to a file. error is massive

#

hmm... I can't seem to coerce the output into a file. What's the easiest way to do it? The > operator didn't work. TUI is maybe messing with things

robust saffron
#

you can use 2>

#

> only redirects stdout, 2> redirects stderr, and &> redirects both of them

warm cloak
#

^^^^ without go.work.

robust saffron
#
go: download go1.21.5: golang.org/toolchain@v0.0.1-go1.21.5.linux-arm64: Get "https://storage.googleapis.com/proxy-golang-org-prod/e3a0552068301ffd-golang.org:toolchain-v0.0.1-go1.21.5.linux-arm64.zip?Expires=1708602104&GoogleAccessId=gcs-urlsigner-prod%40golang-modproxy.iam.gserviceaccount.com&Signature=MoBt7CNr5SE8iWfeTtWGxRAFm5wUBte9o3rAW98cMqwtqKLh9sws3gkBh3qEghHCDx9SaEtnvhNqFePDM2rJy%2FNYR21wYEg3bFvpDAAll6v3gHffd5bmK8b6vmA4SzN9w93j8MNpsHvrRa7%2FLkfQmQ4Nr1fqnGzM4fkVxCgLl36yK1Lqui4K8T%2Bld%2FpavI6gv%2FC%2FiXIc9e%2FLTSgIMYASp%2Frr6CwVYF57BZ9nIyWQUHIibqTGzB05X8Y85F%2BM4dZt7Te5aZ3MB8mdDOe4%2B6fFKXMRDJtv7p0MJyhmzoDOLbDy3V43Hl5e1aKQ38YuW%2FDCJzMpPoe5MySgjpIHcn0GDQ%3D%3D": tls: failed to verify certificate: x509: certificate signed by unknown authority
 err: exit status 1: stderr: go: downloading go1.21.5 (linux/arm64)
#

GOTOOLCHAIN strikes again ๐Ÿ˜ข

#

set your go.mod to 1.21.3, and it should hack it to work

#

since then it won't attempt that download

warm cloak
#

oh... what if I update my local go?

robust saffron
#

yeah ๐Ÿ˜„ i'm trying to dig into this

warm cloak
#

wait I am on 1.21.5 hmm

robust saffron
#

even if you don't get cert issues, trying to do go 1.22 is an absolutely horrible pain

robust saffron
warm cloak
#

ah

#

this go version juggling is starting to become a problem

robust saffron
#

๐Ÿ™‚ yup

warm cloak
#

ok swtiching to 1.21.3 worked (for no go.work use case)

#

ok I can repro by adding a go.work. Even with go version 1.21.3. Do you want to log for that?

robust saffron
#

yeah, that would also be helpful

warm cloak
#

All I did was go work init and go work use .

robust saffron
#

I think the go.work will have a line that says 1.21.5 in it

#

since go work init by default uses the toolchain version

#

so this is the same issue as the last one, i see the same cert error

warm cloak
#

bleh

#

sigh ok that fixed it

#

nice catch. I was so put off by the massive log dump I didn't look close enough. that's my bad.

robust saffron
#

if you could maybe link+reference this discussion to the github issue you have open about using behind a corporate proxy, this definitely seems related

warm cloak
#

sure let me find that

robust saffron
#

huge thanks for the debugging you've helped with here - the go.work stuff is miserable, and versioning balancing isn't very fun, but because of this, hopefully we're gonna have a really smooth experience soon โค๏ธ

warm cloak
#

happy to help ๐Ÿ™‚ It's basically helping you help me haha

warm cloak