servo: Merge #17780 - Update to cargo 0.21.0-nightly (eb6cf012a 2017-07-02) (from servo:cargoup); r=nox,SimonSapin
authorSimon Sapin <simon.sapin@exyr.org>
Tue, 18 Jul 2017 15:57:07 -0700
changeset 369571 380ad1bfb187a075e540ffaf07e2c104d6c00a13
parent 369570 d396287f259511a918635420ecd87fd503df885b
child 369572 7e194151d3691e523b1ba9d7a02e71915f06b1f9
push id92714
push userryanvm@gmail.com
push dateWed, 19 Jul 2017 14:01:20 +0000
treeherdermozilla-inbound@c5ea72577f79 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnox, SimonSapin
milestone56.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
servo: Merge #17780 - Update to cargo 0.21.0-nightly (eb6cf012a 2017-07-02) (from servo:cargoup); r=nox,SimonSapin Cargo binaries are now produced on Rust’s CI, not Cargo’s. Remove cargo-commit-hash and find Cargo based on rust-commit-hash. Unfortunately, Cargo binaries are not available for every Cargo PR anymore: https://github.com/rust-lang/cargo/pull/4123#issuecomment-316201869 Source-Repo: https://github.com/servo/servo Source-Revision: d403f404382c66485d9744787ce021556be59d6c
servo/Cargo.lock
servo/appveyor.yml
servo/cargo-commit-hash
servo/python/servo/bootstrap_commands.py
servo/python/servo/command_base.py
servo/python/servo/devenv_commands.py
--- a/servo/Cargo.lock
+++ b/servo/Cargo.lock
@@ -1615,22 +1615,23 @@ dependencies = [
  "webrender 0.48.0 (git+https://github.com/servo/webrender)",
  "webrender_api 0.48.0 (git+https://github.com/servo/webrender)",
  "webvr 0.0.1",
  "webvr_traits 0.0.1",
 ]
 
 [[package]]
 name = "libz-sys"
-version = "1.0.13"
+version = "1.0.16"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "gcc 0.3.47 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.23 (registry+https://github.com/rust-lang/crates.io-index)",
  "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "log"
 version = "0.3.8"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
