OK, thank you!

I will say I don't understand the thought process or improvement this is
adding.

I guess I have to change my docs? This seems not ideal. For the purposes of
explaining to new users how to do things:

go build go.wit.com/apps/helloworld@latest

was pretty simple. Now I have to actually put

go env -w GOTOOLCHAIN=local build go.wit.com/apps/helloworld@latest

That is un-ideal. It's amazingly complicated to know when you need a
specific toolchain. It almost never happens to anyone to even know when
that is possible. I'm a novice here and I know for sure I would never be
able to tell at this point. Why is this not the default
(GOTOOLCHAIN=local). You have to be really really really smart and
knowledgeable to know that you need a specific toolchain. Almost no one
ever will every know that is the case.

my 2 cents,
jcarr


On Fri, Dec 20, 2024 at 1:29 PM 'Brian Candler' via golang-nuts <
golang-nuts@googlegroups.com> wrote:

> > Can someone explain how to disable this? I never want to download
> anything at compile time.
>
> go env -w GOTOOLCHAIN=local
>
> On Friday, 20 December 2024 at 15:07:43 UTC Jeffery Carr wrote:
>
>> I also have noticed this new 'toolchain' option. I'm a bit confused about
>> how it works.
>>
>> "This automatic toolchain switching can be disabled, but in that case,
>> for more precise forwards compatibility, the go command will refuse to
>> run in a main module or workspace in which the go line requires a newer
>> version of Go."
>>
>> Can someone explain how to disable this? I never want to download
>> anything at compile time. I'm also sure there are a huge number of real
>> reasons why that is not acceptable.
>>
>> Is it acceptable to never publish a "toolchain" option in the go.mod file
>> or is it required? If it's not going to be required, I will just remove it
>> from all of my go.mod files before I publish them.
>>
>> Thanks in advance,
>> Jeff
>>
>> On Friday, December 20, 2024 at 2:11:30 AM UTC-6 cpu...@gmail.com wrote:
>>
>>> I already did- that's the first error message:
>>>
>>> go: errors parsing go.mod:
>>> go.mod:206: unknown block type: tool
>>>
>>> It seems that the forward compatibility does not work when the go.mod
>>> contains new sections as it fails to parse _before_ the actual Go version
>>> selection happens?
>>>
>>> On Thursday, December 19, 2024 at 7:54:21 PM UTC+1 Alex Bozhenko wrote:
>>>
>>>> You missed go:
>>>> go 1.24rc1
>>>> toolchain go1.24rc1
>>>>
>>>>
>>>> Go toolchain names¶ <https://go.dev/doc/toolchain#name>
>>>>
>>>> The standard Go toolchains are named go*V* where *V* is a Go version
>>>> denoting a beta release, release candidate, or release. For example,
>>>> go1.21rc1 and...
>>>>
>>>> Once you build, you can verify which version was used:
>>>> go version ./your_binary
>>>> https://tip.golang.org/doc/toolchain#config
>>>> > If the toolchain line is omitted, the module or workspace is
>>>> considered to have an implicit toolchain go*V* line, where *V* is the
>>>> Go version from the go line.
>>>>
>>>> So you only need to use 'go 1.24rc1' line.
>>>>
>>>> On Thursday, December 19, 2024 at 4:30:40 AM UTC-8 cpu...@gmail.com
>>>> wrote:
>>>>
>>>>> I'm preparing our application for go1.24, including using the tools
>>>>> go.mod directive. I was expecting that I should be able to require rc1 as
>>>>> part of the build process. However, adding
>>>>>
>>>>> go 1.24rc1
>>>>> toolchain 1.24rc1
>>>>>
>>>>> lead to either
>>>>>
>>>>> unknown block type: tool
>>>>> invalid toolchain version '1.24rc1': must match format go1.23.0 or
>>>>> default
>>>>>
>>>>> https://go.dev/doc/modules/gomod-ref does not mention RC versions,
>>>>> while https://go.dev/doc/toolchain does.
>>>>>
>>>>> Can RC versions be required through go.mod?
>>>>>
>>>>> Thanks,
>>>>> Andi
>>>>>
>>>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "golang-nuts" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/golang-nuts/DknrmQ9hi60/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> golang-nuts+unsubscr...@googlegroups.com.
> To view this discussion visit
> https://groups.google.com/d/msgid/golang-nuts/3d862d72-782b-4331-b20c-4f2f2bb1ff17n%40googlegroups.com
> <https://groups.google.com/d/msgid/golang-nuts/3d862d72-782b-4331-b20c-4f2f2bb1ff17n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/golang-nuts/CA%2BHr9griJqP8CfHHkm6d%2BED6JXHQ7vqxZnqrakSgBsd3smZj9w%40mail.gmail.com.

Reply via email to