Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api: audit for Go 1.15 go1.15.txt #39489

Closed
toothrot opened this issue Jun 9, 2020 · 5 comments
Closed

api: audit for Go 1.15 go1.15.txt #39489

toothrot opened this issue Jun 9, 2020 · 5 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Milestone

Comments

@toothrot
Copy link
Contributor

toothrot commented Jun 9, 2020

CL 237297 introduced the following for Go 1.15:

New API changes for Go 1.15:

CL 225557:

  • pkg bufio, var ErrBadReadCount error

CL 224937:

  • pkg crypto, method (Hash) String() string

CL 217940:

  • pkg crypto/ecdsa, func SignASN1(io.Reader, *PrivateKey, []uint8) ([]uint8, error)
  • pkg crypto/ecdsa, func VerifyASN1(*PublicKey, []uint8, []uint8) bool

CL 231417:

  • pkg crypto/ecdsa, method (*PrivateKey) Equal(crypto.PrivateKey) bool
  • pkg crypto/ed25519, method (PrivateKey) Equal(crypto.PrivateKey) bool
  • pkg crypto/rsa, method (*PrivateKey) Equal(crypto.PrivateKey) bool

CL 223754:

  • pkg crypto/ecdsa, method (*PublicKey) Equal(crypto.PublicKey) bool
  • pkg crypto/ed25519, method (PublicKey) Equal(crypto.PublicKey) bool
  • pkg crypto/rsa, method (*PublicKey) Equal(crypto.PublicKey) bool

CL 202819:

  • pkg crypto/elliptic, func MarshalCompressed(Curve, *big.Int, *big.Int) []uint8
  • pkg crypto/elliptic, func UnmarshalCompressed(Curve, []uint8) (*big.Int, *big.Int)

CL 214977:

  • pkg crypto/tls, method (*Dialer) Dial(string, string) (net.Conn, error)
  • pkg crypto/tls, method (*Dialer) DialContext(context.Context, string, string) (net.Conn, error)
  • pkg crypto/tls, type Dialer struct
  • pkg crypto/tls, type Dialer struct, Config *Config
  • pkg crypto/tls, type Dialer struct, NetDialer *net.Dialer

CL 208226:

  • pkg crypto/tls, method (ClientAuthType) String() string
  • pkg crypto/tls, method (CurveID) String() string
  • pkg crypto/tls, method (SignatureScheme) String() string

CL 229122:

  • pkg crypto/tls, type Config struct, VerifyConnection func(ConnectionState) error

CL 217298:

  • pkg crypto/x509, func CreateRevocationList(io.Reader, *RevocationList, *Certificate, crypto.Signer) ([]uint8, error)
  • pkg crypto/x509, type RevocationList struct
  • pkg crypto/x509, type RevocationList struct, ExtraExtensions []pkix.Extension
  • pkg crypto/x509, type RevocationList struct, NextUpdate time.Time
  • pkg crypto/x509, type RevocationList struct, Number *big.Int
  • pkg crypto/x509, type RevocationList struct, RevokedCertificates []pkix.RevokedCertificate
  • pkg crypto/x509, type RevocationList struct, SignatureAlgorithm SignatureAlgorithm
  • pkg crypto/x509, type RevocationList struct, ThisUpdate time.Time

CL 145758:

  • pkg database/sql, method (*DB) SetConnMaxIdleTime(time.Duration)
  • pkg database/sql, type DBStats struct, MaxIdleTimeClosed int64

CL 214317:

  • pkg database/sql, method (*Row) Err() error

CL 223963:

  • pkg database/sql/driver, type Validator interface { IsValid }
  • pkg database/sql/driver, type Validator interface, IsValid() bool

