[elements-sk] Rewrite all imports using a bespoke Go program.

This CL is the result of:
 - Running the rewrite_imports.go program at https://skia-review.googlesource.com/c/buildbot/+/654405/2/rewrite_imports/rewrite_imports.go
 - Running "make gazelle".

Success criteria: This CL should not cause any Gold diffs.

I removed the rewrite_imports.go program in a subsequent patchset as it is a one-off utility. This program does the following things:
 - Rewrites all common-sk imports to use modules in the buildbot repo.
 - Same for elements-sk, but with the following special cases.
 - It moves any elements-sk style imports from TypeScript sources into the corresponding Sass sources.
 - Style import paths are rewritten from e.g. elements-sk/styles/button/button.scss to elements-sk/modules/styles/button.
 - Icon imports are rewritten from elements-sk/icon/some-icon-sk to elements-sk/modules/icons/some-icon-sk.

Bug: skia:14161
Change-Id: I9d319b894df1dff01f8300233104097f680493be
Reviewed-on: https://skia-review.googlesource.com/c/buildbot/+/654405
Commit-Queue: Leandro Lovisolo <lovisolo@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
707 files changed
tree: 8943e6937dd958a0ec2994e4de75bb1b4b02fbc4
  1. am/
  2. android_ingest/
  3. android_stats/
  4. api/
  5. autoroll/
  6. bash/
  7. bazel/
  8. blamer/
  9. bugs-central/
  10. cd/
  11. cherrypick-watcher/
  12. cmd/
  13. codereview-watcher/
  14. codesize/
  15. comments/
  16. comp-ui/
  17. cq_watcher/
  18. ct/
  19. datahopper/
  20. debugger-app/
  21. demos/
  22. docker/
  23. docker_pushes_watcher/
  24. docs/
  25. docsyserver/
  26. ds/
  27. elements-sk/
  28. email/
  29. external/
  30. fiddlek/
  31. firestore/
  32. get_service_account/
  33. gitsync/
  34. go/
  35. gold-client/
  36. golden/
  37. infra/
  38. infra-sk/
  39. jsdoc/
  40. jsfiddle/
  41. k8s-checker/
  42. k8s-deployer/
  43. kube/
  44. leasing/
  45. licenses/
  46. machine/
  47. make/
  48. modules/
  49. named-fiddles/
  50. new_element/
  51. npm-audit-mirror/
  52. perdiff/
  53. perf/
  54. periodic-trigger/
  55. proberk/
  56. promk/
  57. puppeteer-tests/
  58. sa-keys-checker/
  59. scrap/
  60. scripts/
  61. shaders/
  62. sk/
  63. skbug/
  64. skcq/
  65. skfe/
  66. skolo/
  67. skottie/
  68. static_server/
  69. status/
  70. task_driver/
  71. task_scheduler/
  72. test-service/
  73. third_party/
  74. tools/
  75. tree_status/
  76. trybot_updater/
  77. .bazelignore
  78. .bazelrc
  79. .bazelversion
  80. .eslintrc.js
  81. .gitattributes
  82. .gitignore
  83. .npmrc
  84. .puppeteerrc.js
  85. .vpython
  86. BAZEL_CHEATSHEET.md
  87. BUILD.bazel
  88. build_infra_prod.sh
  89. cipd.ensure
  90. codereview.settings
  91. DATASTORE.md
  92. demopage.sh
  93. DEPS
  94. go.mod
  95. go.sum
  96. go_repositories.bzl
  97. karmatest.sh
  98. launch.md
  99. LICENSE
  100. Makefile
  101. OWNERS
  102. package-lock.json
  103. package.json
  104. PRESUBMIT.py
  105. PRIVACY_POLICY.md
  106. README.md
  107. STYLEGUIDE.md
  108. tools.go
  109. tsconfig.json
  110. whitespace.txt
  111. WORKSPACE
README.md

Skia-Buildbot Repository

This repo contains infrastructure code for Skia.

Getting the Source Code

The main source code repository is a Git repository hosted at https://skia.googlesource.com/buildbot.git. It is possible to check out this repository directly with git clone or via go get.

Using git clone allows you to work in whatever directory you want. You will still need to set GOPATH in order to build some apps (recommended to put this in a cache dir). E.g.:

$ cd ${WORKDIR}
$ git clone https://skia.googlesource.com/buildbot.git
$ export GOPATH=${HOME}/.cache/gopath/$(basename ${WORKDIR})
$ mkdir $GOPATH
$ cd buildbot

Install dependencies

Almost all applications are built with Bazel, and bazelisk is the recommended tool to ensure you have the right version of bazel installed:

go install github.com/bazelbuild/bazelisk@latest
go install github.com/bazelbuild/buildtools/buildifier@latest
go install github.com/kisielk/errcheck@latest
go install golang.org/x/tools/cmd/goimports@latest
go install github.com/mikefarah/yq/v4@latest
go install go.chromium.org/luci/client/cmd/...@latest

Install other dependencies:

sudo apt-get install jq

Build ~everything

bazelisk build --config=mayberemote //...

Test everything

bazelisk test --config=mayberemote //...

Generated Code

To update generated code run the following in any directory:

go generate ./...

Running unit tests

Install Cloud SDK.

Use this command to run the presubmit tests:

./run_unittests --small