parent
b6933f8d8b
commit
dee1107571
60 changed files with 72 additions and 56 deletions
|
|
@ -10,7 +10,9 @@
|
|||
|
||||
// rustpkg - a package manager and build system for Rust
|
||||
|
||||
// NOTE: remove after snapshot
|
||||
#[pkgid = "rustpkg#0.9-pre"];
|
||||
#[crate_id = "rustpkg#0.9-pre"];
|
||||
#[license = "MIT/ASL2"];
|
||||
#[crate_type = "dylib"];
|
||||
|
||||
|
|
|
|||
|
|
@ -1892,9 +1892,9 @@ fn pkgid_pointing_to_subdir() {
|
|||
fs::mkdir_recursive(&foo_dir, io::UserRWX);
|
||||
fs::mkdir_recursive(&bar_dir, io::UserRWX);
|
||||
writeFile(&foo_dir.join("lib.rs"),
|
||||
"#[pkgid=\"mockgithub.com/mozilla/some_repo/extras/foo\"]; pub fn f() {}");
|
||||
"#[crate_id=\"mockgithub.com/mozilla/some_repo/extras/foo\"]; pub fn f() {}");
|
||||
writeFile(&bar_dir.join("lib.rs"),
|
||||
"#[pkgid=\"mockgithub.com/mozilla/some_repo/extras/bar\"]; pub fn g() {}");
|
||||
"#[crate_id=\"mockgithub.com/mozilla/some_repo/extras/bar\"]; pub fn g() {}");
|
||||
|
||||
debug!("Creating a file in {}", workspace.display());
|
||||
let testpkg_dir = workspace.join_many(["src", "testpkg-0.0"]);
|
||||
|
|
@ -2316,7 +2316,7 @@ fn find_sources_in_cwd() {
|
|||
let source_dir = temp_dir.join("foo");
|
||||
fs::mkdir_recursive(&source_dir, io::UserRWX);
|
||||
writeFile(&source_dir.join("main.rs"),
|
||||
"fn main() { let _x = (); }");
|
||||
r#"#[crate_id="foo"]; fn main() { let _x = (); }"#);
|
||||
command_line_test([~"install", ~"foo"], &source_dir);
|
||||
assert_executable_exists(&source_dir.join(".rust"), "foo");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -291,10 +291,10 @@ pub fn compile_input(context: &BuildContext,
|
|||
});
|
||||
|
||||
// Inject the pkgid attribute so we get the right package name and version
|
||||
if !attr::contains_name(crate.attrs, "pkgid") {
|
||||
if !attr::contains_name(crate.attrs, "crate_id") {
|
||||
// FIXME (#9639): This needs to handle non-utf8 paths
|
||||
let pkgid_attr =
|
||||
attr::mk_name_value_item_str(@"pkgid",
|
||||
attr::mk_name_value_item_str(@"crate_id",
|
||||
format!("{}\\#{}",
|
||||
pkg_id.path.as_str().unwrap(),
|
||||
pkg_id.version.to_str()).to_managed());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue