Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doesn't compile with "-Z minimal-versions" #446

Open
rlidwka opened this issue Sep 10, 2022 · 0 comments
Open

doesn't compile with "-Z minimal-versions" #446

rlidwka opened this issue Sep 10, 2022 · 0 comments

Comments

@rlidwka
Copy link

rlidwka commented Sep 10, 2022

I'm trying to test my stuff with oldest possible versions of all libraries to make sure semver ranges are correct.

$ cargo +nightly -Z minimal-versions update ; cargo build

See rust-lang/cargo#5657 for details on the flag.

syntect doesn't compile.

One issue I found is that flate2@1.0.2 and below picks up deprecated gcc crate via transitive miniz-sys dependency.

Thus, I suggest to replace:

flate2 = { version = "1.0", optional = true }

with at least

flate2 = { version = "1.0.3", optional = true }

... where the issue is fixed.

And there is something about older versions of serde that doesn't work right, but I haven't found exact dependency that does it. Let me know if you're interested in fixing that sort of thing, might look in deeper if so.

error[E0432]: unresolved import `std::path::AsPath`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/gcc-0.3.0/src/lib.rs:50:26
   |
50 | use std::path::{PathBuf, AsPath};
   |                          ^^^^^^
   |                          |
   |                          no `AsPath` in `path`
   |                          help: a similar name exists in the module: `Path`

error[E0433]: failed to resolve: could not find `old_io` in `std`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/gcc-0.3.0/src/lib.rs:328:10
    |
328 |     std::old_io::stdio::set_stderr(Box::new(std::old_io::util::NullWriter));
    |          ^^^^^^ could not find `old_io` in `std`

error[E0433]: failed to resolve: could not find `old_io` in `std`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/gcc-0.3.0/src/lib.rs:328:50
    |
328 |     std::old_io::stdio::set_stderr(Box::new(std::old_io::util::NullWriter));
    |                                                  ^^^^^^ could not find `old_io` in `std`

error[E0425]: cannot find function `set_exit_status` in module `env`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/gcc-0.3.0/src/lib.rs:327:10
    |
327 |     env::set_exit_status(1);
    |          ^^^^^^^^^^^^^^^ not found in `env`

error[E0635]: unknown feature `old_io`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/gcc-0.3.0/src/lib.rs:45:12
   |
45 | #![feature(old_io, io, path, env, collections, process, fs)]
   |            ^^^^^^

error[E0635]: unknown feature `io`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/gcc-0.3.0/src/lib.rs:45:20
   |
45 | #![feature(old_io, io, path, env, collections, process, fs)]
   |                    ^^

error[E0635]: unknown feature `path`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/gcc-0.3.0/src/lib.rs:45:24
   |
45 | #![feature(old_io, io, path, env, collections, process, fs)]
   |                        ^^^^

error[E0635]: unknown feature `fs`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/gcc-0.3.0/src/lib.rs:45:57
   |
45 | #![feature(old_io, io, path, env, collections, process, fs)]
   |                                                         ^^

error[E0635]: unknown feature `collections`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/gcc-0.3.0/src/lib.rs:45:35
   |
45 | #![feature(old_io, io, path, env, collections, process, fs)]
   |                                   ^^^^^^^^^^^

Some errors have detailed explanations: E0425, E0432, E0433, E0635.
For more information about an error, try `rustc --explain E0425`.
error: could not compile `gcc` due to 9 previous errors
warning: build failed, waiting for other jobs to finish...
error[E0277]: the trait bound `MapAccessDeserializer<MapDeserializer<'_, std::array::IntoIter<(&str, std::string::String), 1>, _>>: EnumAccess<'de>` is not satisfied
    --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/plist-1.3.0/src/de.rs:136:36
     |
136  |                   visitor.visit_enum(MapAccessDeserializer::new(MapDeserializer::new(
     |  _________________________----------_^
     | |                         |
     | |                         required by a bound introduced by this call
137  | |                     IntoIter::new([(DATE_NEWTYPE_STRUCT_NAME, v.to_rfc3339())]),
138  | |                 )))
     | |__________________^ the trait `EnumAccess<'de>` is not implemented for `MapAccessDeserializer<MapDeserializer<'_, std::array::IntoIter<(&str, std::string::String), 1>, _>>`
     |
     = help: the following other types implement trait `EnumAccess<'de>`:
               &'a mut de::Deserializer<I>
               BorrowedStrDeserializer<'de, E>
               CowStrDeserializer<'a, E>
               StringDeserializer<E>
               U32Deserializer<E>
               serde::de::value::StrDeserializer<'a, E>
note: required by a bound in `visit_enum`
    --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/serde-1.0.27/src/de/mod.rs:1504:12
     |
1504 |         A: EnumAccess<'de>,
     |            ^^^^^^^^^^^^^^^ required by this bound in `visit_enum`

error[E0277]: the trait bound `MapAccessDeserializer<MapDeserializer<'_, std::array::IntoIter<(&str, u64), 1>, _>>: EnumAccess<'de>` is not satisfied
    --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/plist-1.3.0/src/de.rs:152:72
     |
152  |               Event::Uid(v) if self.in_plist_value => visitor.visit_enum(MapAccessDeserializer::new(
     |  _____________________________________________________________----------_^
     | |                                                             |
     | |                                                             required by a bound introduced by this call
153  | |                 MapDeserializer::new(IntoIter::new([(UID_NEWTYPE_STRUCT_NAME, v.get())])),
154  | |             )),
     | |_____________^ the trait `EnumAccess<'de>` is not implemented for `MapAccessDeserializer<MapDeserializer<'_, std::array::IntoIter<(&str, u64), 1>, _>>`
     |
     = help: the following other types implement trait `EnumAccess<'de>`:
               &'a mut de::Deserializer<I>
               BorrowedStrDeserializer<'de, E>
               CowStrDeserializer<'a, E>
               StringDeserializer<E>
               U32Deserializer<E>
               serde::de::value::StrDeserializer<'a, E>
note: required by a bound in `visit_enum`
    --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/serde-1.0.27/src/de/mod.rs:1504:12
     |
1504 |         A: EnumAccess<'de>,
     |            ^^^^^^^^^^^^^^^ required by this bound in `visit_enum`

For more information about this error, try `rustc --explain E0277`.
error: could not compile `plist` due to 2 previous errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant