angular-cn/third_party
Greg Magolan 7193e151d7 build: update to @bazel/bazel 1.0.0 (#33476)
Also removes `build:remote --spawn_strategy=remote` from .bazelrc. It seems that with Bazel 1.0.0 setting `--incompatible_list_based_execution_strategy_selection=false` no longer works around the issue with npm_package that it did when it was added. The error that was originally observed has returned after updating to Bazel 1.0.0:

```
ERROR: /home/circleci/ng/packages/angular_devkit/build_optimizer/BUILD:66:1: Assembling npm package packages/angular_devkit/build_optimizer/npm_package failed: No usable spawn strategy found for spawn with mnemonic Action. Your --spawn_strategy, --genrule_strategy or --strategy flags are probably too strict. Visit https://github.com/bazelbuild/bazel/issues/7480 for migration advice
```

This commit removes both `—incompatible_list_based_execution_strategy_selection=false` as well as `build:remote --spawn_strategy=remote` which means that Bazel will do the default behavior of picking the first available strategy from the default list, which is `remote,worker,sandboxed,local`. See https://github.com/bazelbuild/bazel/issues/7480 for more details.

Not updating to Bazel 1.1.0 yet due to a docker permissions CI issue that was observed on the angular repo that is unresolved. See https://github.com/angular/angular/pull/33367#issuecomment-547643246.

PR Close #33476
2019-10-29 16:22:41 -07:00
..
fonts.google.com/open-sans build: fix routing playground example using external resource (#28490) 2019-02-04 16:51:11 -05:00
github.com build: update to @bazel/bazel 1.0.0 (#33476) 2019-10-29 16:22:41 -07:00
README.md docs: add a README for third_party usage (#28651) 2019-02-12 09:54:43 -08:00

README.md

third_party vendored sources in Angular

TL;DR: don't copy sources into this repo

All sources in this repo should be authored from scratch by the committer. Don't copy sources you've found in any other location.

What if I have a good reason?

We do "vendor in" some sources, in cases where we do not want our users to have a transitive dependency. For example, to make testing more reliable, we copy a font into our repo. That allows our integration tests to run without dynamically requesting that font.

Follow these guidelines for adding sources under third_party:

  1. Only vendor sources with compatible licenses. Apache 2.0 and MIT are good. Any other licenses, check with your team lead so we can verify our ability to comply with the license.
  2. Preserve the license for code. The best thing to do is copy the entire LICENSE file along with the sources.
  3. Indicate where the sources came from. Our convention is to create a directory based on the URL where the sources were fetched. Add version number or if missing, the retrieval date, as a comment in the build file just above the license() call. Example: https://github.com/angular/angular/blob/master/third_party/fonts.google.com/open-sans/BUILD.bazel
  4. Avoid changing the files you fetched. If you make any changes to the sources, first commit the original, then in a separate commit, make your edits. include another metadata file listing your changes, like https://github.com/bazelbuild/rules_nodejs/blob/master/third_party/github.com/source-map-support/LOCAL_MODS.md
  5. Any bundle or distribution which includes this code needs to propagate the LICENSE file or content. Talk to your TL to make sure this is done correctly.

Under Bazel

This directory is treated specially by Bazel.

All BUILD.bazel files under third_party are required to have a licenses statement. See https://docs.bazel.build/versions/master/be/functions.html#licenses

Note that we don't yet have a way to enumerate the licenses and include them in our distribution. Follow https://github.com/bazelbuild/bazel/issues/188