angular-cn/packages/compiler-cli/test/compliance
Paul Gschwendtner aca339e864 fix(ivy): unable to project into multiple slots with default selector (#30561)
With View engine it was possible to declare multiple projection
definitions and to programmatically project nodes into the slots.

e.g.

```html
<ng-content></ng-content>
<ng-content></ng-content>
```

Using `ViewContainerRef#createComponent` allowed projecting
nodes into one of the projection defs (through index)

This no longer works with Ivy as the `projectionDef` instruction only
retrieves a list of selectors instead of also retrieving entries for
reserved projection slots which appear when using the default
selector multiple times (as seen above).

In order to fix this issue, the Ivy compiler now passes all
projection slots to the `projectionDef` instruction. Meaning that
there can be multiple projection slots with the same wildcard
selector. This allows multi-slot projection as seen in the
example above, and it also allows us to match the multi-slot node
projection order from View Engine (to avoid breaking changes).

It basically ensures that Ivy fully matches the View Engine behavior
except of a very small edge case that has already been discussed
in FW-886 (with the conclusion of working as intended).

Read more here: https://hackmd.io/s/Sy2kQlgTE

PR Close #30561
2019-05-31 09:52:32 -07:00
..
BUILD.bazel build(bazel): back out of @bazel/jasmine 0.27.7 with shard count (#29444) 2019-03-21 09:59:13 -07:00
README.md build: use bazel version from node modules (#26691) 2018-10-30 16:19:13 -04:00
mock_compile.ts test(compiler-cli): compliance tests not always reporting test failure (#30597) 2019-05-22 16:22:52 -07:00
mock_compiler_spec.ts test(compiler-cli): compliance tests not always reporting test failure (#30597) 2019-05-22 16:22:52 -07:00
r3_compiler_compliance_spec.ts fix(ivy): unable to project into multiple slots with default selector (#30561) 2019-05-31 09:52:32 -07:00
r3_view_compiler_binding_spec.ts feat(ivy): add ɵɵtextInterpolateX instructions (#30011) 2019-05-29 12:38:58 -04:00
r3_view_compiler_di_spec.ts refactor(ivy): Move instructions back to ɵɵ (#30546) 2019-05-20 16:37:47 -07:00
r3_view_compiler_directives_spec.ts refactor(ivy): Move instructions back to ɵɵ (#30546) 2019-05-20 16:37:47 -07:00
r3_view_compiler_i18n_spec.ts feat(ivy): add `AttributeMarker.I18n` for i18n attributes (#30402) 2019-05-30 16:39:24 -04:00
r3_view_compiler_input_outputs_spec.ts refactor(ivy): Move instructions back to ɵɵ (#30546) 2019-05-20 16:37:47 -07:00
r3_view_compiler_listener_spec.ts refactor(ivy): Move instructions back to ɵɵ (#30546) 2019-05-20 16:37:47 -07:00
r3_view_compiler_providers_spec.ts test(compiler-cli): compliance tests not always reporting test failure (#30597) 2019-05-22 16:22:52 -07:00
r3_view_compiler_spec.ts feat(ivy): add ɵɵtextInterpolateX instructions (#30011) 2019-05-29 12:38:58 -04:00
r3_view_compiler_styling_spec.ts refactor(ivy): enable sanitization support for the new styling algorithm (#30667) 2019-05-30 01:03:39 -04:00
r3_view_compiler_template_spec.ts feat(ivy): add ɵɵtextInterpolateX instructions (#30011) 2019-05-29 12:38:58 -04:00

README.md

Tests in this directory should be run with:

yarn bazel test --define=compile=aot  packages/compiler-cli/test/compliance:compliance