Please help with Go 1.16 release notes

879 views
Skip to first unread message

Dmitri Shuralyov

unread,
Dec 2, 2020, 7:30:39 PM12/2/20
to golang-dev
Hi gophers,

Everyone has worked hard to make the upcoming Go 1.16 release the best one
yet—thank you! In addition to writing Go code, we need to communicate notable
changes to all the future Go 1.16 users so that our hard work doesn't go unseen.

There are currently 30 matches for "TODO" at https://tip.golang.org/doc/go1.16,
and we need your help to get to a complete draft of the Go 1.16 release notes,
which will unblock the Go 1.16 Beta 1 release.

I've recently made bite-sized issues for each distinct section that has outstanding TODOs:

Some of you have already started closing them, but there are more available for the taking.
Gophers are great at concurrency, after all, so please jump in if you can!
Thank you again for your contributions, we really appreciate all of your help!

Dmitri

Dmitri Shuralyov

unread,
Dec 10, 2020, 6:35:52 PM12/10/20
to golang-dev
Thank you everyone for helping resolve all those TODOs so quickly!
It was great to see so many of you working effectively together, and
as a result we have a complete draft of the Go 1.16 release notes now.

There is still time to improve the draft from now until the final release,
so feel free to continue sending CLs if you spot any opportunities for
improvement, or if we missed something.

ben...@gmail.com

unread,
Dec 13, 2020, 3:20:46 PM12/13/20
to golang-dev
Looking good! The embed stuff and FS (and ReadDir!) look really good.

Under "File Systems", it links to https://tip.golang.org/pkg/io/fs/#FS, which mentions io/fsutil, but that package doesn't seem to exist. Typo, or is io/fsutil coming before release?

-Ben

Tobias Klauser

unread,
Dec 14, 2020, 5:17:59 AM12/14/20
to golang-dev
On Sunday, 13 December 2020 at 21:20:46 UTC+1 ben...@gmail.com wrote:
Looking good! The embed stuff and FS (and ReadDir!) look really good.

Under "File Systems", it links to https://tip.golang.org/pkg/io/fs/#FS, which mentions io/fsutil, but that package doesn't seem to exist. Typo, or is io/fsutil coming before release?

This looks like an oversight. I've sent https://golang.org/cl/277377 with a fix.

Thanks!

ben...@gmail.com

unread,
Jan 25, 2021, 3:16:57 AM1/25/21
to golang-dev
Just a couple of comments about the release notes:

1) At https://tip.golang.org/doc/go1.16#minor_library_changes under path/filepath, the links to WalkDir and Walk are broken -- I believe they should be #WalkDir and #Walk instead of /WalkDir and /Walk.

2) I think it'd be great if there was an explicit mention of the new fs.ReadDir (or os.ReadDir) function and fs.DirEntry type, either under the "File Systems" heading or under "os" module. The FS interface is great, but fs.ReadDir/os.ReadDir add a new system-level ability (using ReadDirent or readdir on Unix and FindFirst/FindNext on Windows) to more efficiently walk directory trees without so many system calls to stat. A related improvement is mentioned under path/filepath.WalkDir, but the actual system-level enhancement is provided by fs.ReadDir/os.ReadDir and fs.DirEntry. Perhaps something like this under the "os" module heading:

The new _ReadDir_ function reads a directory and returns the entries as a slice of _DirEntry_ instances, which makes traversing a directory more efficient by avoiding an operating system "stat" call in many cases. The new (*File).ReadDir method also returns _DirEntry_ instances (not to be confused with the existing Readdir method, which returns FileInfo instances).

3) Scanning the "os" package docs for 1.16, it seems there are too many things listed as new in 1.16. For example, https://tip.golang.org/pkg/os/#File.Readdir is listed as new in 1.16, when it's not.

-Ben

Ian Lance Taylor

