siso: handle --path_mappings in ts_library.py

fix for https://ci.chromium.org/ui/p/chromium/builders/build/linux-build-perf-siso/2879/overview

[23046/99899] ACTION //chrome/browser/resources/discards:build_ts(//build/toolchain/linux:clang_x64)
python3 ../../tools/typescript/ts_library.py --root_gen_dir ../../../.. --root_src_dir ../../../../../../../ --root_dir gen/chrome/browser/resources/discards/preprocessed --gen_dir gen/chrome/browser/resources/discards --out_dir gen/chrome/browser/resources/discards/tsc --output_suffix build_ts --in_files database_tab.ts discards_main.ts discards_tab.ts graph_tab.ts discards.ts graph.ts sorted_table_mixin.ts database_tab.html.ts discards_main.html.ts discards_tab.html.ts graph_tab.html.ts lifecycle_unit_state.mojom-webui.ts discards.mojom-webui.ts site_data.mojom-webui.ts --path_mappings_file path_mappings_build_path_map.json --definitions ../../../../../../../tools/typescript/definitions/strings.d.ts --deps ../../../../third_party/polymer/v3_0/tsconfig_library.json ../../../../ui/webui/resources/cr_elements/tsconfig_build_ts.json ../../../../ui/webui/resources/js/tsconfig_build_ts.json ../../../../ui/webui/resources/mojo/tsconfig_build_ts.json --tsconfig_base ../../../../../../../chrome/browser/resources/discards/tsconfig_base.json --composite --path_mappings /tools/typescript/definitions/*|../../../../../../../tools/typescript/definitions/* /strings.m.js|../../../../../../../tools/typescript/definitions/strings.d.ts chrome://resources/d3/d3.min.js|../../../../../../../third_party/d3/src/d3.min.js
Traceback (most recent call last):
  File "/b/s/w/ir/cache/builder/src/out/Release/../../tools/typescript/ts_library.py", line 281, in <module>
    main(sys.argv[1:])
  File "/b/s/w/ir/cache/builder/src/out/Release/../../tools/typescript/ts_library.py", line 227, in main
    node.RunNode([
  File "/b/s/w/ir/cache/builder/src/third_party/node/node.py", line 55, in RunNode
    raise RuntimeError('Command \'%s\' failed\n%s' % (' '.join(cmd), err))
RuntimeError: Command '/b/s/w/ir/cache/builder/src/third_party/node/linux/node-linux-x64/bin/node /b/s/w/ir/cache/builder/src/third_party/node/node_modules/typescript/bin/tsc --project gen/chrome/browser/resources/discards/tsconfig_build_ts.json' failed
gen/chrome/browser/resources/discards/preprocessed/graph.ts:5:8 - error TS2792: Cannot find module 'chrome://resources/d3/d3.min.js'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?

5 import 'chrome://resources/d3/d3.min.js';
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Found 1 error in gen/chrome/browser/resources/discards/preprocessed/graph.ts:5

Change-Id: I827ca82187e97d6444dd462e44bb55d8ffc019e4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5964076
Commit-Queue: Fumitoshi Ukai <ukai@google.com>
Auto-Submit: Fumitoshi Ukai <ukai@google.com>
Reviewed-by: Junji Watanabe <jwata@google.com>
Reviewed-by: Philipp Wollermann <philwo@google.com>
Commit-Queue: Junji Watanabe <jwata@google.com>
Cr-Commit-Position: refs/heads/main@{#1373717}
1 file changed
tree: 4705a0f11eb4683d9a77c308734c37f43c486f13
  1. android_webview/
  2. apps/
  3. ash/
  4. base/
  5. build/
  6. build_overrides/
  7. buildtools/
  8. cc/
  9. chrome/
  10. chromecast/
  11. chromeos/
  12. codelabs/
  13. components/
  14. content/
  15. crypto/
  16. dbus/
  17. device/
  18. docs/
  19. extensions/
  20. fuchsia_web/
  21. gin/
  22. google_apis/
  23. gpu/
  24. headless/
  25. infra/
  26. ios/
  27. ipc/
  28. media/
  29. mojo/
  30. native_client_sdk/
  31. net/
  32. pdf/
  33. ppapi/
  34. printing/
  35. remoting/
  36. rlz/
  37. sandbox/
  38. services/
  39. skia/
  40. sql/
  41. storage/
  42. styleguide/
  43. testing/
  44. third_party/
  45. tools/
  46. ui/
  47. url/
  48. webkit/
  49. .clang-format
  50. .clang-tidy
  51. .clangd
  52. .git-blame-ignore-revs
  53. .gitallowed
  54. .gitattributes
  55. .gitignore
  56. .gitmodules
  57. .gn
  58. .mailmap
  59. .rustfmt.toml
  60. .vpython3
  61. .yapfignore
  62. ATL_OWNERS
  63. AUTHORS
  64. BUILD.gn
  65. CODE_OF_CONDUCT.md
  66. codereview.settings
  67. CPPLINT.cfg
  68. CRYPTO_OWNERS
  69. DEPS
  70. DIR_METADATA
  71. LICENSE
  72. LICENSE.chromium_os
  73. OWNERS
  74. PRESUBMIT.py
  75. PRESUBMIT_test.py
  76. PRESUBMIT_test_mocks.py
  77. README.md
  78. WATCHLISTS
README.md

Logo Chromium

Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.

The project's web site is https://www.chromium.org.

To check out the source code locally, don't use git clone! Instead, follow the instructions on how to get the code.

Documentation in the source is rooted in docs/README.md.

Learn how to Get Around the Chromium Source Code Directory Structure.

For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.

If you found a bug, please file it at https://crbug.com/new.