Skip to content

Commit f2e581c

Browse files
committed
knowledge: update list of deprecated objects for Go 1.17
1 parent 440ad19 commit f2e581c

File tree

1 file changed

+78
-1
lines changed

1 file changed

+78
-1
lines changed

knowledge/deprecated.go

Lines changed: 78 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ type Deprecation struct {
1010
AlternativeAvailableSince int
1111
}
1212

13+
// go/importer.ForCompiler contains "Deprecated:", but it refers to a single argument, not the whole function.
14+
// Luckily, the notice starts in the middle of a paragraph, and as such isn't detected by us.
15+
1316
var StdlibDeprecations = map[string]Deprecation{
1417
// FIXME(dh): AllowBinary isn't being detected as deprecated
1518
// because the comment has a newline right after "Deprecated:"
@@ -30,6 +33,7 @@ var StdlibDeprecations = map[string]Deprecation{
3033
"compress/flate.WriteError": {6, DeprecatedUseNoLonger},
3134
"path/filepath.HasPrefix": {0, DeprecatedNeverUse},
3235
"(net/http.Transport).Dial": {7, 7},
36+
"(net/http.Transport).DialTLS": {14, 14},
3337
"(*net/http.Transport).CancelRequest": {6, 5},
3438
"net/http.ErrWriteAfterFlush": {7, DeprecatedUseNoLonger},
3539
"net/http.ErrHeaderTooLong": {8, DeprecatedUseNoLonger},
@@ -72,7 +76,7 @@ var StdlibDeprecations = map[string]Deprecation{
7276
"(net.Dialer).DualStack": {12, 12},
7377
"net/http.ErrUnexpectedTrailer": {12, DeprecatedUseNoLonger},
7478
"net/http.CloseNotifier": {11, 7},
75-
// This is hairy. The notice says "Not all errors in the http package related to protocol errors are of type ProtocolError", but doesn't that imply that
79+
// This is hairy. The notice says "Not all errors in the http package related to protocol errors are of type ProtocolError", but doesn't that imply that some errors do?
7680
"net/http.ProtocolError": {8, DeprecatedUseNoLonger},
7781
"(crypto/x509.CertificateRequest).Attributes": {5, 3},
7882

@@ -134,7 +138,80 @@ var StdlibDeprecations = map[string]Deprecation{
134138
"syscall.InterfaceAnnounceMessage": {7, 0},
135139
"syscall.InterfaceMulticastAddrMessage": {7, 0},
136140
"syscall.FormatMessage": {5, 0},
141+
"syscall.PostQueuedCompletionStatus": {17, 0},
142+
"syscall.GetQueuedCompletionStatus": {17, 0},
143+
"syscall.CreateIoCompletionPort": {17, 0},
137144

138145
// Not marked as deprecated with a recognizable header, but deprecated nonetheless.
139146
"io/ioutil": {16, 16},
140147
}
148+
149+
// Last imported from Go at 32b73ae18026e8a9dc4c5aa49999b1ea445bc68c with the following numbers of deprecations:
150+
//
151+
// chulak go@master ./src $ rg -c "Deprecated: "
152+
// vendor/golang.org/x/crypto/curve25519/curve25519.go:1
153+
// vendor/golang.org/x/text/transform/transform.go:1
154+
// cmd/compile/internal/types/sym.go:2
155+
// syscall/route_netbsd.go:1
156+
// syscall/route_bsd.go:7
157+
// syscall/lsf_linux.go:6
158+
// syscall/exec_unix.go:1
159+
// syscall/route_darwin.go:1
160+
// syscall/route_freebsd.go:2
161+
// syscall/route_dragonfly.go:2
162+
// syscall/bpf_darwin.go:18
163+
// syscall/route_openbsd.go:1
164+
// syscall/syscall_windows.go:6
165+
// syscall/syscall.go:3
166+
// syscall/bpf_bsd.go:18
167+
// cmd/compile/internal/types2/type.go:2
168+
// syscall/exec_plan9.go:1
169+
// cmd/internal/obj/textflag.go:1
170+
// cmd/internal/obj/link.go:5
171+
// cmd/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go:1
172+
// cmd/vendor/golang.org/x/mod/semver/semver.go:1
173+
// cmd/vendor/golang.org/x/sys/windows/syscall_windows.go:2
174+
// cmd/vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go:1
175+
// cmd/vendor/golang.org/x/mod/modfile/rule.go:2
176+
// cmd/vendor/golang.org/x/sys/windows/security_windows.go:1
177+
// cmd/go/internal/modcmd/edit.go:1
178+
// cmd/go/testdata/mod/example.com_deprecated_a_v1.9.0.txt:2
179+
// cmd/go/testdata/mod/example.com_undeprecated_v1.0.0.txt:2
180+
// cmd/go/testdata/mod/example.com_deprecated_b_v1.9.0.txt:2
181+
// encoding/csv/reader.go:2
182+
// encoding/json/decode.go:1
183+
// encoding/json/encode.go:1
184+
// cmd/go/testdata/script/mod_list_deprecated.txt:2
185+
// cmd/go/testdata/script/mod_deprecate_message.txt:4
186+
// cmd/go/testdata/script/mod_list_deprecated_replace.txt:1
187+
// runtime/cpuprof.go:1
188+
// cmd/go/testdata/script/mod_edit.txt:1
189+
// crypto/tls/common.go:6
190+
// crypto/rc4/rc4.go:1
191+
// crypto/dsa/dsa.go:1
192+
// path/filepath/path_unix.go:1
193+
// path/filepath/path_windows.go:1
194+
// path/filepath/path_plan9.go:1
195+
// regexp/regexp.go:1
196+
// crypto/x509/pem_decrypt.go:3
197+
// crypto/x509/x509.go:1
198+
// archive/zip/struct.go:6
199+
// archive/tar/common.go:2
200+
// debug/gosym/pclntab.go:2
201+
// compress/flate/inflate.go:2
202+
// image/geom.go:2
203+
// image/jpeg/reader.go:1
204+
// os/file.go:1
205+
// net/dial.go:2
206+
// net/http/server.go:2
207+
// net/http/socks_bundle.go:1
208+
// net/http/httputil/persist.go:8
209+
// net/http/request.go:6
210+
// net/http/transport.go:3
211+
// net/http/httptest/recorder.go:1
212+
// go/doc/doc.go:1
213+
// go/types/errorcodes.go:1
214+
// go/types/type.go:2
215+
// database/sql/driver/driver.go:6
216+
// text/template/parse/node.go:5
217+
// go/importer/importer.go:2

0 commit comments

Comments
 (0)