CL 222637:

  • pkg debug/pe, const IMAGE_DLLCHARACTERISTICS_APPCONTAINER = 4096
  • pkg debug/pe, const IMAGE_DLLCHARACTERISTICS_APPCONTAINER ideal-int
  • pkg debug/pe, const IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE = 64
  • pkg debug/pe, const IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE ideal-int
  • pkg debug/pe, const IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY = 128
  • pkg debug/pe, const IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY ideal-int
  • pkg debug/pe, const IMAGE_DLLCHARACTERISTICS_GUARD_CF = 16384
  • pkg debug/pe, const IMAGE_DLLCHARACTERISTICS_GUARD_CF ideal-int
  • pkg debug/pe, const IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA = 32
  • pkg debug/pe, const IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA ideal-int
  • pkg debug/pe, const IMAGE_DLLCHARACTERISTICS_NO_BIND = 2048
  • pkg debug/pe, const IMAGE_DLLCHARACTERISTICS_NO_BIND ideal-int
  • pkg debug/pe, const IMAGE_DLLCHARACTERISTICS_NO_ISOLATION = 512
  • pkg debug/pe, const IMAGE_DLLCHARACTERISTICS_NO_ISOLATION ideal-int
  • pkg debug/pe, const IMAGE_DLLCHARACTERISTICS_NO_SEH = 1024
  • pkg debug/pe, const IMAGE_DLLCHARACTERISTICS_NO_SEH ideal-int
  • pkg debug/pe, const IMAGE_DLLCHARACTERISTICS_NX_COMPAT = 256
  • pkg debug/pe, const IMAGE_DLLCHARACTERISTICS_NX_COMPAT ideal-int
  • pkg debug/pe, const IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE = 32768
  • pkg debug/pe, const IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE ideal-int
  • pkg debug/pe, const IMAGE_DLLCHARACTERISTICS_WDM_DRIVER = 8192
  • pkg debug/pe, const IMAGE_DLLCHARACTERISTICS_WDM_DRIVER ideal-int
  • pkg debug/pe, const IMAGE_FILE_32BIT_MACHINE = 256
  • pkg debug/pe, const IMAGE_FILE_32BIT_MACHINE ideal-int
  • pkg debug/pe, const IMAGE_FILE_AGGRESIVE_WS_TRIM = 16
  • pkg debug/pe, const IMAGE_FILE_AGGRESIVE_WS_TRIM ideal-int
  • pkg debug/pe, const IMAGE_FILE_BYTES_REVERSED_HI = 32768
  • pkg debug/pe, const IMAGE_FILE_BYTES_REVERSED_HI ideal-int
  • pkg debug/pe, const IMAGE_FILE_BYTES_REVERSED_LO = 128
  • pkg debug/pe, const IMAGE_FILE_BYTES_REVERSED_LO ideal-int
  • pkg debug/pe, const IMAGE_FILE_DEBUG_STRIPPED = 512
  • pkg debug/pe, const IMAGE_FILE_DEBUG_STRIPPED ideal-int
  • pkg debug/pe, const IMAGE_FILE_DLL = 8192
  • pkg debug/pe, const IMAGE_FILE_DLL ideal-int
  • pkg debug/pe, const IMAGE_FILE_EXECUTABLE_IMAGE = 2
  • pkg debug/pe, const IMAGE_FILE_EXECUTABLE_IMAGE ideal-int
  • pkg debug/pe, const IMAGE_FILE_LARGE_ADDRESS_AWARE = 32
  • pkg debug/pe, const IMAGE_FILE_LARGE_ADDRESS_AWARE ideal-int
  • pkg debug/pe, const IMAGE_FILE_LINE_NUMS_STRIPPED = 4
  • pkg debug/pe, const IMAGE_FILE_LINE_NUMS_STRIPPED ideal-int
  • pkg debug/pe, const IMAGE_FILE_LOCAL_SYMS_STRIPPED = 8
  • pkg debug/pe, const IMAGE_FILE_LOCAL_SYMS_STRIPPED ideal-int
  • pkg debug/pe, const IMAGE_FILE_NET_RUN_FROM_SWAP = 2048
  • pkg debug/pe, const IMAGE_FILE_NET_RUN_FROM_SWAP ideal-int
  • pkg debug/pe, const IMAGE_FILE_RELOCS_STRIPPED = 1
  • pkg debug/pe, const IMAGE_FILE_RELOCS_STRIPPED ideal-int
  • pkg debug/pe, const IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP = 1024
  • pkg debug/pe, const IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP ideal-int
  • pkg debug/pe, const IMAGE_FILE_SYSTEM = 4096
  • pkg debug/pe, const IMAGE_FILE_SYSTEM ideal-int
  • pkg debug/pe, const IMAGE_FILE_UP_SYSTEM_ONLY = 16384
  • pkg debug/pe, const IMAGE_FILE_UP_SYSTEM_ONLY ideal-int
  • pkg debug/pe, const IMAGE_SUBSYSTEM_EFI_APPLICATION = 10
  • pkg debug/pe, const IMAGE_SUBSYSTEM_EFI_APPLICATION ideal-int
  • pkg debug/pe, const IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER = 11
  • pkg debug/pe, const IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER ideal-int
  • pkg debug/pe, const IMAGE_SUBSYSTEM_EFI_ROM = 13
  • pkg debug/pe, const IMAGE_SUBSYSTEM_EFI_ROM ideal-int
  • pkg debug/pe, const IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER = 12
  • pkg debug/pe, const IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER ideal-int
  • pkg debug/pe, const IMAGE_SUBSYSTEM_NATIVE = 1
  • pkg debug/pe, const IMAGE_SUBSYSTEM_NATIVE ideal-int
  • pkg debug/pe, const IMAGE_SUBSYSTEM_NATIVE_WINDOWS = 8
  • pkg debug/pe, const IMAGE_SUBSYSTEM_NATIVE_WINDOWS ideal-int
  • pkg debug/pe, const IMAGE_SUBSYSTEM_OS2_CUI = 5
  • pkg debug/pe, const IMAGE_SUBSYSTEM_OS2_CUI ideal-int
  • pkg debug/pe, const IMAGE_SUBSYSTEM_POSIX_CUI = 7
  • pkg debug/pe, const IMAGE_SUBSYSTEM_POSIX_CUI ideal-int
  • pkg debug/pe, const IMAGE_SUBSYSTEM_UNKNOWN = 0
  • pkg debug/pe, const IMAGE_SUBSYSTEM_UNKNOWN ideal-int
  • pkg debug/pe, const IMAGE_SUBSYSTEM_WINDOWS_BOOT_APPLICATION = 16
  • pkg debug/pe, const IMAGE_SUBSYSTEM_WINDOWS_BOOT_APPLICATION ideal-int
  • pkg debug/pe, const IMAGE_SUBSYSTEM_WINDOWS_CE_GUI = 9
  • pkg debug/pe, const IMAGE_SUBSYSTEM_WINDOWS_CE_GUI ideal-int
  • pkg debug/pe, const IMAGE_SUBSYSTEM_WINDOWS_CUI = 3
  • pkg debug/pe, const IMAGE_SUBSYSTEM_WINDOWS_CUI ideal-int
  • pkg debug/pe, const IMAGE_SUBSYSTEM_WINDOWS_GUI = 2
  • pkg debug/pe, const IMAGE_SUBSYSTEM_WINDOWS_GUI ideal-int
  • pkg debug/pe, const IMAGE_SUBSYSTEM_XBOX = 14
  • pkg debug/pe, const IMAGE_SUBSYSTEM_XBOX ideal-int

CL 231461:

  • pkg go/printer, const StdFormat = 16
  • pkg go/printer, const StdFormat Mode

CL 231459:

  • pkg go/types, type Config struct, UsesCgo bool

CL 230397:

  • pkg math/big, method (*Int) FillBytes([]uint8) []uint8

CL 228641:

  • pkg net, method (*Resolver) LookupIP(context.Context, string, string) ([]IP, error)

CL 227645:

  • pkg net/url, method (*URL) EscapedFragment() string
  • pkg net/url, type URL struct, RawFragment string

CL 207082:

  • pkg net/url, method (*URL) Redacted() string

CL 229101:

  • pkg os, method (*File) ReadFrom(io.Reader) (int64, error)

CL 228645:

  • pkg os, var ErrDeadlineExceeded error

CL 187919:

  • pkg regexp, method (*Regexp) SubexpIndex(string) int

CL 216617:

  • pkg strconv, func FormatComplex(complex128, uint8, int, int) string
  • pkg strconv, func ParseComplex(string, int) (complex128, error)

CL 205899:

  • pkg sync, method (*Map) LoadAndDelete(interface{}) (interface{}, bool)

CL 226877:

  • pkg testing, type TB interface, TempDir() string
  • pkg testing, method (*B) TempDir() string
  • pkg testing, method (*T) TempDir() string

CL 202758:

  • pkg testing, method (*T) Deadline() (time.Time, bool)

CL 220424:

  • pkg time, method (*Ticker) Reset(Duration)

/cc @golang/osp-team

@toothrot toothrot added release-blocker okay-after-beta1 Used by release team to mark a release-blocker issue as okay to resolve either before or after beta1 labels Jun 9, 2020
@toothrot toothrot added this to the Go1.15 milestone Jun 9, 2020
@toothrot toothrot removed the okay-after-beta1 Used by release team to mark a release-blocker issue as okay to resolve either before or after beta1 label Jun 10, 2020
@ianlancetaylor
Copy link
Contributor

bufio.ErrBadReadCount (https://golang.org/cl/225557) did not have a proposal, but is consistent with other errors in the package.

crypto.Hash.String proposal #33430.

crypto/ecdsa ASN1 functions proposal #20544.

The various PublicKey.Equal methods were proposal #21704.
The various PrivateKey.Equal methods were a follow-on bug fix.

crypto/elliptic Compressed methods proposal #34105.

crypto/tls.Dialer proposal #18482.

crypto/tls String methods proposal #35499.

crypto/tls.Config.VerifyConnection proposal #36736.

crypto/x509.RevocationList proposal #35428.

database/sql.DB.SetConnMaxIdleTime proposal #25232.

database/sql.Row.Err proposal #35804.

database/sql/driver.Validator committed without going through the proposal process. Original commit https://golang.org/cl/174122 for #31480, then the type was renamed in https://golang.org/cl/223963 based on a suggestion from @rsc.

The debug/pe constant additions are just filling out more values defined by the object file format. No proposal required.

go/printer.StdFormat (https://golang.org/cl/231461) discussed on #37476, but no actual proposal.

go/types.Config.UsesCgo proposal #16623.

math/big.Int.FillBytes proposal #35833.

net.Resolver.LookupIP proposal #30452.

net/url/URL/EscapedFragment proposal #37776.

net/url.URL.Redacted proposal #34855.

os.File.ReadFrom (https://golang.org/cl/229101) no actual proposal. For #36817.

os.ErrDeadlineExceeded discussed by proposal review committee in #31449.

regexp.Regexp.SubexpIndex proposal #32420.

strconv.FormatComplex, ParseComplex proposal #36771.

sync.Map.LoadAndDelete proposal #33762.

testing.TB.TempDir proposal #35998.

testingT.Deadline proposal #28135.

time.Ticker.Reset proposal #33184.

@ianlancetaylor
Copy link
Contributor

Explicitly calling out additions in 1.15 that were not routine changes and did not go through the proposal review committee. They all look fine to me.

CC @rsc

bufio.ErrBadReadCount (https://golang.org/cl/225557)

database/sql/driver.Validator (https://golang.org/cl/174122, https://golang.org/cl/223963)

go/printer.StdFormat (https://golang.org/cl/231461)

os.(*File).ReadFrom (https://golang.org/cl/229101)

@andybons andybons added the NeedsFix The path to resolution is known, but the work has not been done. label Jun 15, 2020
@toothrot
Copy link
Contributor Author

/cc @bradfitz @kardianos for database/sql changes
/cc @griesemer for go/printer
/cc @bradfitz @ianlancetaylor for net
/cc @rsc @robpike @ianlancetaylor @bradfitz @griesemer for os
/cc @rsc for regexp
/cc @rsc @ianlancetaylor @dvyukov @aclements for sync

Please review the new APIs added for Go 1.15, and check off the addition if it is acceptable, ideally having gone through our proposal process (see @ianlancetaylor's comments above). Adding the applicable proposal is welcome if it exists.

Thanks!

@rsc
Copy link
Contributor

rsc commented Jun 23, 2020

I looked over the APIs that @ianlancetaylor flagged above, as well as the entire list. They all look good. Thanks.

@rsc rsc closed this as completed Jun 23, 2020
@gopherbot
Copy link

Change https://golang.org/cl/240683 mentions this issue: go/printer: remove exported StdFormat flag

gopherbot pushed a commit that referenced this issue Jul 17, 2020
The StdFormat flag was added as part of CL 231461, where the primary aim
was to fix the bug #37476. It's expected that the existing printer modes
only adjust spacing but do not change any of the code text itself. A new
printing flag served as a way for cmd/gofmt and go/format to delegate
a part of formatting work to the printer—where it's more more convenient
and efficient to perform—while maintaining current low-level printing
behavior of go/printer unmodified.

We already have cmd/gofmt and the go/format API that implement standard
formatting of Go source code, so there isn't a need to expose StdFormat
flag to the world, as it can only cause confusion.

Consider that to format source in canonical gofmt style completely it
may require tasks A, B, C to be done. In one version of Go, the printer
may do both A and B, while cmd/gofmt and go/format will do the remaining
task C. In another version, the printer may take on doing just A, while
cmd/gofmt and go/format will perform B and C. This makes it hard to add
a gofmt-like mode to the printer without compromising on above fluidity.

This change prefers to shift back some complexity to the implementation
of the standard library, allowing us to avoid creating the new exported
printing flag just for the internal needs of gofmt and go/format today.

We may still want to re-think the API and consider if something better
should be added, but unfortunately there isn't time for Go 1.15. We are
not adding new APIs now, so we can defer this decision until Go 1.16 or
later, when there is more time.

For #37476.
For #37453.
For #39489.
For #37419.

Change-Id: I0bb07156dca852b043487099dcf05c5350b29e20
Reviewed-on: https://go-review.googlesource.com/c/go/+/240683
Reviewed-by: Robert Griesemer <gri@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
@golang golang locked and limited conversation to collaborators Jul 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Projects
None yet
Development

No branches or pull requests

5 participants