-
Notifications
You must be signed in to change notification settings - Fork 426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consistent Library Names #405
Comments
Yo, undead maintainer here. Thanks for your comments and PRs. This change dates back to this PR. I can't remember the exact problem this solves, but it's something like "rustc can't handle libraries with the exact same filename as build inputs". Before that PR, nobody knew it was an issue because nobody could compile crates from the cargo ecosystem. In the early version of raze, I found this issue, and implemented this hack. This comment is probably the most specific framing of it EDIT: Oh, one more thing. This isn't usually a problem, except when you bring in cargo crates, because cargo makes the design choice of permitting multiple versions of the same crate in the build tree. This means that it's not uncommon for some root level crate to have multiple versions of some libCRATE_NAME.so in the dependency list. Side thing. In this case, I knew I was probably the only person that could answer this, but didn't know exactly what the answer was. Here's how I found the answer from my past self:
In my undead maintainer state, I'm not really against changing this, but it probably can't just result in the |
I've been running into a few issues related to this and I thought I'd mention them here. In short, for top-level crates (that is for things like cdylib and bin crates) I think the renaming is a hassle and I don't think it's necessary in order to prevent the bug that was mentioned above (since these targets will not be dependencies into a rust library and if they were I imagine it would either be as a Aside from the obvious annoyance that one needs a I understand the rationale for adding this hash in the first place but I wonder if others believe that it is something that we might be able to relax for cdylib and bin crates. Edit: actually just cdylib since this doesn't apply to bin crates I'm pretty sure. |
I think #1066 satisfies the request here since I opened it while trying to load |
I've come across this enough and feel like I should post an issue here.
Can someone provide some justification for why libraries produced by
rust_library
include a hash in them (see @io_bazel_rules_rust//rust/private:rust.bzl). My expectation is that the name would simply be the name of the target plus the appropriate extension.vs
I can appreciate the hash but I feel like that should instead be a symlink target or maybe a symlink should be created that uses the simple name. Maybe the hash can just be some metadata file generated with the library. Either way, I find this to be more cumbersome than helpful.
Interested in hearing other peoples thoughts though. Again, I'd love to hear why this is the way that it is.
The text was updated successfully, but these errors were encountered: