question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Ivy] rewrite directives in Ivy after stable release

See original GitHub issue

Design Discussion

As mentioned in https://github.com/angular/flex-layout/issues/1002#issuecomment-455967676, when Ivy is stable, we can use this issue to track rewriting the library with Ivy-specific features.

Original Report # Bug Report

Unable to enable Ivy to project.

What is the expected behavior?

should be able to enable Ivy

What is the current behavior?

Error

What are the steps to reproduce?

create new project with --experimental-ivy

ng new ngx-starter-kit  --prefix=ngx  --experimental-ivy
ng add @angular/material
npm i @angular/flex-layout
ng serve 

Error when dev server started

Compiling @angular/flex-layout/extended - fesm2015
Error: Failed to resolve @Directive.inputs
    at parseFieldArrayValue (/ngx-starter-kit/node_modules/@angular/compiler-cli/src/ngtsc/annotations/src/directive.js:251:19)
    at parseFieldToPropertyMapping (/ngx-starter-kit/node_modules/@angular/compiler-cli/src/ngtsc/annotations/src/directive.js:261:26)
    at extractDirectiveMetadata (/ngx-starter-kit/node_modules/@angular/compiler-cli/src/ngtsc/annotations/src/directive.js:102:30)
    at DirectiveDecoratorHandler.analyze (/ngx-starter-kit/node_modules/@angular/compiler-cli/src/ngtsc/annotations/src/directive.js:43:35)
    at DecorationAnalyzer.analyzeClass (/ngx-starter-kit/node_modules/@angular/compiler-cli/src/ngcc/src/analysis/decoration_analyzer.js:105:30)
    at /ngx-starter-kit/node_modules/@angular/compiler-cli/src/ngcc/src/analysis/decoration_analyzer.js:87:87
    at Array.map (<anonymous>)
    at DecorationAnalyzer.analyzeFile (/ngx-starter-kit/node_modules/@angular/compiler-cli/src/ngcc/src/analysis/decoration_analyzer.js:87:51)
    at /ngx-starter-kit/node_modules/@angular/compiler-cli/src/ngcc/src/analysis/decoration_analyzer.js:76:59
    at Array.map (<anonymous>)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ngx-starter-kit@0.0.0 postinstall: `ivy-ngcc`
npm ERR! Exit status 1

What is the use-case or motivation for changing an existing behavior?

trying to test Ivy 's capability to produce smaller bundles

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular CLI: 7.3.0-beta.0
Node: 11.6.0
OS: darwin x64
Angular: 8.0.0-beta.0
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router, service-worker

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.13.0-beta.0
@angular-devkit/build-angular      0.13.0-beta.0
@angular-devkit/build-ng-packagr   0.13.0-beta.0
@angular-devkit/build-optimizer    0.13.0-beta.0
@angular-devkit/build-webpack      0.13.0-beta.0
@angular-devkit/core               7.2.2
@angular-devkit/schematics         7.2.2
@angular/cdk                       7.2.1
@angular/cli                       7.3.0-beta.0
@angular/flex-layout               7.0.0-beta.23
@angular/material                  7.2.1
@angular/pwa                       0.12.2
@ngtools/json-schema               1.1.0
@ngtools/webpack                   7.3.0-beta.0
@schematics/angular                7.2.2
@schematics/update                 0.13.0-beta.0
ng-packagr                         4.6.0
rxjs                               6.3.3
typescript                         3.1.6
webpack                            4.28.4

Is there anything else we should know?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:16
  • Comments:13 (4 by maintainers)

github_iconTop GitHub Comments

8reactions
CaerusKarucommented, Jan 21, 2019

I don’t think it’s unreasonable to say that the onus here is on the Ivy compiler, since it is meant to be backwards-compatible. That is: there’s nothing we can do to fix this issue, it has to be fixed on angular/angular (which they are actively working to do).

That being said, I’m going to keep this issue open so that when Ivy is stable, we can use this to track rewriting the library with Ivy.

7reactions
wynfredcommented, Jan 6, 2020

@benneq See https://github.com/angular/angular/issues/30114. I’m also waiting for flex-layout to be fixed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using Ivy in multiple projects environment - Apache Ant
This tutorial will guide you through the use of Ivy in a more complex ... between each other, each depending on the latest...
Read more >
Angular Ivy
Ivy is the code name for Angular's next-generation compilation and rendering pipeline. With the version 9 release of Angular, the new compiler and...
Read more >
Ivy engine in Angular: first in-depth look at compilation ...
The current rendering engine is being rewritten with the new much enhanced version called Ivy. The current status of Ivy can be tracked...
Read more >
A look at major features in the Angular Ivy version 9 release
Libraries can be AOT-compiled directly to Ivy instructions and metadata, but this is not recommended. The Angular team has a View ...
Read more >
All About Angular Engine Ivy in 5 mins
But unlike rewrites two and three, Ivy promises huge improvements to your application. With Ivy, you can compile components more independently ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found