Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silent (!) build failure when several source filepaths cannot be found #2560

Closed
vlukashov opened this issue Dec 8, 2017 · 1 comment
Closed

Comments

@vlukashov
Copy link
Contributor

Description

When running polymer build in a project with a source file that imports several non-existing other source files, the build completes without errors but does not produce any output.

source file:

<link rel="import" href="../../bower_components/polymer/polymer-element.html">
<link rel="import" href="non-existent-file-1.html">
<link rel="import" href="non-existent-file-2.html">

output:

$ npm run build

> minimal@1.0.0 build /path/to/minimal-demo-case
> polymer build

info:    Clearing build/ directory...
$ ls -la bulid
total 8
drwxr-xr-x   3 viktor  staff   96 Dec  8 10:40 .
drwxr-xr-x  13 viktor  staff  416 Dec  8 10:40 ..
-rw-r--r--   1 viktor  staff  666 Dec  8 10:40 polymer.json
$

Versions & Environment

  • Polymer CLI: 1.5.7
  • node: 8.9.0
  • Operating System: OS X 10.13.1

Steps to Reproduce

  1. extract the attached project archive: minimal-demo-case.zip
  2. install all project dependencies: run yarn install (or npm install)
  3. run polymer build: yarn build (or npm run build)
  4. verify that the build fails because the file non-existent-file-1.html does not exist
  5. add a second include for a non-existent file to src/app/minimal-app.html: uncomment the <link rel="import" href="non-existent-file-2.html"> line
  6. run polymer build: yarn build (or npm run build)
  7. see that the build passes without errors, but the output folder (build/) is empty

Expected Results

The build should fail. There should be 2 errors in the console - 2 files are missing.

Actual Results

The build does not report any errors (as if it passed OK). The build output directory does not contain the build output.

@jsilvermist
Copy link
Contributor

Seems like the same issue I observed in #904 but slightly more widespread than I had realized, I didn't realize normal imports would cause the same issue, not just lazy ones.

justinfagnani referenced this issue in Polymer/polymer-build Dec 19, 2017
…found (#276)

* add a (failing) test case for https://github.com/Polymer/polymer-cli/issues/936

* ensure the build fails when more than one source file is missing

The 'analyze' phase of the build process completes when all source files are analyzed (scanned). A source file is analized when all its dependencies are resolved or rejected. When the sources stream is complete, _all_ pending source file promises need to be rejected--not only the first one. If some of the deferred dependencies remain pending, the analysis of the toplevel source file never continues after 'await this._cache.dependencyGraph.whenReady(resolvedUrl);'. That leads of a premature end of the analysis phase (without any errors).

* update CHANGELOG

* add test for lazy-import with broken path (#1)

add a test case to verify that this PR also fixes the issue https://github.com/Polymer/polymer-cli/issues/904
@aomarks aomarks transferred this issue from Polymer/polymer-cli Jan 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants