c.write(
"""
// AUTO-GENERATED FILE: DO NOT EDIT
+#[crate_id=\"run_pass_stage2#0.1\"];
#[pkgid=\"run_pass_stage2#0.1\"];
#[link(name=\"run_pass_stage2\", vers=\"0.1\")];
#[feature(globs, macro_rules, struct_variant, managed_boxes)];
*/
+// NOTE: remove after snapshot
#[pkgid = "extra#0.9-pre"];
+#[crate_id = "extra#0.9-pre"];
#[comment = "Rust extras"];
#[license = "MIT/ASL2"];
#[crate_type = "rlib"];
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// NOTE: remove after snapshot
#[pkgid = "rustc#0.9-pre"];
+#[crate_id = "rustc#0.9-pre"];
#[comment = "The Rust compiler"];
#[license = "MIT/ASL2"];
#[crate_type = "dylib"];
attr::mk_attr(
attr::mk_name_value_item_str(
- @"pkgid",
+ @"crate_id",
ecx.link_meta.pkgid.to_str().to_managed()))
}
let mut attrs = ~[];
for attr in crate.attrs.iter() {
- if "pkgid" != attr.name() {
+ if "crate_id" != attr.name() {
attrs.push(*attr);
}
}
}
static crate_attrs: &'static [&'static str] = &[
- "crate_type", "feature", "no_uv", "no_main", "no_std", "pkgid",
+// NOTE: remove pkgid after snapshot
+ "crate_type", "feature", "no_uv", "no_main", "no_std", "pkgid", "crate_id",
"desc", "comment", "license", "copyright", // not used in rustc now
];
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// NOTE: remove after snapshot
#[pkgid = "rustdoc#0.9-pre"];
+#[crate_id = "rustdoc#0.9-pre"];
#[desc = "rustdoc, the Rust documentation extractor"];
#[license = "MIT/ASL2"];
#[crate_type = "dylib"];
// 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"];
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"]);
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");
}
});
// 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());
*/
+// NOTE: remove after snapshot
#[pkgid = "rustuv#0.9-pre"];
+#[crate_id = "rustuv#0.9-pre"];
#[license = "MIT/ASL2"];
#[crate_type = "rlib"];
#[crate_type = "dylib"];
//!
//! use std::prelude::*;
+// NOTE: remove after snapshot
#[pkgid = "std#0.9-pre"];
+#[crate_id = "std#0.9-pre"];
#[comment = "The Rust standard library"];
#[license = "MIT/ASL2"];
#[crate_type = "rlib"];
}
pub fn find_pkgid(attrs: &[Attribute]) -> Option<PkgId> {
- match first_attr_value_str_by_name(attrs, "pkgid") {
+ match first_attr_value_str_by_name(attrs, "crate_id") {
None => None,
Some(id) => from_str::<PkgId>(id),
}
* macros.
*/
+// NOTE: remove pkgid after snapshot
#[pkgid = "syntax#0.9-pre"];
+#[crate_id = "syntax#0.9-pre"];
#[license = "MIT/ASL2"];
#[crate_type = "dylib"];
#[crate_type = "rlib"];
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[pkgid="anonexternmod#0.1"];
+#[crate_id="anonexternmod#0.1"];
use std::libc;
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[pkgid="cci_impl_lib"];
+#[crate_id="cci_impl_lib"];
// NOTE: remove after the next snapshot
#[link(name="cci_impl_lib", vers="0.0")];
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[pkgid="cci_iter_lib"];
+#[crate_id="cci_iter_lib"];
// NOTE: remove after the next snapshot
#[link(name="cci_iter_lib", vers="0.0")];
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[pkgid="cci_no_inline_lib"];
+#[crate_id="cci_no_inline_lib"];
// NOTE: remove after the next snapshot
#[link(name="cci_no_inline_lib", vers="0.0")];
// except according to those terms.
#[feature(managed_boxes)];
-#[pkgid="crate_method_reexport_grrrrrrr2"];
+#[crate_id="crate_method_reexport_grrrrrrr2"];
// NOTE: remove after the next snapshot
#[link(name = "crate_method_reexport_grrrrrrr2")];
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[pkgid="crateresolve1#0.1"];
+#[crate_id="crateresolve1#0.1"];
// NOTE: remove after the next snapshot
#[link(name = "crateresolve1",
vers = "0.1")];
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[pkgid="crateresolve1#0.2"];
+#[crate_id="crateresolve1#0.2"];
// NOTE: remove after the next snapshot
#[link(name = "crateresolve1",
vers = "0.2")];
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[pkgid="crateresolve1#0.3"];
+#[crate_id="crateresolve1#0.3"];
// NOTE: remove after the next snapshot
#[link(name = "crateresolve1",
vers = "0.3")];
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[pkgid="crateresolve2#0.1"];
+#[crate_id="crateresolve2#0.1"];
// NOTE: remove after the next snapshot
#[link(name = "crateresolve2",
vers = "0.1")];
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[pkgid="crateresolve2#0.2"];
+#[crate_id="crateresolve2#0.2"];
// NOTE: remove after the next snapshot
#[link(name = "crateresolve2",
vers = "0.2")];
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[pkgid="crateresolve2#0.3"];
+#[crate_id="crateresolve2#0.3"];
// NOTE: remove after the next snapshot
#[link(name = "crateresolve2",
vers = "0.3")];
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[pkgid="crateresolve3#0.1"];
+#[crate_id="crateresolve3#0.1"];
// NOTE: remove after the next snapshot
#[link(name = "crateresolve3",
vers = "0.1")];
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[pkgid="crateresolve3#0.2"];
+#[crate_id="crateresolve3#0.2"];
// NOTE: remove after the next snapshot
#[link(name = "crateresolve3",
vers = "0.2")];
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[pkgid="crateresolve4a#0.1"];
+#[crate_id="crateresolve4a#0.1"];
// NOTE: remove after the next snapshot
#[link(name = "crateresolve4a", vers = "0.1")];
#[crate_type = "lib"];
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[pkgid="crateresolve4a#0.2"];
+#[crate_id="crateresolve4a#0.2"];
// NOTE: remove after the next snapshot
#[link(name = "crateresolve4a", vers= "0.2")];
#[crate_type = "lib"];
// aux-build:crateresolve4a-1.rs
// aux-build:crateresolve4a-2.rs
-#[pkgid="crateresolve4b#0.1"];
+#[crate_id="crateresolve4b#0.1"];
// NOTE: remove after the next snapshot
#[link(name = "crateresolve4b", vers = "0.1")];
#[crate_type = "lib"];
// aux-build:crateresolve4a-1.rs
// aux-build:crateresolve4a-2.rs
-#[pkgid="crateresolve4b#0.2"];
+#[crate_id="crateresolve4b#0.2"];
// NOTE: remove after the next snapshot
#[link(name = "crateresolve4b", vers = "0.2")];
#[crate_type = "lib"];
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[pkgid="crateresolve5#0.1"];
+#[crate_id="crateresolve5#0.1"];
// NOTE: remove after the next snapshot
#[link(name = "crateresolve5",
vers = "0.1")];
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[pkgid="crateresolve5#0.2"];
+#[crate_id="crateresolve5#0.2"];
// NOTE: remove after the next snapshot
#[link(name = "crateresolve5",
vers = "0.2")];
// except according to those terms.
// default link meta for 'package_id' will be equal to filestem
-#[pkgid="crateresolve8#0.1"];
+#[crate_id="crateresolve8#0.1"];
// NOTE: remove after the next snapshot
#[link(name = "crateresolve8",
vers = "0.1")];
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[pkgid="crateresolve_calories#0.1"];
+#[crate_id="crateresolve_calories#0.1"];
// NOTE: remove after the next snapshot
#[link(name = "crateresolve_calories",
vers = "0.1",
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[pkgid="crateresolve_calories#0.1"];
+#[crate_id="crateresolve_calories#0.1"];
// NOTE: remove after the next snapshot
#[link(name = "crateresolve_calories",
vers = "0.1",
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[pkgid="externcallback#0.1"];
+#[crate_id="externcallback#0.1"];
// NOTE: remove after the next snapshot
#[link(name = "externcallback",
vers = "0.1")];
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[pkgid="foreign_lib"];
+#[crate_id="foreign_lib"];
// NOTE: remove after the next snapshot
#[link(name="foreign_lib", vers="0.0")];
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[pkgid="inline_dtor#0.1"];
+#[crate_id="inline_dtor#0.1"];
// NOTE: remove after the next snapshot
#[link(name="inline_dtor", vers="0.1")];
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[pkgid="issue6919_3#0.1"];
+#[crate_id="issue6919_3#0.1"];
// NOTE: remove after the next snapshot
#[link(name="iss6919_3", vers="0.1")];
// except according to those terms.
#[feature(managed_boxes)];
-#[pkgid="a"];
+#[crate_id="a"];
// NOTE: remove after the next snapshot
#[link(name = "a", vers = "0.0")];
#[crate_type = "lib"];
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[pkgid="a#0.1"];
+#[crate_id="a#0.1"];
// NOTE: remove after the next snapshot
#[link(name = "a", vers = "0.1")];
#[crate_type = "lib"];
// xfail-fast
-#[pkgid="b#0.1"];
+#[crate_id="b#0.1"];
// NOTE: remove after the next snapshot
#[link(name = "b", vers = "0.1")];
#[crate_type = "lib"];
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[pkgid="issue_2526#0.2"];
+#[crate_id="issue_2526#0.2"];
// NOTE: remove after the next snapshot
#[link(name = "issue_2526",
vers = "0.2",
// except according to those terms.
#[feature(managed_boxes)];
-#[pkgid="req"];
+#[crate_id="req"];
// NOTE: remove after the next snapshot
#[link(name = "req")];
#[crate_type = "lib"];
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[pkgid="socketlib"];
+#[crate_id="socketlib"];
// NOTE: remove after the next snapshot
#[link(name="socketlib", vers="0.0")];
#[crate_type = "lib"];
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[pkgid="numeric#0.1"];
+#[crate_id="numeric#0.1"];
// NOTE: remove after the next snapshot
#[link(name = "numeric",
vers = "0.1")];
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[pkgid="a#0.1"];
+#[crate_id="a#0.1"];
// NOTE: remove after the next snapshot
#[link(name = "a", vers = "0.1")];
#[crate_type = "lib"];
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[pkgid="c#0.1"];
+#[crate_id="c#0.1"];
// NOTE: remove after the next snapshot
#[link(name = "c", vers = "0.1")];
#[crate_type = "lib"];
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[pkgid="issue_3979_traits#0.1"];
+#[crate_id="issue_3979_traits#0.1"];
// NOTE: remove after the next snapshot
#[link(name = "issue_3979_traits",
vers = "0.1")];
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[pkgid="lint_stability#0.1"];
+#[crate_id="lint_stability#0.1"];
// NOTE: remove after the next snapshot
#[link(name = "lint_stability",
vers = "0.1")];
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[pkgid="static-function-pointer-aux"];
+#[crate_id="static-function-pointer-aux"];
pub fn f(x: int) -> int { -x }
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[pkgid="static_methods_crate#0.1"];
+#[crate_id="static_methods_crate#0.1"];
// NOTE: remove after the next snapshot
#[link(name = "static_methods_crate",
vers = "0.1")];
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[pkgid="struct_variant_xc_aux#0.1"];
+#[crate_id="struct_variant_xc_aux#0.1"];
// NOTE: remove after the next snapshot
#[link(name = "struct_variant_xc_aux",
vers = "0.1")];
-#[pkgid="trait_default_method_xc_aux"];
+#[crate_id="trait_default_method_xc_aux"];
pub struct Something { x: int }
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[pkgid="boot#0.1"];
+#[crate_id="boot#0.1"];
#[crate_type="lib"];
extern mod rustuv; // pull in uvio
-#[pkgid="foo#0.1"];
+#[crate_id="foo#0.1"];
pub mod foo;
pub mod bar;
// xfail-fast
// aux-build:crateresolve8-1.rs
-#[pkgid="crateresolve8#0.1"];
+#[crate_id="crateresolve8#0.1"];
extern mod crateresolve8(vers = "0.1", package_id="crateresolve8#0.1");
//extern mod crateresolve8(vers = "0.1");
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[pkgid="rust_get_test_int"];
+#[crate_id="rust_get_test_int"];
// NOTE: remove after the next snapshot
#[link(name = "rust_get_test_int")];
// aux-build:iss.rs
// xfail-fast
-#[pkgid="issue-6919"];
+#[crate_id="issue-6919"];
extern mod issue6919_3;
#[attr3];
#[attr4(attr5)];
-#[pkgid="extra#0.1"];
+#[crate_id="extra#0.1"];
// NOTE: remove after the next snapshot
// Special linkage attributes for the crate
#[link(name = "extra",