Repository navigation
Support linking of rlib files in rustpkg - #11500
Conversation
|
Hm, I'm a little uncomfortable committing this because this seems to me like a clear indication that rustpkg is duplicating functionality that it shouldn't. This has different behavior when finding duplicate rlibs and duplicate dylibs which seems surprising to me. Can you look into whether |
|
I thought exactly the same, but thought there must be a reason for this to be rewritten in rustpkg. I will look into it ;) btw: There seems to be more places with duplicated functionality in rustpkg: #11502 |
|
Okay what I found so far: The function A solution could be to use The best solution would be to further integrate rustc's build process and rustpkg. E.g. when rustpkg finds the libraries it could already pass the Unfortunately I don't see myself skilled enough in Rust to implement either solution (also lacking enough time to do it). Maybe merge this and see where rustpkg is going in the future anyway? |
|
I guess I'm a little unclear on why rustpkg is trying to find libraries, do you know why? I would imagine that to be correct rustpkg must open and read the metadata to ensure that it has the right version, but it's not doing that? |
|
It tries to search for outputs because it didn't use the logic to calculate the crate hash. That part can be easily fixed now. I'm not sure why it also searches inputs, but I suspect because rustc does not know about RUST_PATH and there might be many places to search. Perhaps @catamorphism remembers. |
Currently `rustpkg` only looks for shared libraries. After this patch it also looks for `*.rlib` files.
11531: fix: Make fill_match_arms assist handle doc(hidden) and non_exhaustive r=Veykril a=OleStrohm Fixes rust-lang#11499 Fixes rust-lang#11500 This keeps track of the relevant attributes and adds in a wildcard pat at the end of the match when necessary. I decided to do them in the same PR since they both needed the ability to add a wildcard arm, and so their changes would overlap if done separately, but I'll split them up if that seems better. This is my first PR to rust-analyzer, so all feedback is greatly appreciated! Co-authored-by: Ole Strohm <strohm99@gmail.com>
Currently
rustpkgonly looks for shared libraries. After this patch it also looks for*.rlibfiles.