Skip to content

Use explicit version of cfg-if in msrv build#362

Merged
sfackler merged 5 commits into
rust-lang:masterfrom
KodrAus:ci/msrv
Nov 24, 2019
Merged

Use explicit version of cfg-if in msrv build#362
sfackler merged 5 commits into
rust-lang:masterfrom
KodrAus:ci/msrv

Conversation

@KodrAus
Copy link
Copy Markdown
Contributor

@KodrAus KodrAus commented Nov 9, 2019

Just to try fix up our CI.

@KodrAus KodrAus closed this Nov 9, 2019
@KodrAus KodrAus reopened this Nov 9, 2019
@KodrAus KodrAus mentioned this pull request Nov 9, 2019
1 task
@KodrAus
Copy link
Copy Markdown
Contributor Author

KodrAus commented Nov 10, 2019

r? @sfackler

@sfackler
Copy link
Copy Markdown
Member

It wasn't worth pinning cfg-if?

@KodrAus
Copy link
Copy Markdown
Contributor Author

KodrAus commented Nov 23, 2019

I didn't have a lot of success pinning cfg-if using the cargo update onn the 1.16 toolchain, but I didn't actually try setting a = bound in our own Cargo.toml. We didn't get a lot of mileage out of bumping our MSRV from 1.16 to 1.31 anyways, so I'll give that a go 👍

@KodrAus
Copy link
Copy Markdown
Contributor Author

KodrAus commented Nov 23, 2019

Ok, looks like that works out just fine!

Comment thread Cargo.toml Outdated

[dependencies]
cfg-if = "0.1.2"
cfg-if = "=0.1.9"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will cause issues if log is used in a dependency graph with another crate with a non = dependency on cfg-if. Cargo will iirc just refuse to resolve versions. If we can't just cargo update -p cfg-if --precise 0.1.9 in the MSRV build, it may just be best to bump our MSRV to whatever cfg-if uses.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah right. I’d assumed we’d possibly just end up compiling two versions of cfg-if.

I’ll look again at why the cargo update path didn’t work out for me and fall back to bumping back to 1.31.

@sfackler
Copy link
Copy Markdown
Member

rustfmt's failing, but r=me otherwise. Realistically, no-one's going to do the downgrade dance with cfg-if anyway...

Comment thread src/lib.rs Outdated
@sfackler sfackler merged commit 2774e4a into rust-lang:master Nov 24, 2019
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

Successfully merging this pull request may close these issues.

2 participants