I'm working on an extended deprecation lint that can decide if something already is or will be deprecated. There is one problem left, though: Crates do not appear to have version information. I know that I can get the current Crate's version using some environment variable that cargo will set, but that's not enough to distinguish deprecated parts of dependencies.
I can at least get the current crate path via ctx.sess.local_crate_source_file
(as in fhahn's current PR.
So barring getting the filepath and finding and parsing Cargo.lock
manually (which I consider to be fragile and hacky), is there a way to get the dependencies' version numbers and if so, how?