rust-lang / cfg-if

A if/elif-like macro for Rust #[cfg] statements
Apache License 2.0
557 stars 40 forks source link

crates.io version differs from GH version, breaking Miri #22

Closed RalfJung closed 5 years ago

RalfJung commented 5 years ago

Miri is currently broken because it cannot build libstd with xargo, and fixing that does not work because the released version of this crate does not actually have the rustc-dep-of-std feature. In the tarball on crates.io, the Cargo.toml.orig looks like

[package]
name = "cfg-if"
version = "0.1.9"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
license = "MIT/Apache-2.0"
readme = "README.md"
repository = "https://github.com/alexcrichton/cfg-if"
homepage = "https://github.com/alexcrichton/cfg-if"
documentation = "https://docs.rs/cfg-if"
description = """
A macro to ergonomically define an item depending on a large number of #[cfg]
parameters. Structured like an if-else chain, the first matching branch is the
item that gets emitted.
"""

[badges]
travis-ci = { repository = "alexcrichton/cfg-if" }

# [dependencies]
# core = { version = "1.0.0", optional = true, package = 'rustc-std-workspace-core' }
# compiler_builtins = { version = '0.1.2', optional = true }
#
# [features]
# rustc-dep-of-std = ['core', 'compiler_builtins']
RalfJung commented 5 years ago

Ah turns out 0.1.8 has the feature, so this can be fixed in rustc without a new release here.

Still, something is odd here.

alexcrichton commented 5 years ago

This is currently intentional and sounds like you found the issue elsewhere.

RalfJung commented 5 years ago

I think it would still be better if the GH sources matched craters.io... this is extremely confusing when debugging what is going on.