-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Implement versioned library naming and rename libruststd back to libstd #1157
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
Comments
I will work on this. I like the idea of putting hash in library file name! A few questions: |
There are some very detailed comments about how Rust versioning is supposed to work in src/comp/back/link.rs that you should read. I don't know anything about sonames so can't answer the first two questions (my guess is the answer to both is no - we're creating our own, platform-agnostic versioning mechanism). Maybe graydon has an opinion. As to the last question, we don't need to verify the hash. This hash is just a hash of the exported metadata (everything in the #[link] attribute), and used to help differentiate the filename from other builds of the same library. I don't think we're using it for any security properties. I'm a bit worried about how this will impact the build system since we won't be able to know the names of the libraries we're producing. |
Regarding to build system impact, how about break it into steps:
Or combine 2 and 3 by implementing something like |
It seems to me like this would require installing a library in order to use it, which is pretty awkward. Regardless, I don't feel comfortable making a decision on this without @graydon's input. |
I think a library with name like libfoo.so is still okay to use directly. The metadata will be matched to decide if this is the correct version when resolving the use directive. |
But we'll link against libfoo.so, then install it, then libfoo.so doesn't exist. |
Graydon and I discussed this on IRC recently and he is of the opinion that we will be able to use wildcard rules as well as rules that run |
I was thinking about this more, and if the hashes are only based on version metadata (and possibly the version of dependencies) then the hash will be fairly stable - you'll just have to do some experimentation and edit the makefiles every time metadata changes. |
Revert rust-lang#999 commit 16dad84 Issue rust-lang#1157
I'm more inclined graydon's idea of using glob to copy. I tried implement that in commit 7cdb18d. The version number is quite stable for now, but it might be changing more often whenever we had minor and major updates after public release. And editing makefiles for updating filenames seems not good. Especially if there was a chain of dependent libraries. Hash of dependencies is not implemented yet in this series. |
Oops, I didn't notice you had done so much work on this. Is it ready to merge? |
If you think what have done is okay, I would prefer to implement the rest (hash of dependencies) and then get the series merged together. I want to reduce the times of updating snapshots. |
OK, I will wait. |
I think this bug is done now, no? was just tracking on pull req 1268 really? |
Yes, closing it. |
* Add kani logo * Update copyright exclude to include .ico files
In 16dad84 we made the crate search based purely on metadata, so that we could rename libstd to libruststd.
As graydon pointed out, we are supposed to name our libraries
lib[name]-[hash]-[version].so
, so there's no way that libstd should cause a name collision.Implement this naming convention, revert the above change and rename libruststd back to libstd.
The text was updated successfully, but these errors were encountered: