Skip to content
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

rustpkg: CrateId cleanup #11478

Merged
merged 4 commits into from
Jan 24, 2014
Merged

rustpkg: CrateId cleanup #11478

merged 4 commits into from
Jan 24, 2014

Conversation

klutzy
Copy link
Contributor

@klutzy klutzy commented Jan 11, 2014

This patchset consists of three parts:

cc @metajack

@emberian
Copy link
Member

Looks good. Could we switch fully to semver, though, rather than using string version names? So it'd be Option<semver::Version>

@huonw
Copy link
Member

huonw commented Jan 12, 2014

(Needs a rebase too.)

@metajack
Copy link
Contributor

We shouldn't switch only to SemVer because the version might be a branch or revid. Or at least that was the intent.

pub fn system_library(sysroot: &Path, crate_id: &str) -> Option<Path> {
let (lib_name, version) = split_crate_id(crate_id);
library_in(lib_name, &version, &sysroot.join(relative_target_lib_path(host_triple())))
// rustc doesn't use target-specific subdirectories
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment should be removed, see https://github.com/mozilla/rust/pull/11338/files

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, forgot to remove it when I rebased it. I'll push corrected commit soon.

@klutzy
Copy link
Contributor Author

klutzy commented Jan 14, 2014

Test currently fails because rustpkg tries to find libstd-64b22b00-0.0.so; #11523 will fix it.

@klutzy
Copy link
Contributor Author

klutzy commented Jan 16, 2014

Rebased; it now passes all tests.

@emberian
Copy link
Member

@klutzy needs another rebase.

rustpkg accessed git repo to read tags and guess package version,
but it's not quite useful: version can be given explicitly by user,
and implicit guess may cause confusions.
Currently rustpkg doesn't use SemanticVersion or Tagged, so they are
removed. Remaining variants are replaced by `Option<~str>`.
Previously rustpkg tried to parse filenames to find crate. Now ue use
deterministic hashes, so it becomes possible to directly construct
filename and check if the file exists.
There is no significant difference between `rustpkg::crate_id::CrateId`
and `syntax::crateid::CrateId`. rustpkg's one is replaced by syntax's
one.
@klutzy
Copy link
Contributor Author

klutzy commented Jan 22, 2014

Rebased!

bors added a commit that referenced this pull request Jan 22, 2014
This patchset consists of three parts:

- rustpkg doesn't guess crate version if it is not given by user.
- `rustpkg::version::Version` is replaced by `Option<~str>`.
  It removes some semantic versioning portions which is not currently used.
  (cc #8405 and #11396)
  `rustpkg::crate_id::CrateId` is also replaced by `syntax::crateid::CrateId`.
- rustpkg now computes hash to find crate, instead of manual filename parse.

cc @metajack
bors added a commit that referenced this pull request Jan 24, 2014
This patchset consists of three parts:

- rustpkg doesn't guess crate version if it is not given by user.
- `rustpkg::version::Version` is replaced by `Option<~str>`.
  It removes some semantic versioning portions which is not currently used.
  (cc #8405 and #11396)
  `rustpkg::crate_id::CrateId` is also replaced by `syntax::crateid::CrateId`.
- rustpkg now computes hash to find crate, instead of manual filename parse.

cc @metajack
@bors bors merged commit a6a31ec into rust-lang:master Jan 24, 2014
@klutzy klutzy deleted the rustpkg-crate-id branch February 20, 2014 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants