Skip to content

Check errors script doesn't fail when playground unable to build #241

@oschlegel

Description

@oschlegel

Versions

"angular-playground": "^6.2.0"
     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 8.3.23
Node: 12.14.0
OS: darwin x64
Angular: 8.2.9
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router, service-worker

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.803.23
@angular-devkit/build-angular      0.803.23
@angular-devkit/build-ng-packagr   0.803.23
@angular-devkit/build-optimizer    0.803.23
@angular-devkit/build-webpack      0.803.23
@angular-devkit/core               7.1.4
@angular-devkit/schematics         7.1.4
@angular/cdk                       8.2.2
@angular/cli                       8.3.23
@angular/http                      7.2.15
@angular/material                  8.2.2
@angular/pwa                       0.11.4
@ngtools/json-schema               1.1.0
@ngtools/webpack                   8.3.23
@schematics/angular                7.1.4
@schematics/update                 0.803.23
ng-packagr                         4.7.1
rxjs                               6.5.3
typescript                         3.5.3
webpack                            4.39.2

Repro steps

  • Write some error which causes the playground build to fail
  • Start playground with angular-playground --config ./location/to/angular-playground,json --check-errors --random-scenario

Observed Behavior

Starting playground with option --check-errors. Build starts and fails due to some mistake in script. Checks still run and don't exit with error

+ npm run portal:playground -- --check-errors --random-scenario

> angular-playground --config ./apps/portal-playground/src/angular-playground.json "--check-errors" "--random-scenario"

Successfully compiled sandbox files.
Retrieved 56 scenarios.

Checking [1/56]: ./app/home/components/production-finished/production-finished.component.sandbox: Default
[ng serve]: ℹ 「wds」: Project is running at http://127.0.0.1:36341/webpack-dev-server/
[ng serve]: 
ℹ 「wds」: webpack output is served from /

[ng serve]: ℹ 「wds」: 404s will fallback to //index.html

[ng serve]: ℹ 「wdm」: wait until bundle finished: /?scenario=.%2Fapp%2Fhome%2Fcomponents%2Fproduction-finished%2Fproduction-finished.component.sandbox/Default
[ng serve]: 

[ng serve]: 
chunk {main} main.js, main.js.map (main) 2.63 kB [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 173 kB [initial] [rendered]
chunk {polyfills-es5} polyfills-es5.js, polyfills-es5.js.map (polyfills-es5) 607 kB [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 6.15 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 957 kB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 348 kB [initial] [rendered]
Date: 2020-02-27T07:29:37.317Z - Hash: e5076840ab3dc12800d5 - Time: 15207ms
[ng serve]: 

[ng serve]: 
ERROR in src/main.ts:28:28 - error TS1005: ',' expected.

28     UrlGeneratorModule.for Mock(),
                              ~~~~

[ng serve]: 

[ng serve]: ** Angular Live Development Server is listening on 127.0.0.1:36341, open your browser on http://127.0.0.1:36341/ **
[ng serve]: 

[ng serve]: ℹ 「wdm」: Failed to compile.
[ng serve]: 

Error in ./app/home/components/production-finished/production-finished.component.sandbox (Default):
Checking [2/56]: ./app/home/components/production-overview/production-overview.component.sandbox: Orders loading
Error in ./app/home/components/production-overview/production-overview.component.sandbox (Orders loading):
Checking [3/56]: ./app/home/components/production-step-counter/production-step-counter.component.sandbox: total: 6,  current: 3, choosen: 5
Error in ./app/home/components/production-step-counter/production-step-counter.component.sandbox (total: 6,  current: 3, choosen: 5):
...
Checking [56/56]: ./ui-kit-angular/src/lib/tooltip/tooltip/tooltip.directive.sandbox: Tooltip lower-right edge
Error in ./ui-kit-angular/src/lib/tooltip/tooltip/tooltip.directive.sandbox (Tooltip lower-right edge):

Desired Behavior

Script should stop when build could not be completed and exit with error code 1.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions