Skip to content

Commit

Permalink
fix: remove go1.16 support
Browse files Browse the repository at this point in the history
  • Loading branch information
liuq19 committed Jun 3, 2024
1 parent 513b9e2 commit 0552722
Show file tree
Hide file tree
Showing 24 changed files with 27 additions and 2,875 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/compatibility_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
build:
strategy:
matrix:
go-version: [1.16.x, 1.17.x, 1.18.x, 1.19.x, 1.20.x, 1.21.x, 1.22.x]
go-version: [1.17.x, 1.18.x, 1.19.x, 1.20.x, 1.21.x, 1.22.x]
os: [arm, X64]
runs-on: ${{ matrix.os }}
steps:
Expand Down
1 change: 1 addition & 0 deletions ast/api.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build (amd64 && go1.17 && !go1.23) || (arm64 && go1.20 && !go1.23)
// +build amd64,go1.17,!go1.23 arm64,go1.20,!go1.23

/*
Expand Down
2 changes: 1 addition & 1 deletion ast/api_compat.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
)

func init() {
println("WARNING:(ast) sonic only supports Go1.16~1.22, but your environment is not suitable")
println("WARNING:(ast) sonic only supports go1.17~1.22, but your environment is not suitable")
}

func quote(buf *[]byte, val string) {
Expand Down
1 change: 1 addition & 0 deletions ast/api_native_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build (amd64 && go1.17 && !go1.23) || (arm64 && go1.20 && !go1.23)
// +build amd64,go1.17,!go1.23 arm64,go1.20,!go1.23

/*
Expand Down
2 changes: 1 addition & 1 deletion ast/b64_amd64.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// +build amd64,go1.16
// +build amd64,go1.17

/**
* Copyright 2023 ByteDance Inc.
Expand Down
2 changes: 1 addition & 1 deletion ast/b64_compat.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// +build !amd64 !go1.16
// +build !amd64 !go1.17

/*
* Copyright 2022 ByteDance Inc.
Expand Down
2 changes: 1 addition & 1 deletion encoder/encoder_compat.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
)

func init() {
println("WARNING:(encoder) sonic only supports Go1.17~1.22 && CPU amd64, but your environment is not suitable")
println("WARNING:(encoder) sonic only supports (Go1.17~1.22 && CPU amd64) or (G01.20~1.22 && CPU arm64) , but your environment is not suitable")
}

// EnableFallback indicates if encoder use fallback
Expand Down
4 changes: 2 additions & 2 deletions internal/decoder/api/decoder_amd64.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build go1.16 && !go1.23
// +build go1.16,!go1.23
//go:build go1.17 && !go1.23
// +build go1.17,!go1.23

/*
* Copyright 2021 ByteDance Inc.
Expand Down
2 changes: 1 addition & 1 deletion internal/decoder/api/decoder_arm64.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// +build go1.16,!go1.23
// +build go1.17,!go1.23

/*
* Copyright 2021 ByteDance Inc.
Expand Down
130 changes: 0 additions & 130 deletions internal/decoder/jitdec/asm_stubs_amd64_go116.go

This file was deleted.

Loading

0 comments on commit 0552722

Please sign in to comment.