Skip to content

Commit 3d5fc8e

Browse files
danakjAravind Vasudevan
authored andcommitted
Replace the rust-toolchain if a local build failed
A missing VERSION should not cause update_rust.py to throw an exception. Change-Id: I7345954c8167c7568d5f5d86271402a360f2ef6e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4355884 Auto-Submit: danakj <[email protected]> Reviewed-by: Collin Baker <[email protected]> Commit-Queue: Collin Baker <[email protected]> Cr-Commit-Position: refs/heads/main@{#1120824} NOKEYCHECK=True GitOrigin-RevId: c718137ac1a105efc62da400a09206bd1a34a078
1 parent c8963f1 commit 3d5fc8e

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

package_rust.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
sys.path.append(
1515
os.path.join(os.path.dirname(THIS_DIR), '..', 'clang', 'scripts'))
1616

17-
from build_rust import (RUST_TOOLCHAIN_OUT_DIR, THIRD_PARTY_DIR,
18-
VERSION_STAMP_PATH)
17+
from build_rust import (RUST_TOOLCHAIN_OUT_DIR, THIRD_PARTY_DIR)
1918
from update_rust import (GetPackageVersionForBuild)
2019
from package import (MaybeUpload, TeeCmd)
2120
from update import (CHROMIUM_DIR)

update_rust.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def GetDownloadPackageVersion():
9898

9999
# Get the version of the toolchain package we already have.
100100
def GetStampVersion():
101-
if os.path.exists(RUST_TOOLCHAIN_OUT_DIR):
101+
if os.path.exists(VERSION_STAMP_PATH):
102102
with open(VERSION_STAMP_PATH) as version_file:
103103
existing_stamp = version_file.readline().rstrip()
104104
version_re = re.compile(r'rustc [0-9.]+ [0-9a-f]+ \((.+?) chromium\)')

0 commit comments

Comments
 (0)