News for hackers. Stuff that matters.
Re:Rust 1.50 by pimeys on Thursday February 11, 2021 @02:32PM (#26106020)
I hope 1.51 brings the new cargo resolver to stable. I was fighting with a problem recently, solved in the new resolver. If we'd think a dependency such as:

  [target.'cfg(target_os = "macos")'.dependencies]
  foo = { version = "1", features = ["x"] }

  [target.'cfg(not(target_os = "macos"))'.dependencies]
  foo = { version = "1", features = [] }
With the current resolver, the dependency `foo` will always be compiled with a feature `x`, no matter which target os you're using. Debugging this took me a while and I was surprised it's actually just how the current resolver works.

There are no comments on this comment yet.