You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 16, 2021. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 16, 2021. It is now read-only.
Need named AMD/UMD ngsummary.js files for Angular packages for ts_web_test_suite #192
to the postinstall tsconfig... but the generated files are not named AMD/UMD.
These files are needed when a component under test in a karma test (ts_web_test_suite) uses a component or directive from an Angular package. For example, if a component uses ngModel, its ngsummary.js file will import @angular/forms/forms.ngsummary.js and that file is needed by ts_web_test for the test to run.
Running yarn && bazel test ... will generate the following error:
HeadlessChrome 66.0.3359 (Mac OS X 10.13.4) ERROR: 'There is no timestamp for /base/angular_bazel_example/node_modules/@angular/forms/forms.ngsummary.js!'
27 04 2018 17:47:18.498:WARN [web-server]: 404: /base/angular_bazel_example/node_modules/@angular/forms/forms.ngsummary.js
HeadlessChrome 66.0.3359 (Mac OS X 10.13.4) ERROR
Script error.
at :0:0
If you uncomment the following in /angular.tsconfig.js:
// Uncomment to generate xxx.ngsummary.js files in Angular packages
// "angularCompilerOptions": {
// "enableSummariesForJit": true
// },
and the following in /BUILD.bazel:
# Uncomment to include forms ngsummary file in ts_web_test
# "node_modules/@angular/forms/forms.ngsummary.js",
and run yarn postinstall && bazel test ... the non-named-AMD/UMD generated file will be included in ts_web_test and the test will still FAIL.
If you then manually change @angular/forms/forms.ngsummary.js to be a named-AMD/UMD module then the test will finally PASS.
I committed /forms.ngsummary.js in the repro branch, which is what a named-AMD/UMD @angular/forms/forms.ngsummary.js should look like. Uncomment the above mentioned lines and manually copy the contents of /forms.ngsummary.js to /node_modules/@angular/forms/forms.ngsummary.js and the test will PASS.
changed the title [-]Need named AMD/UMD ngsummary.js files for Angular packages for ts_web_test[/-][+]Need named AMD/UMD ngsummary.js files for Angular packages for ts_web_test_suite[/+]on May 31, 2018
Activity
gregmagolan commentedon Apr 27, 2018
/cc @alexeagle
gregmagolan commentedon Apr 27, 2018
I committed
/forms.ngsummary.jsin the repro branch, which is what a named-AMD/UMD@angular/forms/forms.ngsummary.jsshould look like. Uncomment the above mentioned lines and manually copy the contents of/forms.ngsummary.jsto/node_modules/@angular/forms/forms.ngsummary.jsand the test will PASS.gregmagolan commentedon Apr 27, 2018
Note. I experimented with setting the
packageformat toUMDin the postinstall tsconfig but that broke the postinstall compile.[-]Need named AMD/UMD ngsummary.js files for Angular packages for ts_web_test[/-][+]Need named AMD/UMD ngsummary.js files for Angular packages for ts_web_test_suite[/+]gregmagolan commentedon Jun 26, 2018
This issue is resolved if angular is built from source as shown here: angular/angular-bazel-example#160
ngModel from
@angular/formsis used within HelloWorldComponent and it works in a karma testgregmagolan commentedon Aug 10, 2018
Latest angular can now be build with bazel with angular being built from source. angular/angular-bazel-example#160 was merged in and https://github.com/alexeagle/angular-bazel-example is now building Angular 6.1.2.
This is still an issue with using the mixed mode ngc/bazel with 3rd party libraries but that should be tracked with separate issues.