@@ -1745,17 +1746,17 @@ dependencies = [
 ]
 
 [[package]]
 name = "mozjs_sys"
 version = "0.0.0"
 source = "git+https://github.com/servo/mozjs#834ce35c3f008010213351107b68f397989d2ffd"
 dependencies = [
  "libc 0.2.23 (registry+https://github.com/rust-lang/crates.io-index)",
- "libz-sys 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libz-sys 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "mp3-metadata"
 version = "0.2.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
@@ -3358,16 +3359,21 @@ name = "uuid"
 version = "0.5.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
+name = "vcpkg"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
 name = "vec_map"
 version = "0.6.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "void"
 version = "1.0.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3713,17 +3719,17 @@ dependencies = [
 "checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a"
 "checksum lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3b37545ab726dd833ec6420aaba8231c5b320814b9029ad585555d2a03e94fbf"
 "checksum lazycell 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ce12306c4739d86ee97c23139f3a34ddf0387bbf181bc7929d287025a8c3ef6b"
 "checksum leak 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bd100e01f1154f2908dfa7d02219aeab25d0b9c7fa955164192e3245255a0c73"
 "checksum leaky-cow 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "40a8225d44241fd324a8af2806ba635fc7c8a7e9a7de4d5cf3ef54e71f5926fc"
 "checksum len-trait 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "723558ab8acaa07cb831b424cd164b587ddc1648b34748a30953c404e9a4a65b"
 "checksum libc 0.2.23 (registry+https://github.com/rust-lang/crates.io-index)" = "e7eb6b826bfc1fdea7935d46556250d1799b7fe2d9f7951071f4291710665e3e"
 "checksum libloading 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "be99f814beb3e9503a786a592c909692bb6d4fc5a695f6ed7987223acfbd5194"
-"checksum libz-sys 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)" = "e5ee912a45d686d393d5ac87fac15ba0ba18daae14e8e7543c63ebf7fb7e970c"
+"checksum libz-sys 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)" = "3fdd64ef8ee652185674455c1d450b83cbc8ad895625d543b5324d923f82e4d8"
 "checksum log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "880f77541efa6e5cc74e76910c9884d9859683118839d6a1dc3b11e63512565b"
 "checksum lzw 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7d947cbb889ed21c2a84be6ffbaebf5b4e0f4340638cba0444907e38b56be084"
 "checksum mac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4"
 "checksum malloc_buf 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb"
 "checksum markup5ever 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "622d7d373a68b45f4a90f4b498da40cba8ce6aff56fbddbcbbe9cf1f2a8f3df9"
 "checksum matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "efd7622e3022e1a6eaa602c4cea8912254e5582c9c692e9167714182244801b1"
 "checksum memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1dbccc0e46f1ea47b9f17e6d67c5a96bd27030519c519c9c91327e31275a47b4"
 "checksum metadeps 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "829fffe7ea1d747e23f64be972991bc516b2f1ac2ae4a3b33d8bea150c410151"
@@ -3852,16 +3858,17 @@ dependencies = [
 "checksum unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc"
 "checksum unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1f2ae5ddb18e1c92664717616dd9549dde73f539f01bd7b77c2edb2446bdff91"
 "checksum url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eeb819346883532a271eb626deb43c4a1bb4c4dd47c519bd78137c3e72a4fe27"
 "checksum url_serde 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "74e7d099f1ee52f823d4bdd60c93c3602043c728f5db3b97bdb548467f7bddea"
 "checksum user32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ef4711d107b21b410a3a974b1204d9accc8b10dad75d8324b5d755de1617d47"
 "checksum utf-8 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b6f923c601c7ac48ef1d66f7d5b5b2d9a7ba9c51333ab75a3ddf8d0309185a56"
 "checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122"
 "checksum uuid 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b5d0f5103675a280a926ec2f9b7bcc2ef49367df54e8c570c3311fec919f9a8b"
+"checksum vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9e0a7d8bed3178a8fb112199d466eeca9ed09a14ba8ad67718179b4fd5487d0b"
 "checksum vec_map 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cac5efe5cb0fa14ec2f84f83c701c562ee63f6dcc680861b21d65c682adfb05f"
 "checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
 "checksum walkdir 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "bb08f9e670fab86099470b97cd2b252d6527f0b3cc1401acdb595ffc9dd288ff"
 "checksum webdriver 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d548aabf87411b1b4ba91fd07eacd8b238135c7131a452b8a9f6386209167e18"
 "checksum webrender 0.48.0 (git+https://github.com/servo/webrender)" = "<none>"
 "checksum webrender_api 0.48.0 (git+https://github.com/servo/webrender)" = "<none>"
 "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
 "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
--- a/servo/appveyor.yml
+++ b/servo/appveyor.yml
@@ -31,18 +31,18 @@ environment:
   matrix:
   - TARGET: nightly-x86_64-pc-windows-msvc
 
 branches:
   only:
     - master
 
 cache:
-  - .servo -> rust-commit-hash, cargo-commit-hash
-  - .cargo -> rust-commit-hash, cargo-commit-hash
+  - .servo -> rust-commit-hash
+  - .cargo -> rust-commit-hash
   - .ccache
 
 # Uncomment these lines to expose RDP access information to the build machine in the build log.
 #init:
 #  - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
 #
 #on_finish:
 #  - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
deleted file mode 100644
--- a/servo/cargo-commit-hash
+++ /dev/null
@@ -1,1 +0,0 @@
-2233f515b1e8281841ceaed802f74fe2f9e54701
--- a/servo/python/servo/bootstrap_commands.py
+++ b/servo/python/servo/bootstrap_commands.py
@@ -202,18 +202,18 @@ class MachCommands(CommandBase):
             print("Use |bootstrap-cargo --force| to download again.")
             return
 
         if path.isdir(cargo_dir):
             shutil.rmtree(cargo_dir)
         os.makedirs(cargo_dir)
 
         tgz_file = "cargo-nightly-%s.tar.gz" % host_triple()
-        nightly_url = "https://s3.amazonaws.com/rust-lang-ci/cargo-builds/%s/%s" % \
-            (self.cargo_build_id(), tgz_file)
+        nightly_url = "https://s3.amazonaws.com/rust-lang-ci/rustc-builds/%s/%s" % \
+            (self.cargo_build_id()[len("rust-"):], tgz_file)
 
         download_file("Cargo nightly", nightly_url, tgz_file)
 
         print("Extracting Cargo nightly...")
         nightly_dir = path.join(cargo_dir,
                                 path.basename(tgz_file).replace(".tar.gz", ""))
         extract(tgz_file, cargo_dir, movedir=nightly_dir)
         print("Cargo ready.")
@@ -290,56 +290,48 @@ class MachCommands(CommandBase):
     @CommandArgument('--keep',
                      default='1',
                      help='Keep up to this many most recent nightlies')
     def clean_nightlies(self, force=False, keep=None):
         self.set_use_stable_rust(False)
         rust_current_nightly = self.rust_version()
         self.set_use_stable_rust(True)
         rust_current_stable = self.rust_version()
-        cargo_current = self.cargo_build_id()
         print("Current Rust nightly version: {}".format(rust_current_nightly))
         print("Current Rust stable version: {}".format(rust_current_stable))
-        print("Current Cargo version: {}".format(cargo_current))
-        to_keep = {
-            'rust': set(),
-            'cargo': set(),
-        }
+        to_keep = set()
         if int(keep) == 1:
             # Optimize keep=1 case to not invoke git
-            to_keep['rust'].add(rust_current_nightly)
-            to_keep['rust'].add(rust_current_stable)
-            to_keep['cargo'].add(cargo_current)
+            to_keep.add(rust_current_nightly)
+            to_keep.add(rust_current_stable)
         else:
-            for tool, version_files in {
-                'rust': ['rust-commit-hash', 'rust-stable-version'],
-                'cargo': ['cargo-commit-hash'],
-            }.items():
-                for version_file in version_files:
-                    cmd = subprocess.Popen(
-                        ['git', 'log', '--oneline', '--no-color', '-n', keep, '--patch', version_file],
-                        stdout=subprocess.PIPE,
-                        universal_newlines=True
-                    )
-                    stdout, _ = cmd.communicate()
-                    for line in stdout.splitlines():
-                        if line.startswith(b"+") and not line.startswith(b"+++"):
-                            to_keep[tool].add(line[1:])
+            for version_file in ['rust-commit-hash', 'rust-stable-version']:
+                cmd = subprocess.Popen(
+                    ['git', 'log', '--oneline', '--no-color', '-n', keep, '--patch', version_file],
+                    stdout=subprocess.PIPE,
+                    universal_newlines=True
+                )
+                stdout, _ = cmd.communicate()
+                for line in stdout.splitlines():
+                    if line.startswith(b"+") and not line.startswith(b"+++"):
+                        to_keep.add(line[1:])
 
         removing_anything = False
         for tool in ["rust", "cargo"]:
             base = path.join(self.context.sharedir, tool)
             if not path.isdir(base):
                 continue
             for name in os.listdir(base):
+                if name.startswith("rust-"):
+                    name = name[len("rust-"):]
                 # We append `-alt` if LLVM assertions aren't enabled,
                 # so use just the commit hash itself.
                 # This may occasionally leave an extra nightly behind
                 # but won't remove too many nightlies.
-                if name.partition('-')[0] not in to_keep[tool]:
+                if name.partition('-')[0] not in to_keep:
                     removing_anything = True
                     full_path = path.join(base, name)
                     if force:
                         print("Removing {}".format(full_path))
                         delete(full_path)
                     else:
                         print("Would remove {}".format(full_path))
         if not removing_anything:
--- a/servo/python/servo/command_base.py
+++ b/servo/python/servo/command_base.py
@@ -321,19 +321,19 @@ class CommandBase(object):
             filename = path.join(self.context.topdir,
                                  "rust-stable-version" if self._use_stable_rust else "rust-commit-hash")
             with open(filename) as f:
                 self._rust_version = f.read().strip()
         return self._rust_version
 
     def cargo_build_id(self):
         if self._cargo_build_id is None:
-            filename = path.join(self.context.topdir, "cargo-commit-hash")
+            filename = path.join(self.context.topdir, "rust-commit-hash")
             with open(filename) as f:
-                self._cargo_build_id = f.read().strip()
+                self._cargo_build_id = "rust-" + f.read().strip()
         return self._cargo_build_id
 
     def get_top_dir(self):
         return self.context.topdir
 
     def get_target_dir(self):
         if "CARGO_TARGET_DIR" in os.environ:
             return os.environ["CARGO_TARGET_DIR"]
--- a/servo/python/servo/devenv_commands.py
+++ b/servo/python/servo/devenv_commands.py
@@ -279,31 +279,16 @@ class MachCommands(CommandBase):
             commit = json.load(urllib2.urlopen(url))["sha"]
         filename = path.join(self.context.topdir, "rust-commit-hash")
         with open(filename, "w") as f:
             f.write(commit + "\n")
 
         # Reset self.config["tools"]["rust-root"]
         self._rust_version = None
         self.set_use_stable_rust(False)
-
-        self.fetch()
-
-    @Command('cargoup',
-             description='Update the Cargo version to latest master',
-             category='devenv')
-    def cargoup(self):
-        url = "https://api.github.com/repos/rust-lang/cargo/git/refs/heads/master"
-        commit = json.load(urllib2.urlopen(url))["object"]["sha"]
-        filename = path.join(self.context.topdir, "cargo-commit-hash")
-        with open(filename, "w") as f:
-            f.write(commit + "\n")
-
-        # Reset self.config["tools"]["cargo-root"]
-        self._cargo_build_id = None
         self.set_cargo_root()
 
         self.fetch()
 
     @Command('fetch',
              description='Fetch Rust, Cargo and Cargo dependencies',
              category='devenv')
     def fetch(self):