this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

all: drop support for Go 1.16.x

Now that Go 1.18 has been out for a couple of months,
we can go ahead and drop the now-unsupported Go 1.16.x.
This is also important for keeping our dependencies up to date,
as a few of them like github.com/protocolbuffers/txtpbfmt
have already started to use std APIs added in Go 1.17.

Note that we also switch CI to run `go generate` with the latest stable
Go version we test on, 1.18.x, rather than the oldest,
which will now be 1.17.x rather than 1.16.x.

Using the oldest used to be an important detail,
as `go generate` would automatically run the qgo tool,
which would then copy code from Go's standard library.
Since CL 536072, that step is now manual, so CI is no longer involved.

Using the newest stable Go version is also more consistent,
as the majority of the developers working on CUE will use that version,
so that is the version they will run `go generate` with.

Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: Id6c1b7d12dead62be2ba4612eca24ba756e4bdd3
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/537704
Unity-Result: CUEcueckoo <cueckoo@cuelang.org>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Reviewed-by: Paul Jolly <paul@myitcv.io>

+22 -48
+1 -2
.github/workflows/test.yml
··· 33 33 fail-fast: false 34 34 matrix: 35 35 go-version: 36 - - 1.16.x 37 36 - 1.17.x 38 37 - 1.18.x 39 38 os: ··· 84 83 restore-keys: ${{ runner.os }}-${{ matrix.go-version }}-go- 85 84 - if: ${{ github.ref == 'refs/heads/master' }} 86 85 run: echo CUE_LONG=true >> $GITHUB_ENV 87 - - if: matrix.go-version == '1.16.x' && matrix.os == 'ubuntu-20.04' 86 + - if: matrix.go-version == '1.18.x' && matrix.os == 'ubuntu-20.04' 88 87 name: Generate 89 88 run: go generate ./... 90 89 - name: Test
+1 -1
README.md
··· 16 16 [![Go Reference](https://pkg.go.dev/badge/cuelang.org/go.svg)](https://pkg.go.dev/cuelang.org/go) 17 17 [![Github](https://github.com/cue-lang/cue/workflows/Test/badge.svg)](https://github.com/cue-lang/cue/actions) 18 18 [![GolangCI](https://golangci.com/badges/github.com/cue-lang/cue.svg)](https://golangci.com/r/github.com/cue-lang/cue) 19 - [![Go 1.16+](https://img.shields.io/badge/go-1.16-9cf.svg)](https://golang.org/dl/) 19 + [![Go 1.17+](https://img.shields.io/badge/go-1.17-9cf.svg)](https://golang.org/dl/) 20 20 [![platforms](https://img.shields.io/badge/platforms-linux|windows|macos-inactive.svg)]() 21 21 22 22 # The CUE Data Constraint Language
+3 -10
cmd/cue/cmd/testdata/script/cmd_github.txt
··· 159 159 fail-fast: false 160 160 matrix: 161 161 go-version: 162 - - 1.16.x 163 162 - 1.17.x 164 163 - 1.18.x 165 164 os: ··· 210 209 restore-keys: ${{ runner.os }}-${{ matrix.go-version }}-go- 211 210 - if: ${{ github.ref == 'refs/heads/master' }} 212 211 run: echo CUE_LONG=true >> $GITHUB_ENV 213 - - if: matrix.go-version == '1.16.x' && matrix.os == 'ubuntu-20.04' 212 + - if: matrix.go-version == '1.18.x' && matrix.os == 'ubuntu-20.04' 214 213 name: Generate 215 214 run: go generate ./... 216 215 - name: Test ··· 1335 1334 steps: _ 1336 1335 }).steps & [_])[0] 1337 1336 1338 - // We use the oldest supported Go version for code generation. 1339 - // TODO(mvdan): now that we don't use qgo via go:generate, 1340 - // we should try to use latestStableGo for code generation, 1341 - // which is closer to how developers will run go generate. 1342 - _#codeGenGo: "1.16.x" 1343 - 1344 1337 // Use the latest Go version for extra checks, 1345 1338 // such as running tests with the data race detector. 1346 1339 _#latestStableGo: "1.18.x" ··· 1355 1348 _#testStrategy: { 1356 1349 "fail-fast": false 1357 1350 matrix: { 1358 - "go-version": [_#codeGenGo, "1.17.x", _#latestStableGo] 1351 + "go-version": ["1.17.x", _#latestStableGo] 1359 1352 os: [_#linuxMachine, _#macosMachine, _#windowsMachine] 1360 1353 } 1361 1354 } ··· 1404 1397 run: "go generate ./..." 1405 1398 // The Go version corresponds to the precise version specified in 1406 1399 // the matrix. Skip windows for now until we work out why re-gen is flaky 1407 - if: "matrix.go-version == '\(_#codeGenGo)' && matrix.os == '\(_#linuxMachine)'" 1400 + if: "matrix.go-version == '\(_#latestStableGo)' && matrix.os == '\(_#linuxMachine)'" 1408 1401 } 1409 1402 _#goTest: _#step & { 1410 1403 name: "Test"
+12 -24
cue/testdata/eval/github.txtar
··· 250 250 steps: _ 251 251 }).steps & [_])[0] 252 252 253 - // We use the oldest supported Go version for code generation. 254 - // TODO(mvdan): now that we don't use qgo via go:generate, 255 - // we should try to use latestStableGo for code generation, 256 - // which is closer to how developers will run go generate. 257 - _#codeGenGo: "1.16.x" 258 - 259 253 // Use the latest Go version for extra checks, 260 254 // such as running tests with the data race detector. 261 255 _#latestStableGo: "1.18.x" ··· 270 264 _#testStrategy: { 271 265 "fail-fast": false 272 266 matrix: { 273 - "go-version": [_#codeGenGo, "1.17.x", _#latestStableGo] 267 + "go-version": ["1.17.x", _#latestStableGo] 274 268 os: [_#linuxMachine, _#macosMachine, _#windowsMachine] 275 269 } 276 270 } ··· 319 313 run: "go generate ./..." 320 314 // The Go version corresponds to the precise version specified in 321 315 // the matrix. Skip windows for now until we work out why re-gen is flaky 322 - if: "matrix.go-version == '\(_#codeGenGo)' && matrix.os == '\(_#linuxMachine)'" 316 + if: "matrix.go-version == '\(_#latestStableGo)' && matrix.os == '\(_#linuxMachine)'" 323 317 } 324 318 _#goTest: _#step & { 325 319 name: "Test" ··· 1105 1099 "fail-fast": (bool){ false } 1106 1100 matrix: (#struct){ 1107 1101 "go-version": (#list){ 1108 - 0: (string){ "1.16.x" } 1109 - 1: (string){ "1.17.x" } 1110 - 2: (string){ "1.18.x" } 1102 + 0: (string){ "1.17.x" } 1103 + 1: (string){ "1.18.x" } 1111 1104 } 1112 1105 os: (#list){ 1113 1106 0: (string){ "ubuntu-20.04" } ··· 1154 1147 6: (#struct){ 1155 1148 name: (string){ "Generate" } 1156 1149 run: (string){ "go generate ./..." } 1157 - if: (string){ "matrix.go-version == '1.16.x' && matrix.os == 'ubuntu-20.04'" } 1150 + if: (string){ "matrix.go-version == '1.18.x' && matrix.os == 'ubuntu-20.04'" } 1158 1151 } 1159 1152 7: (#struct){ 1160 1153 name: (string){ "Test" } ··· 1627 1620 "fail-fast": (bool){ false } 1628 1621 matrix: (#struct){ 1629 1622 "go-version": (#list){ 1630 - 0: (string){ "1.16.x" } 1631 - 1: (string){ "1.17.x" } 1632 - 2: (string){ "1.18.x" } 1623 + 0: (string){ "1.17.x" } 1624 + 1: (string){ "1.18.x" } 1633 1625 } 1634 1626 os: (#list){ 1635 1627 0: (string){ "ubuntu-20.04" } ··· 1676 1668 6: (#struct){ 1677 1669 name: (string){ "Generate" } 1678 1670 run: (string){ "go generate ./..." } 1679 - if: (string){ "matrix.go-version == '1.16.x' && matrix.os == 'ubuntu-20.04'" } 1671 + if: (string){ "matrix.go-version == '1.18.x' && matrix.os == 'ubuntu-20.04'" } 1680 1672 } 1681 1673 7: (#struct){ 1682 1674 name: (string){ "Test" } ··· 2139 2131 } 2140 2132 _#step(:ci): (#struct){ 2141 2133 } 2142 - _#codeGenGo(:ci): (string){ "1.16.x" } 2143 2134 _#latestStableGo(:ci): (string){ "1.18.x" } 2144 2135 _#pinnedReleaseGo(:ci): (string){ "1.18.1" } 2145 2136 _#linuxMachine(:ci): (string){ "ubuntu-20.04" } ··· 2149 2140 "fail-fast": (bool){ false } 2150 2141 matrix: (#struct){ 2151 2142 "go-version": (#list){ 2152 - 0: (string){ "1.16.x" } 2153 - 1: (string){ "1.17.x" } 2154 - 2: (string){ "1.18.x" } 2143 + 0: (string){ "1.17.x" } 2144 + 1: (string){ "1.18.x" } 2155 2145 } 2156 2146 os: (#list){ 2157 2147 0: (string){ "ubuntu-20.04" } ··· 2188 2178 _#goGenerate(:ci): (#struct){ 2189 2179 name: (string){ "Generate" } 2190 2180 run: (string){ "go generate ./..." } 2191 - if: (string){ "matrix.go-version == '1.16.x' && matrix.os == 'ubuntu-20.04'" } 2181 + if: (string){ "matrix.go-version == '1.18.x' && matrix.os == 'ubuntu-20.04'" } 2192 2182 } 2193 2183 _#goTest(:ci): (#struct){ 2194 2184 name: (string){ "Test" } ··· 2522 2512 }).steps & [ 2523 2513 _, 2524 2514 ])[0] 2525 - _#codeGenGo: "1.16.x" 2526 2515 _#latestStableGo: "1.18.x" 2527 2516 _#pinnedReleaseGo: "1.18.1" 2528 2517 _#linuxMachine: "ubuntu-20.04" ··· 2532 2521 "fail-fast": false 2533 2522 matrix: { 2534 2523 "go-version": [ 2535 - 〈3;_#codeGenGo〉, 2536 2524 "1.17.x", 2537 2525 〈3;_#latestStableGo〉, 2538 2526 ] ··· 2571 2559 _#goGenerate: (〈0;_#step〉 & { 2572 2560 name: "Generate" 2573 2561 run: "go generate ./..." 2574 - if: "matrix.go-version == '\(〈1;_#codeGenGo〉)' && matrix.os == '\(〈1;_#linuxMachine〉)'" 2562 + if: "matrix.go-version == '\(〈1;_#latestStableGo〉)' && matrix.os == '\(〈1;_#linuxMachine〉)'" 2575 2563 }) 2576 2564 _#goTest: (〈0;_#step〉 & { 2577 2565 name: "Test"
+1 -1
doc/contribute.md
··· 114 114 The code contribution process used by the CUE project is a little different from 115 115 that used by other open source projects. We assume you have a basic 116 116 understanding of [`git`](https://git-scm.com/) and [Go](https://golang.org) 117 - (1.16 or later). 117 + (1.17 or later). 118 118 119 119 The first thing to decide is whether you want to contribute a code change via 120 120 GitHub or GerritHub. Both workflows are fully supported, and whilst GerritHub is
+2 -2
doc/install.md
··· 6 6 7 7 ### Prerequisites 8 8 9 - Go 1.16 or higher (see below) 9 + Go 1.17 or higher (see below) 10 10 11 11 ### Installing CUE 12 12 ··· 18 18 go install cuelang.org/go/cmd/cue@latest 19 19 ``` 20 20 21 - If the command fails, make sure your version of Go is 1.16 or later. 21 + If the command fails, make sure your version of Go is 1.17 or later. 22 22 23 23 And make sure the install directory is in your path. 24 24
+2 -8
internal/ci/workflows.cue
··· 327 327 _#job: ((json.#Workflow & {}).jobs & {x: _}).x 328 328 _#step: ((_#job & {steps: _}).steps & [_])[0] 329 329 330 - // We use the oldest supported Go version for code generation. 331 - // TODO(mvdan): now that we don't use qgo via go:generate, 332 - // we should try to use latestStableGo for code generation, 333 - // which is closer to how developers will run go generate. 334 - _#codeGenGo: "1.16.x" 335 - 336 330 // Use the latest Go version for extra checks, 337 331 // such as running tests with the data race detector. 338 332 _#latestStableGo: "1.18.x" ··· 349 343 _#testStrategy: { 350 344 "fail-fast": false 351 345 matrix: { 352 - "go-version": [_#codeGenGo, "1.17.x", _#latestStableGo] 346 + "go-version": ["1.17.x", _#latestStableGo] 353 347 os: [_#linuxMachine, _#macosMachine, _#windowsMachine] 354 348 } 355 349 } ··· 405 399 run: "go generate ./..." 406 400 // The Go version corresponds to the precise version specified in 407 401 // the matrix. Skip windows for now until we work out why re-gen is flaky 408 - if: "matrix.go-version == '\(_#codeGenGo)' && matrix.os == '\(_#linuxMachine)'" 402 + if: "matrix.go-version == '\(_#latestStableGo)' && matrix.os == '\(_#linuxMachine)'" 409 403 } 410 404 411 405 _#goTest: _#step & {