Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

feat: switch to IVy#406

Closed
CaerusKaru wants to merge 1 commit intoangular:masterfrom
CaerusKaru:wassim/ivy
Closed

feat: switch to IVy#406
CaerusKaru wants to merge 1 commit intoangular:masterfrom
CaerusKaru:wassim/ivy

Conversation

@CaerusKaru
Copy link
Member

No description provided.

@alexeagle
Copy link
Contributor

@CaerusKaru need some help to get this green?

@CaerusKaru
Copy link
Member Author

@alexeagle I think so. The errors we’re getting here are not surfacing in angular/angular, which also uses compileComponents. @gregmagolan was helping me out briefly last week, I could check in with him again.

@alexeagle alexeagle mentioned this pull request May 24, 2019
@alexeagle
Copy link
Contributor

I rebased on master and pushed again. Now that we have managed_directories you can add println debug statements in node_modules which is nice. I confirmed that we are producing Ivy output in the .js files but don't know yet why the test thinks the component isn't compiled.

@CaerusKaru
Copy link
Member Author

To the untrained eye (me), it looks like the generated output just doesn't have the HTML files where they need to be. I don't think the angular/angular uses dedicated HTML files, so there are no 404s there.

@gregmagolan
Copy link
Contributor

gregmagolan commented Jul 2, 2019

I rebased this branch to the head now that angular-bazel-example is updated to rules_nodejs 0.32.2 and am starting to look at this.

//e2e:prodserver_test_chromium-local passes and I've opened up the prod app in a browser and everything works.

//e2e:devserver_test_chromium-local stills fails as well as all the ts_web_test_suite tests.

The devserver issue is a runtime issue in the browser:

Uncaught Error: Can't resolve all parameters for Location: (?, ?).
    at injectableDefOrInjectorDefFactory (ts_scripts.js:42173)
    at providerToFactory (ts_scripts.js:42198)
    at providerToRecord (ts_scripts.js:42182)
    at R3Injector.processProvider (ts_scripts.js:42106)
    at ts_scripts.js:42095
    at ts_scripts.js:42241
    at Array.forEach (<anonymous>)
    at deepForEach (ts_scripts.js:42241)
    at ts_scripts.js:42241
    at Array.forEach (<anonymous>)

Will be debugging today. The good news is that prod works which means that the issue is something with devmode and not something with Ivy & Bazel itself.

@gregmagolan
Copy link
Contributor

Made some progress. Looks like we're blocked by an issue with ivy-ngcc transforming umd bundles: angular/angular#31394

@gregmagolan
Copy link
Contributor

I haven't opened up a new PR but the original issue observed was caused because we weren't using the ivy @angular bundles. To do that package.json needed to be updated to use angular/foo-builds#master-ivy-aot for angular npm packages:

    "dependencies": {
        "@angular/animations": "angular/animations-builds#master-ivy-aot",
        "@angular/cdk": "8.0.2",
        "@angular/common": "angular/common-builds#master-ivy-aot",
        "@angular/core": "angular/core-builds#master-ivy-aot",
        "@angular/forms": "angular/forms-builds#master-ivy-aot",
        "@angular/material": "8.0.2",
        "@angular/platform-browser": "angular/platform-browser-builds#master-ivy-aot",
        "@angular/platform-browser-dynamic": "angular/platform-browser-dynamic-builds#master-ivy-aot",
        "@angular/router": "angular/router-builds#master-ivy-aot",
        "@ngrx/store": "8.0.1",
        "date-fns": "1.30.1",
        "rxjs": "6.5.2",
        "systemjs": "0.21.6",
        "tslib": "1.10.0",
        "zone.js": "0.9.1"
    },
    "devDependencies": {
        "@angular/bazel": "angular/bazel-builds#8.1.0-rc.0+a4a423a08",
        "@angular/cli": "8.1.0",
        "@angular/compiler": "angular/compiler-builds#master-ivy-aot",
        "@angular/compiler-cli": "angular/compiler-cli-builds#master-ivy-aot",

I have a branch on my fork with this: https://github.com/gregmagolan/angular-bazel-example/tree/wassim/ivy

@gregmagolan gregmagolan mentioned this pull request Aug 15, 2019
@gregmagolan
Copy link
Contributor

Replaced by #505. Check there for updates.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants