Skip to content

Commit 6499c83

Browse files
committed
chore: add support for rust 1.48
Rust 1.48 was released a few days ago. This patch adds the fixes that will get flux passing in CI again. The following things needed addressed: - There is a new lint introduced that checks for `push_str` on a single char `str`, and recommends using `push` instead. - There is an open issue with `sccache` and rust 1.48. As a result, `sccache` is desabled for now. See mozilla/sccache#887
1 parent 9c3cf77 commit 6499c83

File tree

3 files changed

+23
-14
lines changed

3 files changed

+23
-14
lines changed

.circleci/config.yml

+21-12
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ jobs:
1010
GOPATH: /tmp/go
1111
GO111MODULE: 'on' # must be quoted to force string type instead of boolean type
1212
SCCACHE_CACHE_SIZE: 1G
13+
# XXX: rockstar (23 Nov 2020) - rust 1.48 has issues with sccache. It can be re-enabled
14+
# when this bug is addressed: https://github.com/mozilla/sccache/issues/887
15+
RUSTC_WRAPPER: ""
1316
steps:
1417
- checkout
1518
# Populate GOPATH/pkg.
@@ -18,12 +21,13 @@ jobs:
1821
keys:
1922
- flux-gomod-{{checksum "go.sum"}}
2023
# Populate Rust cache
21-
- restore_cache:
22-
name: Restoring Rust Cache
23-
keys:
24-
- flux-rust-{{ .Branch }}-{{ .Revision }} # Matches when retrying a single run.
25-
- flux-rust-{{ .Branch }}- # Matches a new commit on an existing branch.
26-
- flux-rust- # Matches a new branch.
24+
# Disable use of sccache for now
25+
#- restore_cache:
26+
# name: Restoring Rust Cache
27+
# keys:
28+
# - flux-rust-{{ .Branch }}-{{ .Revision }} # Matches when retrying a single run.
29+
# - flux-rust-{{ .Branch }}- # Matches a new commit on an existing branch.
30+
# - flux-rust- # Matches a new branch.
2731
# Run tests
2832
- run: make checkfmt
2933
- run: make checktidy
@@ -41,12 +45,13 @@ jobs:
4145
key: flux-gomod-{{checksum "go.sum"}}
4246
paths:
4347
- /tmp/go/pkg/mod
44-
- save_cache:
45-
name: Saving Rust Cache
46-
key: flux-rust-{{ .Branch }}-{{ .Revision }}
47-
paths:
48-
- "~/.cache/sccache"
49-
when: always
48+
# Disable use of sccache for now
49+
#- save_cache:
50+
# name: Saving Rust Cache
51+
# key: flux-rust-{{ .Branch }}-{{ .Revision }}
52+
# paths:
53+
# - "~/.cache/sccache"
54+
# when: always
5055
test-race:
5156
docker:
5257
- image: quay.io/influxdb/flux-build:latest
@@ -55,6 +60,7 @@ jobs:
5560
GOPATH: /tmp/go
5661
GOFLAGS: -p=8
5762
GO111MODULE: 'on' # must be quoted to force string type instead of boolean type
63+
RUSTC_WRAPPER: ""
5864
steps:
5965
- checkout
6066
# Building go with -race does not use the cache
@@ -73,6 +79,7 @@ jobs:
7379
GOPATH: /tmp/go
7480
GOFLAGS: -p=1
7581
GO111MODULE: 'on' # must be quoted to force string type instead of boolean type
82+
RUSTC_WRAPPER: ""
7683
steps:
7784
- checkout
7885
- restore_cache:
@@ -85,6 +92,8 @@ jobs:
8592
test-valgrind:
8693
docker:
8794
- image: quay.io/influxdb/flux-build:latest
95+
environment:
96+
RUSTC_WRAPPER: ""
8897
steps:
8998
- checkout
9099
- run: make test-valgrind

libflux/go/libflux/buildinfo.gen.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ var sourceHashes = map[string]string{
2828
"libflux/src/core/ast/walk/mod.rs": "855701066e8d11a620855d2db986ce3df27555a91e2fcaf7a0cd3b12aa4cc4f0",
2929
"libflux/src/core/ast/walk/tests.rs": "f7b2d7dd5643bb795a86c04b6979b136b0de46b52b213caff094aed6d204a05d",
3030
"libflux/src/core/build.rs": "7e8c3626b9034dc4a31c2b748b2a174260949d852455299d071a0fd128c18a5a",
31-
"libflux/src/core/formatter/mod.rs": "84850874eeede529971ee52f79f4a920da83bcda8f6d8f57ef1b09747ab1813d",
31+
"libflux/src/core/formatter/mod.rs": "cbb20c9ab2e0db275f7c3b435cedf2beab89775f06232819efc2946a636e39e8",
3232
"libflux/src/core/formatter/tests.rs": "8ca7eaa9e8d6b5f504553736eba5628fcec67890ad9dd107ca5677ad2ac78d43",
3333
"libflux/src/core/lib.rs": "ee7c9cfd10e82f1127ac988a28c2f78dfe031c6cd37d236401e2997b22bcdab5",
3434
"libflux/src/core/parser/mod.rs": "8109f5152bf181ae22ff8da59a2d65c431d5b34efecb2a32fa2241d8c0707011",

libflux/src/core/formatter/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1051,7 +1051,7 @@ impl Formatter {
10511051
f.push_str(&frac_nano);
10521052

10531053
if v.timezone().local_minus_utc() == 0 {
1054-
f.push_str("Z")
1054+
f.push('Z')
10551055
} else {
10561056
f.push_str(&v.format("%:z").to_string());
10571057
}

0 commit comments

Comments
 (0)