angular-cn/packages/compiler-cli/integrationtest
Alex Rickabaugh 1eafd04eb3 build(ivy): support alternate compilation modes to enable Ivy testing (#24056)
Bazel has a restriction that a single output (eg. a compiled version of
//packages/common) can only be produced by a single rule. This precludes
the Angular repo from having multiple rules that build the same code. And
the complexity of having a single rule produce multiple outputs (eg. an
ngc-compiled version of //packages/common and an Ivy-enabled version) is
too high.

Additionally, the Angular repo has lots of existing tests which could be
executed as-is under Ivy. Such testing is very valuable, and it would be
nice to share not only the code, but the dependency graph / build config
as well.

Thus, this change introduces a --define flag 'compile' with three potential
values. When --define=compile=X is set, the entire build system runs in a
particular mode - the behavior of all existing targets is controlled by
the flag. This allows us to reuse our entire build structure for testing
in a variety of different manners. The flag has three possible settings:

* legacy (the default): the traditional View Engine (ngc) build
* local: runs the prototype ngtsc compiler, which does not rely on global
  analysis
* jit: runs ngtsc in a mode which executes tsickle, but excludes the
  Angular related transforms, which approximates the behavior of plain
  tsc. This allows the main packages such as common to be tested with
  the JIT compiler.

Additionally, the ivy_ng_module() rule still exists and runs ngc in a mode
where Ivy-compiled output is produced from global analysis information, as
a stopgap while ngtsc is being developed.

PR Close #24056
2018-05-29 18:02:29 -04:00
..
bazel build(ivy): support alternate compilation modes to enable Ivy testing (#24056) 2018-05-29 18:02:29 -04:00
benchmarks refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
flat_module fix(compiler): look for flat module resources using declaration module path (#15367) 2017-03-21 19:05:03 -05:00
ngtools_src fix(compiler-cli): find lazy routes in nested module import arrays 2017-06-20 14:21:14 -07:00
src feat(core): upgrade rxjs to 6.0.0-alpha.4 (#22573) 2018-03-19 21:51:51 -07:00
test refactor(compiler): remove old ngtools api and add listLazyRoutes to new api (#19836) 2017-10-23 18:46:04 -04:00
third_party_src feat(compiler-cli): new compiler api and command-line using TypeScript transformers 2017-06-23 16:18:44 -07:00
tsconfig-build.json refactor(compiler): remove old ngtools api and add listLazyRoutes to new api (#19836) 2017-10-23 18:46:04 -04:00
tsconfig-ngc-build.json feat(compiler-cli): new compiler api and command-line using TypeScript transformers 2017-06-23 16:18:44 -07:00
tsconfig-xi18n.json refactor(compiler): remove old ngtools api and add listLazyRoutes to new api (#19836) 2017-10-23 18:46:04 -04:00
webpack.config.js fix(compiler): make sourcemaps work in AOT mode 2017-03-16 12:56:56 -07:00