Closed tjtelan closed 2 years ago
First attempt trying to perform this migration failed due to compiler panic (rustc 1.56.0).
$ cargo fix --edition
Checking fluvio-smartstream-derive v0.3.1 (/home/telant/Documents/fluvio/crates/fluvio-smartstream-derive)
Checking fluvio-protocol-derive v0.3.1 (/home/telant/Documents/fluvio/crates/fluvio-protocol-derive)
Migrating crates/fluvio-smartstream-derive/src/lib.rs from 2018 edition to 2021
Checking fluvio-package-index v0.5.0 (/home/telant/Documents/fluvio/crates/fluvio-package-index)
Migrating crates/fluvio-protocol-derive/src/lib.rs from 2018 edition to 2021
Checking fluvio-stream-model v0.5.3 (/home/telant/Documents/fluvio/crates/fluvio-stream-model)
Checking fluvio-protocol v0.6.1 (/home/telant/Documents/fluvio/crates/fluvio-protocol)
Checking fluvio-types v0.2.6 (/home/telant/Documents/fluvio/crates/fluvio-types)
Checking fluvio-stream-dispatcher v0.6.5 (/home/telant/Documents/fluvio/crates/fluvio-stream-dispatcher)
Migrating crates/fluvio-package-index/src/lib.rs from 2018 edition to 2021
Migrating crates/fluvio-stream-model/src/lib.rs from 2018 edition to 2021
Checking fluvio-socket v0.10.3 (/home/telant/Documents/fluvio/crates/fluvio-socket)
Migrating crates/fluvio-protocol/src/lib.rs from 2018 edition to 2021
Migrating crates/fluvio-types/src/lib.rs from 2018 edition to 2021
Migrating crates/fluvio-stream-dispatcher/src/lib.rs from 2018 edition to 2021
Migrating crates/fluvio-protocol/tests/encode.rs from 2018 edition to 2021
Migrating crates/fluvio-protocol/tests/btreemap.rs from 2018 edition to 2021
Migrating crates/fluvio-protocol/tests/option.rs from 2018 edition to 2021
Migrating crates/fluvio-socket/src/lib.rs from 2018 edition to 2021
Migrating crates/fluvio-protocol/tests/default.rs from 2018 edition to 2021
Migrating crates/fluvio-protocol-derive/tests/parse.rs from 2018 edition to 2021
Migrating crates/fluvio-protocol/tests/generic.rs from 2018 edition to 2021
Migrating crates/fluvio-protocol/tests/enum.rs from 2018 edition to 2021
Migrating crates/fluvio-protocol/tests/api.rs from 2018 edition to 2021
Migrating crates/fluvio-protocol/tests/version.rs from 2018 edition to 2021
Migrating crates/fluvio-protocol/tests/decode.rs from 2018 edition to 2021
error: internal compiler error: compiler/rustc_traits/src/normalize_erasing_regions.rs:54:32: could not fully normalize `<fluvio_stream_model::k8_types::K8Obj<S> as fluvio_stream_model::k8_types::Spec>::Header`
thread 'rustc' panicked at 'Box<dyn Any>', compiler/rustc_errors/src/lib.rs:1147:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: rustc 1.56.0 (09c42c458 2021-10-18) running on x86_64-unknown-linux-gnu
note: compiler flags: -C embed-bitcode=no -C debuginfo=1 -C incremental
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
#0 [normalize_generic_arg_after_erasing_regions] normalizing `<fluvio_stream_model::k8_types::K8Obj<S> as fluvio_stream_model::k8_types::Spec>::Header`
#1 [adt_significant_drop_tys] computing when `fluvio_stream_model::k8_types::K8List` has a significant destructor
end of query stack
error: could not compile `fluvio-stream-dispatcher`
warning: build failed, waiting for other jobs to finish...
error: build failed
Basically the same error message on beta
(rustc 1.57) toolchain.
However, cargo +nightly fix --edition
did succeed. So we can at least look forward to having support in a future release.
This is a more representative output for rustc 1.56.0.
$ cargo clean
$ cargo fix --edition
Compiling proc-macro2 v1.0.32
Compiling syn v1.0.81
Compiling unicode-xid v0.2.2
Compiling libc v0.2.105
Compiling version_check v0.9.3
Compiling autocfg v1.0.1
Compiling memchr v2.4.1
Checking cfg-if v1.0.0
Compiling log v0.4.14
Compiling serde_derive v1.0.130
Compiling serde v1.0.130
Compiling futures-core v0.3.17
Checking lazy_static v1.4.0
Checking pin-project-lite v0.2.7
Compiling proc-macro-hack v0.5.19
Compiling crossbeam-utils v0.8.5
Checking once_cell v1.8.0
Compiling futures-task v0.3.17
Compiling signal-hook v0.3.10
Compiling futures-channel v0.3.17
Compiling proc-macro-nested v0.1.7
Checking futures-io v0.3.17
Compiling pkg-config v0.3.22
Checking slab v0.4.5
Checking event-listener v2.5.1
Checking bitflags v1.3.2
Compiling openssl v0.10.37
Compiling native-tls v0.2.8
Checking cache-padded v1.1.1
Checking smallvec v1.7.0
Checking pin-utils v0.1.0
Checking fastrand v1.5.0
Checking waker-fn v1.1.0
Checking parking v2.0.0
Checking regex-syntax v0.6.25
Compiling async-trait v0.1.51
Checking percent-encoding v2.1.0
Checking async-task v4.0.3
Compiling ryu v1.0.5
Checking atomic-waker v1.0.0
Checking tinyvec_macros v0.1.0
Checking matches v0.1.9
Checking futures-sink v0.3.17
Checking unicode-bidi v0.3.7
Checking bytes v1.1.0
Checking foreign-types-shared v0.1.1
Checking openssl-probe v0.1.4
Checking ansi_term v0.12.1
Compiling serde_json v1.0.68
Checking itoa v0.4.8
Compiling semver-parser v0.7.0
Compiling fnv v1.0.7
Compiling ident_case v1.0.1
Compiling strsim v0.10.0
Compiling crc32fast v1.2.1
Checking indenter v0.3.3
Checking base64 v0.13.0
Compiling semver v1.0.4
Compiling eyre v0.6.5
Checking adler v1.0.2
Checking static_assertions v1.1.0
Checking hashbrown v0.11.2
Compiling typenum v1.14.0
Compiling anyhow v1.0.44
Checking ppv-lite86 v0.2.15
Checking stable_deref_trait v1.2.0
Checking fallible-iterator v0.2.0
Checking opaque-debug v0.3.0
Checking siphasher v0.3.7
Compiling httparse v1.5.1
Checking linked-hash-map v0.5.4
Checking either v1.6.1
Checking dtoa v0.4.8
Compiling unicode-segmentation v1.8.0
Checking rustc-demangle v0.1.21
Checking unicode-width v0.1.9
Checking cpufeatures v0.2.1
Checking strsim v0.8.0
Checking vec_map v0.8.2
Checking ansi_term v0.11.0
Compiling cpp_demangle v0.3.3
Checking subtle v2.4.1
Checking try-lock v0.2.3
Checking hostfile v0.2.0
Checking tower-service v0.3.1
Checking httpdate v1.0.1
Compiling getrandom v0.1.16
Compiling const_fn v0.4.8
Compiling radium v0.5.3
Checking cpuid-bool v0.2.0
Compiling proc-maps v0.1.9
Checking minimal-lexical v0.1.4
Checking byteorder v1.4.3
Compiling crossbeam-epoch v0.9.5
Compiling lexical-core v0.7.6
Checking glob v0.3.0
Compiling rayon-core v1.9.1
Compiling http-types v2.12.0
Checking scopeguard v1.1.0
Compiling remoteprocess v0.4.6
Checking infer v0.2.3
Checking termcolor v1.1.2
Checking encode_unicode v0.3.6
Compiling fluvio-package-index v0.5.0 (/home/telant/Documents/fluvio/crates/fluvio-package-index)
Migrating crates/fluvio-package-index/build.rs from 2018 edition to 2021
Checking wyz v0.2.0
Checking arrayvec v0.5.2
Checking funty v1.1.0
Checking tap v1.0.1
Compiling target-lexicon v0.12.2
Checking plain v0.2.3
Compiling cranelift-entity v0.77.0
Checking remove_dir_all v0.5.3
Compiling cranelift-codegen-shared v0.77.0
Compiling sysinfo v0.20.5
Compiling rustversion v1.0.5
Checking number_prefix v0.4.0
Compiling oid-registry v0.1.5
Checking data-encoding v2.3.2
Checking wasmparser v0.80.2
Checking rustc-hash v1.1.0
Checking quick-error v1.2.3
Checking more-asserts v0.2.1
Compiling inventory v0.1.10
Compiling zstd-safe v4.1.1+zstd.1.5.0
Compiling maybe-uninit v2.0.0
Compiling fluvio-cluster v0.0.0 (/home/telant/Documents/fluvio/crates/fluvio-cluster)
Migrating crates/fluvio-cluster/build.rs from 2018 edition to 2021
Checking owo-colors v1.3.0
Checking leb128 v0.2.5
Compiling oid-registry v0.2.0
Compiling wasmtime-cache v0.30.0
Compiling wasmtime v0.30.0
Compiling paste v1.0.5
Checking dyn-clone v1.0.4
Compiling ucd-trie v0.1.3
Compiling fluvio-sc v0.0.0 (/home/telant/Documents/fluvio/crates/fluvio-sc)
Compiling fluvio-spu v0.0.0 (/home/telant/Documents/fluvio/crates/fluvio-spu)
Migrating crates/fluvio-sc/build.rs from 2018 edition to 2021
Migrating crates/fluvio-spu/build.rs from 2018 edition to 2021
Compiling maplit v1.0.2
Compiling crossbeam-queue v0.3.2
Compiling trybuild v1.0.42 (https://github.com/sehz/trybuild?branch=check_option#27108102)
Compiling inflections v1.1.1
Checking quick-error v2.0.1
Compiling fluvio-cli v0.0.0 (/home/telant/Documents/fluvio/crates/fluvio-cli)
Migrating crates/fluvio-cli/build.rs from 2018 edition to 2021
Checking crc-catalog v1.1.1
Checking bencher v0.1.5
Checking home v0.5.3
Checking hex v0.4.3
Compiling trybuild v1.0.42 (https://github.com/infinyon/trybuild?branch=check_option#27108102)
Checking tracing-core v0.1.21
Checking sharded-slab v0.1.4
Compiling value-bag v1.0.0-alpha.8
Compiling generic-array v0.14.4
Compiling proc-macro-error-attr v1.0.4
Compiling proc-macro-error v1.0.4
Compiling nom v7.0.0
Compiling standback v0.2.17
Compiling time v0.2.27
Compiling cookie v0.14.4
Compiling nom v6.1.2
Compiling memoffset v0.6.4
Compiling futures-macro v0.3.17
Compiling futures-util v0.3.17
Compiling tokio v1.12.0
Compiling miniz_oxide v0.4.4
Compiling num-traits v0.2.14
Compiling num-integer v0.1.44
Compiling indexmap v1.7.0
Compiling num-bigint v0.4.2
Compiling rayon v1.5.1
Checking thread_local v1.1.3
Checking async-mutex v1.4.0
Checking async-lock v2.4.0
Checking simple-mutex v1.1.5
Checking concurrent-queue v1.2.2
Checking tinyvec v1.5.0
Checking form_urlencoded v1.0.1
Checking foreign-types v0.3.2
Compiling semver v0.9.0
Checking owning_ref v0.3.3
Checking yaml-rust v0.4.5
Checking itertools v0.10.1
Checking textwrap v0.11.0
Checking http v0.2.5
Compiling heck v0.3.3
Checking regex-automata v0.1.10
Compiling cranelift-codegen-meta v0.77.0
Checking humantime v1.3.0
Checking wast v38.0.1
Compiling gimli v0.25.0
Compiling pest v2.1.3
Checking crc v2.0.0
Checking async-rwlock v1.3.0
Checking async-dup v1.2.2
Compiling rustc_version v0.2.3
Checking unicode-normalization v0.1.19
Checking matchers v0.1.0
Checking matchers v0.0.1
Checking http-body v0.4.4
Checking async-channel v1.6.1
Compiling pest_meta v2.1.3
Checking futures-lite v1.12.0
Checking aho-corasick v0.7.18
Checking content_inspector v0.2.4
Checking object v0.27.1
Checking csv-core v0.1.10
Checking quote v1.0.10
Checking crossbeam-channel v0.5.1
Compiling jobserver v0.1.24
Compiling socket2 v0.4.2
Compiling signal-hook-registry v1.4.0
Compiling num_cpus v1.13.0
Compiling dirs-sys v0.3.6
Compiling getrandom v0.2.3
Compiling atty v0.2.14
Compiling terminal_size v0.1.17
Compiling filetime v0.2.15
Compiling rand v0.4.6
Compiling os_pipe v0.9.2
Compiling xattr v0.2.2
Compiling dirs v1.0.5
Compiling memmap v0.7.0
Compiling time v0.1.43
Compiling shared_child v0.3.5
Compiling which v4.2.2
Checking dirs-sys-next v0.1.2
Checking region v2.2.0
Checking errno v0.2.8
Checking fork v0.1.18
Checking wat v1.0.40
Compiling crc32c v0.6.0
Checking bitvec v0.19.5
Checking smallvec v0.6.14
Checking idna v0.2.3
Checking regex v1.5.4
Checking blocking v1.0.2
Checking async-executor v1.4.1
Checking nix v0.23.0
Checking byte-pool v0.2.3
Checking flate2 v1.0.22
Compiling cc v1.0.71
Compiling dirs v3.0.2
Compiling dirs v4.0.0
Compiling directories v4.0.1
Compiling clap v2.33.3
Compiling colored v2.0.0
Compiling console v0.15.0
Compiling rand_core v0.6.3
Compiling term v0.5.2
Compiling tar v0.4.37
Checking rusticata-macros v4.0.0
Compiling duct v0.13.5
Compiling tempdir v0.3.7
Checking rand_core v0.5.1
Checking directories-next v2.0.0
Checking parking_lot_core v0.2.14
Checking digest v0.9.0
Checking block-buffer v0.9.0
Checking cipher v0.2.5
Checking universal-hash v0.4.1
Checking crypto-mac v0.10.1
Checking aead v0.3.2
Checking async-fs v1.5.0
Checking url v2.2.2
Checking crossbeam-deque v0.8.1
Checking hdrhistogram v7.4.0
Checking object v0.26.2
Compiling openssl-src v111.16.0+1.1.1l
Compiling rand_chacha v0.3.1
Compiling indicatif v0.16.2
Compiling backtrace v0.3.62
Compiling zstd-sys v1.6.1+zstd.1.5.0
Compiling wasmtime-fiber v0.30.0
Compiling wasmtime-runtime v0.30.0
Compiling psm v0.1.16
Compiling cranelift-codegen v0.77.0
Checking fluvio-smartstream-derive v0.3.1 (/home/telant/Documents/fluvio/crates/fluvio-smartstream-derive)
Migrating crates/fluvio-smartstream-derive/src/lib.rs from 2018 edition to 2021
Checking ctrlc v3.2.1
Checking rand_chacha v0.2.2
Checking chrono v0.4.19
Compiling darling_core v0.12.4
Compiling pest_generator v2.1.3
Checking sha2 v0.9.8
Checking md-5 v0.9.1
Checking polyval v0.4.5
Checking parking_lot v0.4.8
Checking aes-soft v0.6.4
Checking ctr v0.6.0
Checking hmac v0.10.1
Compiling openssl-sys v0.9.68
Compiling rand v0.8.4
Checking rusticata-macros v3.2.0
Checking rand v0.7.3
Checking addr2line v0.16.0
Checking ghash v0.3.1
Checking chashmap v2.2.2
Checking aes v0.6.0
Checking hkdf v0.10.0
Checking aes-gcm v0.8.0
Compiling tempfile v3.2.0
Compiling ctor v0.1.21
Compiling thiserror-impl v1.0.30
Compiling tracing-attributes v0.1.18
Compiling pin-project-internal v1.0.8
Compiling tokio-macros v1.5.0
Compiling fluvio-test-derive v0.1.1
Compiling async-attributes v1.1.2
Compiling structopt-derive v0.4.18
Compiling scroll_derive v0.10.5
Compiling time-macros-impl v0.1.2
Compiling include_dir_impl v0.6.2
Compiling ghost v0.1.2
Compiling inventory-impl v0.1.10
Compiling pest_derive v2.1.0
Compiling der-oid-macro v0.4.0
Compiling der-oid-macro v0.5.0
Compiling darling_macro v0.12.4
Checking tracing v0.1.29
Checking thiserror v1.0.30
Checking scroll v0.10.2
Checking include_dir v0.6.2
Checking pin-project v1.0.8
Checking time-macros v0.1.1
Checking der-parser v6.0.0
Checking der-parser v5.1.2
Checking fluvio-protocol-derive v0.3.1 (/home/telant/Documents/fluvio/crates/fluvio-protocol-derive)
Migrating crates/fluvio-protocol-derive/src/lib.rs from 2018 edition to 2021
Checking fluvio-command v0.2.1
Checking adaptive_backoff v0.2.1
Checking structopt v0.3.25
Compiling darling v0.12.4
Checking tracing-futures v0.2.5
Checking polling v2.1.0
Checking kv-log-macro v1.0.7
Checking tracing-log v0.1.2
Checking flv-util v0.5.2
Checking want v0.3.0
Checking benfred-read-process-memory v0.2.1
Checking goblin v0.4.3
Checking regalloc v0.0.31
Checking env_logger v0.7.1
Checking tokio-util v0.6.8
Compiling derive_builder_core v0.10.2
Checking fluvio-types v0.2.6 (/home/telant/Documents/fluvio/crates/fluvio-types)
Migrating crates/fluvio-types/src/lib.rs from 2018 edition to 2021
Checking async-io v1.6.0
Checking tracing-subscriber v0.3.1
Checking file-per-thread-logger v0.1.4
Checking futures-executor v0.3.17
Checking h2 v0.3.7
Checking async-process v1.2.0
Checking async-global-executor v2.0.2
Checking async-net v1.6.1
Checking futures v0.3.17
Compiling derive_builder_macro v0.10.2
Checking async-std v1.10.0
Checking derive_builder v0.10.2
Checking hyper v0.14.14
Checking serde_qs v0.8.5
Checking toml v0.5.8
Checking bstr v0.2.17
Checking serde_urlencoded v0.7.0
Checking bincode v1.3.3
Checking tracing-serde v0.1.2
Checking serde_yaml v0.8.21
Checking serde_bytes v0.11.5
Checking k8-types v0.4.0
Checking k8-diff v0.1.2
Checking fluvio-helm v0.4.3
Checking handlebars v4.1.3
Checking csv v1.1.6
Checking cranelift-bforest v0.77.0
Checking wasmtime-types v0.30.0
Checking x509-parser v0.9.2
Checking x509-parser v0.12.0
Checking tracing-subscriber v0.2.25
Checking k8-config v1.4.0
Checking prettytable-rs v0.8.0
Checking fluvio-stream-model v0.5.3 (/home/telant/Documents/fluvio/crates/fluvio-stream-model)
Migrating crates/fluvio-stream-model/src/lib.rs from 2018 edition to 2021
Checking k8-metadata-client v3.2.0
Checking wasmtime-environ v0.30.0
Migrating crates/fluvio-package-index/src/lib.rs from 2018 edition to 2021
Checking async-h1 v2.3.2
Checking color-eyre v0.5.11
Checking wasmtime-jit v0.30.0
Checking cranelift-frontend v0.77.0
Checking cranelift-native v0.77.0
Checking cranelift-wasm v0.77.0
Checking wasmtime-cranelift v0.30.0
Checking async-native-tls v0.3.3
Checking fluvio-future v0.3.11
Checking fluvio-protocol v0.6.1 (/home/telant/Documents/fluvio/crates/fluvio-protocol)
Checking k8-client v5.2.0
Migrating crates/fluvio-protocol/src/lib.rs from 2018 edition to 2021
Checking flv-tls-proxy v0.5.0
Checking fluvio-stream-dispatcher v0.6.5 (/home/telant/Documents/fluvio/crates/fluvio-stream-dispatcher)
Migrating crates/fluvio-stream-dispatcher/src/lib.rs from 2018 edition to 2021
Checking fluvio-dataplane-protocol v0.8.0 (/home/telant/Documents/fluvio/crates/fluvio-dataplane-protocol)
Migrating crates/fluvio-dataplane-protocol/src/lib.rs from 2018 edition to 2021
Checking fluvio-socket v0.10.3 (/home/telant/Documents/fluvio/crates/fluvio-socket)
Migrating crates/fluvio-socket/src/lib.rs from 2018 edition to 2021
Checking zstd v0.9.0+zstd.1.5.0
error: internal compiler error: compiler/rustc_traits/src/normalize_erasing_regions.rs:54:32: could not fully normalize `<fluvio_stream_model::k8_types::K8Obj<S> as fluvio_stream_model::k8_types::Spec>::Header`
thread 'rustc' panicked at 'Box<dyn Any>', compiler/rustc_errors/src/lib.rs:1147:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: rustc 1.56.0 (09c42c458 2021-10-18) running on x86_64-unknown-linux-gnu
note: compiler flags: -C embed-bitcode=no -C debuginfo=1 -C incremental --crate-type lib
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
#0 [normalize_generic_arg_after_erasing_regions] normalizing `<fluvio_stream_model::k8_types::K8Obj<S> as fluvio_stream_model::k8_types::Spec>::Header`
#1 [adt_significant_drop_tys] computing when `fluvio_stream_model::k8_types::K8List` has a significant destructor
end of query stack
error: could not compile `fluvio-stream-dispatcher`
warning: build failed, waiting for other jobs to finish...
thread 'rustc' panicked at 'Box<dyn Any>', compiler/rustc_errors/src/lib.rs:1147:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: rustc 1.56.0 (09c42c458 2021-10-18) running on x86_64-unknown-linux-gnu
note: compiler flags: -C embed-bitcode=no -C debuginfo=1 -C incremental
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
#0 [normalize_generic_arg_after_erasing_regions] normalizing `<fluvio_stream_model::k8_types::K8Obj<S> as fluvio_stream_model::k8_types::Spec>::Header`
#1 [adt_significant_drop_tys] computing when `fluvio_stream_model::k8_types::K8List` has a significant destructor
end of query stack
error: build failed
As of Rust 1.57, migration works. We'll have to minor version bump all of the published crates (bc we aren't using the major version right now)
I've run into a little snag with the update. There's a set of proc macro tests that are failing with the same error. Something to do with the fluvio-smartmodule
re-exports made for the fluvio-smartmodule-derive
crate not being visible.
Here's one of several similar looking errors from https://github.com/infinyon/fluvio/runs/4451813458?check_suite_focus=true
test derive_ui has been running for over 60 seconds
test ui-tests/pass_agg_with_params.rs ... checking pass
error
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
error[E0432]: unresolved imports `fluvio_smartmodule::smartmodule`, `fluvio_smartmodule::SmartOpt`
--> $DIR/pass_agg_with_params.rs:1:26
|
1 | use fluvio_smartmodule::{smartmodule, SmartOpt, Result, Record, RecordData};
| ^^^^^^^^^^^ ^^^^^^^^ no `SmartOpt` in the root
| |
| no `smartmodule` in the root
This is a tracking issue to cover the effort around migrating the project to use
edition = 2021
https://doc.rust-lang.org/edition-guide/editions/transitioning-an-existing-project-to-a-new-edition.html