Skip to content

Commit 8258b1b

Browse files
Merge pull request #78475 from cachemeifyoucan/eng/fix-typo-python-script
2 parents d2e0f66 + ef99096 commit 8258b1b

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

test/CAS/Inputs/GenerateExplicitModuleMap.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99

1010
modules = []
1111

12-
with open(input_json, 'r') as file:
12+
with open(input_json, "r") as file:
1313
deps = json.load(file)
14-
main_module_name = deps['mainModuleName']
15-
module_names = deps['modules'][::2]
16-
module_details = deps['modules'][1::2]
14+
main_module_name = deps["mainModuleName"]
15+
module_names = deps["modules"][::2]
16+
module_details = deps["modules"][1::2]
1717
# add all modules other than the main module into the module map.
1818
for name, detail in zip(module_names, module_details):
1919
kind, name = list(name.items())[0]
@@ -24,11 +24,15 @@
2424
module["moduleName"] = name
2525
module["isFramework"] = False
2626
if kind == "clang":
27-
module["clangModulePath"] = name + ".pcm"
28-
module["clangModuleCacheKey"] = detail['details'][kind]["moduleCacheKey"]
27+
module["clangModulePath"] = detail["modulePath"]
28+
if "moduleCacheKey" in detail["details"][kind]:
29+
module["clangModuleCacheKey"] = detail["details"][kind][
30+
"moduleCacheKey"
31+
]
2932
else:
30-
module["modulePath"] = name + ".swiftmdoule"
31-
module["moduleCacheKey"] = detail['details'][kind]["moduleCacheKey"]
33+
module["modulePath"] = detail["modulePath"]
34+
if "moduleCacheKey" in detail["details"][kind]:
35+
module["moduleCacheKey"] = detail["details"][kind]["moduleCacheKey"]
3236

3337
modules.append(module)
3438

test/CAS/module_trace.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
// RUN: %{python} %S/../Inputs/process_fine_grained_swiftdeps_with_fingerprints.py %swift-dependency-tool %t/test.swiftdeps > %t/test-processed.swiftdeps
4545
// RUN: %FileCheck %s --check-prefix=SWIFTDEPS --input-file=%t/test-processed.swiftdeps
4646
// SWIFTDEPS: A.swiftinterface
47-
// SWIFTDEPS: B.swiftmdoule
47+
// SWIFTDEPS: B.swiftmodule
4848

4949

5050
//--- main.swift

0 commit comments

Comments
 (0)