Skip to content

tsc ignoring file change & hanging build when watching #204

Closed
@billheaton-q2

Description

@billheaton-q2

tsc is ignoring a .ts file change, and because of that, ember-cli is hanging the build.

  • typescript v2.8.3
  • ember-cli-typescript v1.3.0"
  • node.js v8.11.1
  • ember-cli v3.2.1
⚡ ember build -w

Build successful (19446ms)

Slowest Nodes (totalTime => 5% )              | Total (avg)         
----------------------------------------------+---------------------
Babel (47)                                    | 8687ms (184 ms)     
EslintValidationFilter (7)                    | 3716ms (530 ms)     
Concat (13)                                   | 2497ms (192 ms)     

file changed controllers/login.ts
file changed controllers/login.ts

Could not reproduce using the dummy app in ember-cli-typescript.
I tried using the default install of the tsconfig.json proivided by ember-cli-typescript.
I also tried adding ember-decorators to the dummy app as our app uses decorators.

Not sure what the issue is with our app setup. We use in-repro addons, and a bunch of dependencies. The apps have mostly .js still as we are moving toward more TS use. Changes to .js files work fine.

Using DEBUG=\* ember b -w ....

  ember-cli-typescript:tsc:trace DirectoryWatcher:: Triggered with /pathtoapp/app/controllers/login.ts:: WatchInfo: /pathtoapp 1 +55s
  ember-cli-typescript:tsc:trace Elapsed:: 102ms DirectoryWatcher:: Triggered with /pathtoapp/app/controllers/login.ts:: WatchInfo: /pathtoapp 1 +102ms
  ember-cli-typescript:compiler-state tscDidStart | broccoli: 0 active nodes | tsc: building (0 errors) +33s
  ember-cli-typescript:tsc:trace DirectoryWatcher:: Triggered with /pathtoapp/app/controllers/login.ts:: WatchInfo: /pathtoapp 1 +2ms
  ember-cli-typescript:tsc:trace Elapsed:: 57ms DirectoryWatcher:: Triggered with /pathtoapp/app/controllers/login.ts:: WatchInfo: /pathtoapp 1 +57ms
  ember-cli-typescript:compiler-state tscDidStart | broccoli: 0 active nodes | tsc: building (0 errors) +59ms
file changed controllers/login.ts
  broccoli-sane-watcher scheduleBuild: /pathtoapp/app/controllers/login.ts +30s
file changed controllers/login.ts
  broccoli-sane-watcher debounce scheduleBuild: /pathtoapp/app/controllers/login.ts +1ms
  broccoli-sane-watcher build: /pathtoapp/app/controllers/login.ts +100ms
  broccoli-sane-watcher { type: 'rebuild', reason: 'watcher', primaryFile: '/pathtoapp/app/controllers/login.ts', changedFiles: [ '/pathtoapp/app/controllers/login.ts', '/pathtoapp/app/controllers/login.ts' ] } +0ms
 ...

  async-promise-queue: started, with concurrency=1 +0ms
  broccoli-persistent-filter:Babel > [Babel: ember-cli-app-version] [TreeMerger (addon)#4153 -> broccoli-persistent-filter:Babel > [Babel: ember-cli-app-version]: Babel: ember-cli-app-version#4213 -> applyPatches#4220] applyPatches duration: 0.13 ms {"mkdir":0,"rmdir":0,"unlink":0,"change":0,"create":0,"other":0,"processed":0,"linked":0,"processString":0,"processStringTime":0,"persistentCacheHit":0,"persistentCachePrime":0} +0ms
  ember-cli-typescript:compiler-state broccoliDidStart | broccoli: 1 active nodes | tsc: building (0 errors) +172ms

The work around for us is to use : ember install [email protected]

I'll try to post a repo once I can make one without sharing our entire app(s)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugbuildIdeas for or bugs with the build process

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions