Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
feat: update stdlib mapping for go1.17
* Drop go1.15
* Generate go1.17
* Update minimum extract version
* Update the CI config
  • Loading branch information
nrwiersma committed Aug 17, 2021
1 parent 5c73f30 commit 32cbcfb
Show file tree
Hide file tree
Showing 505 changed files with 9,357 additions and 1,454 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go-cross.yml
Expand Up @@ -17,7 +17,7 @@ jobs:

strategy:
matrix:
go-version: [ 1.15, 1.16 ]
go-version: [ 1.16, 1.17 ]
os: [ubuntu-latest, macos-latest, windows-latest]

include:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Expand Up @@ -7,7 +7,7 @@ on:
pull_request:

env:
GO_VERSION: 1.16
GO_VERSION: 1.17
GOLANGCI_LINT_VERSION: v1.41.1

jobs:
Expand Down Expand Up @@ -45,7 +45,7 @@ jobs:
needs: linting
strategy:
matrix:
go-version: [ 1.15, 1.16 ]
go-version: [ 1.16, 1.17 ]
steps:
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v2
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
working-directory: ${{ github.workspace }}/go/src/github.com/traefik/yaegi
strategy:
matrix:
go-version: [ 1.15, 1.16 ]
go-version: [ 1.16, 1.17 ]

steps:
- name: Set up Go ${{ matrix.go-version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Expand Up @@ -6,7 +6,7 @@ on:
- v[0-9]+.[0-9]+*

env:
GO_VERSION: 1.16
GO_VERSION: 1.17

jobs:

Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -18,7 +18,7 @@ It powers executable Go scripts and plugins, in embedded interpreters or interac
* Works everywhere Go works
* All Go & runtime resources accessible from script (with control)
* Security: `unsafe` and `syscall` packages neither used nor exported by default
* Support Go 1.15 and Go 1.16 (the latest 2 major releases)
* Support Go 1.16 and Go 1.17 (the latest 2 major releases)

## Install

Expand Down
2 changes: 1 addition & 1 deletion extract/extract.go
Expand Up @@ -446,7 +446,7 @@ func GetMinor(part string) string {
return minor
}

const defaultMinorVersion = 16
const defaultMinorVersion = 17

func genBuildTags() (string, error) {
version := runtime.Version()
Expand Down
2 changes: 1 addition & 1 deletion extract/extract_test.go
Expand Up @@ -43,7 +43,7 @@ func TestPackages(t *testing.T) {
// We check this one because it shows both defects when we break it: the value
// gets corrupted, and the type becomes token.INT
// TODO(mpl): if the ident between key and value becomes annoying, be smarter about it.
contains: `"MaxFloat64": reflect.ValueOf(constant.MakeFromLiteral("179769313486231570814527423731704356798100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", token.FLOAT, 0)),`,
contains: `"MaxFloat32": reflect.ValueOf(constant.MakeFromLiteral("340282346638528859811704183484516925440", token.FLOAT, 0)),`,
},
{
desc: "using relative path, using go.mod",
Expand Down
1 change: 1 addition & 0 deletions interp/build.go
Expand Up @@ -178,6 +178,7 @@ var knownArch = map[string]bool{
"amd64": true,
"arm": true,
"arm64": true,
"loong64": true,
"mips": true,
"mips64": true,
"mips64le": true,
Expand Down
3 changes: 2 additions & 1 deletion interp/run.go
Expand Up @@ -1879,7 +1879,8 @@ func writableDeref(v reflect.Value) reflect.Value {
// Here we have an interface to a struct. Any attempt to dereference it will
// make a copy of the struct. We need to get a Value to the actual struct.
// TODO: using unsafe is a temporary measure. Rethink this.
return reflect.NewAt(v.Elem().Type(), unsafe.Pointer(v.InterfaceData()[1])).Elem() //nolint:govet
// TODO: InterfaceData has been depreciated, this is even less of a good idea now.
return reflect.NewAt(v.Elem().Type(), unsafe.Pointer(v.InterfaceData()[1])).Elem() //nolint:govet,staticcheck
}

func getPtrIndexSeq(n *node) {
Expand Down
30 changes: 0 additions & 30 deletions stdlib/go1_15_go_parser.go

This file was deleted.

21 changes: 0 additions & 21 deletions stdlib/go1_15_os_signal.go

This file was deleted.

2 changes: 1 addition & 1 deletion stdlib/go1_16_archive_tar.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion stdlib/go1_16_archive_zip.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion stdlib/go1_16_bufio.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion stdlib/go1_16_bytes.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion stdlib/go1_16_compress_bzip2.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion stdlib/go1_16_compress_flate.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion stdlib/go1_16_compress_gzip.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion stdlib/go1_16_compress_lzw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion stdlib/go1_16_compress_zlib.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion stdlib/go1_16_container_heap.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion stdlib/go1_16_container_list.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion stdlib/go1_16_container_ring.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion stdlib/go1_16_context.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion stdlib/go1_16_crypto.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion stdlib/go1_16_crypto_aes.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion stdlib/go1_16_crypto_cipher.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion stdlib/go1_16_crypto_des.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion stdlib/go1_16_crypto_dsa.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion stdlib/go1_16_crypto_ecdsa.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion stdlib/go1_16_crypto_ed25519.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion stdlib/go1_16_crypto_elliptic.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion stdlib/go1_16_crypto_hmac.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion stdlib/go1_16_crypto_md5.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion stdlib/go1_16_crypto_rand.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion stdlib/go1_16_crypto_rc4.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion stdlib/go1_16_crypto_rsa.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion stdlib/go1_16_crypto_sha1.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion stdlib/go1_16_crypto_sha256.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion stdlib/go1_16_crypto_sha512.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion stdlib/go1_16_crypto_subtle.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion stdlib/go1_16_crypto_tls.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion stdlib/go1_16_crypto_x509.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 32cbcfb

Please sign in to comment.