unread,
Jan 25, 2021, 7:17:38 PM1/25/21
to ben...@gmail.com, golang-dev
On Mon, Jan 25, 2021 at 12:17 AM ben...@gmail.com <ben...@gmail.com> wrote:
>
> Just a couple of comments about the release notes:
>
> 1) At https://tip.golang.org/doc/go1.16#minor_library_changes under path/filepath, the links to WalkDir and Walk are broken -- I believe they should be #WalkDir and #Walk instead of /WalkDir and /Walk.
>
> 2) I think it'd be great if there was an explicit mention of the new fs.ReadDir (or os.ReadDir) function and fs.DirEntry type, either under the "File Systems" heading or under "os" module. The FS interface is great, but fs.ReadDir/os.ReadDir add a new system-level ability (using ReadDirent or readdir on Unix and FindFirst/FindNext on Windows) to more efficiently walk directory trees without so many system calls to stat. A related improvement is mentioned under path/filepath.WalkDir, but the actual system-level enhancement is provided by fs.ReadDir/os.ReadDir and fs.DirEntry. Perhaps something like this under the "os" module heading:
>
> The new _ReadDir_ function reads a directory and returns the entries as a slice of _DirEntry_ instances, which makes traversing a directory more efficient by avoiding an operating system "stat" call in many cases. The new (*File).ReadDir method also returns _DirEntry_ instances (not to be confused with the existing Readdir method, which returns FileInfo instances).
>
> 3) Scanning the "os" package docs for 1.16, it seems there are too many things listed as new in 1.16. For example, https://tip.golang.org/pkg/os/#File.Readdir is listed as new in 1.16, when it's not.

Thanks. I believe that all of these issues are now addressed.

Ian

Ben Hoyt

unread,
Jan 25, 2021, 7:22:55 PM1/25/21
to Ian Lance Taylor, golang-dev
Thanks. 1) and 2) are fixed (excellent level of detail there, thanks). Still looks like 3) is an issue, though, as File.Readdir is still marked as new in 1.16.

Ian Lance Taylor

unread,
Jan 25, 2021, 7:26:44 PM1/25/21
to Ben Hoyt, golang-dev
On Mon, Jan 25, 2021 at 4:22 PM Ben Hoyt <ben...@gmail.com> wrote:
>
> Thanks. 1) and 2) are fixed (excellent level of detail there, thanks). Still looks like 3) is an issue, though, as File.Readdir is still marked as new in 1.16.

Sorry, I should have read more closely. I don't think that
os.File.Readdir is reported as new in the 1.16 release notes. What is
correctly reported as new is os.File.ReadDir. Note the change in case
in the second 'd'. That is, we now have both os.File.Readdir and
os.File.ReadDir. Please let me know if I misunderstand. Thanks.

Ian

Dmitri Shuralyov

unread,
Jan 25, 2021, 7:34:22 PM1/25/21
to Ian Lance Taylor, Ben Hoyt, golang-dev
This is coming from our api/go1.16.txt file:


Maybe Readdir shows up in go1.16.txt (in addition to go1.txt) because it now returns fs.FileInfo, an alias to os.FileInfo. I'll take a closer look.

--
You received this message because you are subscribed to a topic in the Google Groups "golang-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/golang-dev/gsoj5Vv15j0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to golang-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-dev/CAOyqgcWUNMUHw8ZwYN1eHtU5_PJ0RNcFqYRXXk7WV5FB_m2qdg%40mail.gmail.com.

Ben Hoyt

unread,
Jan 25, 2021, 7:36:30 PM1/25/21
to Dmitri Shuralyov, Ian Lance Taylor, golang-dev
Thanks Dmitri. Yeah, that explanation seems likely.

Ian, to clarify, it's the "1.16" that's showing up to the right of (*File).Readdir (lowercase d) here that I think is incorrect: https://tip.golang.org/pkg/os/#File.Readdir, because (*File).Readdir existed prior to 1.16 (as shown in the 1.15 docs here: https://golang.org/pkg/os/#File.Readdir).

-Ben

Ian Lance Taylor

unread,
Jan 25, 2021, 7:44:59 PM1/25/21
to Ben Hoyt, Dmitri Shuralyov, golang-dev
On Mon, Jan 25, 2021 at 4:36 PM Ben Hoyt <ben...@gmail.com> wrote:
>
> Thanks Dmitri. Yeah, that explanation seems likely.
>
> Ian, to clarify, it's the "1.16" that's showing up to the right of (*File).Readdir (lowercase d) here that I think is incorrect: https://tip.golang.org/pkg/os/#File.Readdir, because (*File).Readdir existed prior to 1.16 (as shown in the 1.15 docs here: https://golang.org/pkg/os/#File.Readdir).

Ah, I see. I would also assume that that is happening because the
signature changed. Thanks.

Dmitri Shuralyov

unread,
Feb 2, 2021, 11:58:07 PM2/2/21
to golang-dev
As far as I can tell, the api/go*.txt files are okay;
the issue is is in how x/tools/godoc uses them.
Opened golang.org/issue/44081 and sent CL 289089.
After it goes through review, I'll update golang.org too.
Reply all
Reply to author
Forward
0 new messages