Skip to content
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.

Pitching loaders and more complete loader support #15

Merged
merged 20 commits into from
Apr 9, 2016
Merged

Conversation

amireh
Copy link
Owner

@amireh amireh commented Mar 12, 2016

This patch brings support for the following loader APIs and context variables:

Variables

  • this.request
  • this.context
  • this.resourceQuery
  • this.loaderIndex
  • this.values injects into this.inputValues for succeeding loaders

Loader APIs

  • this.resolve (the asynchronous version) for resolving modules
  • this.emitWarning
  • this.emitError
  • this.addDependency
  • this.addContextDependency
  • this.clearDependencies

Pitching

  • module.exports.pitch application
  • this.data gets passed from the pitch phase to the normal phase
  • remainingRequest and precedingRequest inputs to the pitch loaders
  • re-read the source file after the pitch phase, because pitching loaders can modify the resourcePath and other contextual attributes

@amireh amireh mentioned this pull request Mar 12, 2016
@amireh amireh changed the title WIP pitch loader and more complete loader support Pitching loaders and more complete loader support Mar 28, 2016
@amireh
Copy link
Owner Author

amireh commented Mar 28, 2016

@trueter can you test this out against your SASS codebase? I've made a small example under examples/sass-loader and it seems to work. I also tried your own set-up with the following loader string and it compiled successfully:

var path = require('path');
var HappyPack = require('../../');

module.exports = {
  entry: path.resolve(__dirname, 'lib/index.scss'),

  output: {
    path: path.resolve(__dirname, 'dist'),
    filename: '[name].js'
  },

  plugins: [
    new HappyPack({
      loaders: [ 'style!css?modules&importLoaders=2&sourceMap&localIdentName=[local]___[hash:base64:5]!autoprefixer?browsers=last 2 version!sass?outputStyle=expanded&sourceMap&' ],
      cache: false,
      threads: 2
    })
  ],

  module: {
    loaders: [
      {
        test: /\.scss$/,
        loader: path.resolve(__dirname, '../../loader')
      }
    ]
  }
};

@amireh
Copy link
Owner Author

amireh commented Mar 28, 2016

Also, pinging @XVincentX and @texttechne to test if possible. I have not tried the ExtractTextPlugin yet, but the style!css!sass combo should hopefully be functional with this.

Thanks.

@XVincentX
Copy link
Contributor

I'll be happy to try out this and let you know the results. Stay tuned.

@Strate
Copy link

Strate commented Mar 30, 2016

I have tried this branch with tslint-loader, which registered as preLoader. It fails with:

/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyRPCHandler.js:60
  assert(activeLoaders.hasOwnProperty(id),
  ^
AssertionError: A loader RPC was dispatched to HappyLoader[1] but no such loader is active!
    at assertLoaderIsActive (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyRPCHandler.js:60:3)
    at Object.HappyRPCHandler.execute (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyRPCHandler.js:28:5)
    at ChildProcess.acceptMessageFromWorker (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyThread.js:54:27)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at handleMessage (internal/child_process.js:695:10)
    at Pipe.channel.onread (internal/child_process.js:440:11)

@amireh
Copy link
Owner Author

amireh commented Mar 30, 2016

@Strate can you share your webpack config?

I'm not sure about preLoaders/postLoaders, I know there isn't any code to explicitly support them 😱 webpack loaders are crazy...

@Strate
Copy link

Strate commented Mar 30, 2016

@amireh you know, same thing happens even if I put tslint-loader as a normal loader. I'll prepare example repo bit later.

@codecov-io
Copy link

Current coverage is 81.37%

Branch #15 has no coverage reports uploaded yet.

No diff could be generated. No reports for master found.
Review entire Coverage Diff as of 45e76bb

Powered by Codecov. Updated on successful CI builds.

@amireh
Copy link
Owner Author

amireh commented Mar 30, 2016

@Strate i did get tslint-loader to work both as a normal and a pre/post loader. Also tried out some options like emitErrors: true and it seems to be OK. See the example in b3086ec under /examples/tslint-loader for what I used.

However, ts-loader doesn't work since it actually hacks into webpack's compiler.

@Strate
Copy link

Strate commented Mar 31, 2016

@amireh Tried fresh vesrion of this branch, git same error. I'll dig into that.

@XVincentX
Copy link
Contributor

Unfortunately I have not been able to look into. I promise I will.

@Strate
Copy link

Strate commented Mar 31, 2016

While I can not provide you example repo, I produced some debugging by add console.trace calls to registerActiveLoader and unregisterActiveLoader, and this is output:

Trace: HappyRPCHandler.registerActiveLoader tslint
    at Object.HappyRPCHandler.registerActiveLoader (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyRPCHandler.js:12:11)
    at Object.HappyLoader (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyLoader.js:20:19)
    at WEBPACK_CORE_LOADER_EXECUTION (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:155:71)
    at runSyncOrAsync (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:155:93)
    at nextLoader (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:290:3)
    at /devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:259:5
    at Storage.finished (/devel/src/hotfix/megaplan/front/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:38:16)
    at /devel/src/hotfix/megaplan/front/node_modules/graceful-fs/graceful-fs.js:78:16
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:380:3)
Trace: HappyRPCHandler.registerActiveLoader tslint
    at Object.HappyRPCHandler.registerActiveLoader (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyRPCHandler.js:12:11)
    at Object.HappyLoader (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyLoader.js:20:19)
    at WEBPACK_CORE_LOADER_EXECUTION (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:155:71)
    at runSyncOrAsync (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:155:93)
    at nextLoader (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:290:3)
    at /devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:259:5
    at Storage.finished (/devel/src/hotfix/megaplan/front/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:38:16)
    at /devel/src/hotfix/megaplan/front/node_modules/graceful-fs/graceful-fs.js:78:16
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:380:3)
Trace: HappyRPCHandler.unregisterActiveLoader tslint
    at Object.HappyRPCHandler.unregisterActiveLoader (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyRPCHandler.js:17:11)
    at /devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyLoader.js:33:21
    at EventEmitter.<anonymous> (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyPlugin.js:249:7)
    at emitOne (events.js:77:13)
    at EventEmitter.emit (events.js:169:7)
    at ChildProcess.acceptMessageFromWorker (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyThread.js:49:21)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at handleMessage (internal/child_process.js:695:10)
    at Pipe.channel.onread (internal/child_process.js:440:11)
Trace: HappyRPCHandler.unregisterActiveLoader tslint
    at Object.HappyRPCHandler.unregisterActiveLoader (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyRPCHandler.js:17:11)
    at /devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyLoader.js:33:21
    at EventEmitter.<anonymous> (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyPlugin.js:249:7)
    at emitOne (events.js:77:13)
    at EventEmitter.emit (events.js:169:7)
    at ChildProcess.acceptMessageFromWorker (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyThread.js:49:21)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at handleMessage (internal/child_process.js:695:10)
    at Pipe.channel.onread (internal/child_process.js:440:11)
Trace: HappyRPCHandler.registerActiveLoader tslint
    at Object.HappyRPCHandler.registerActiveLoader (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyRPCHandler.js:12:11)
    at Object.HappyLoader (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyLoader.js:20:19)
    at WEBPACK_CORE_LOADER_EXECUTION (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:155:71)
    at runSyncOrAsync (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:155:93)
    at nextLoader (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:290:3)
    at /devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:259:5
    at Storage.provide (/devel/src/hotfix/megaplan/front/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:52:20)
    at CachedInputFileSystem.readFile (/devel/src/hotfix/megaplan/front/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:140:24)
    at DependenciesBlock.onLoadPitchDone (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:255:7)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:182:27)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:186:21)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:223:61)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:186:21)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:223:61)
    at DependenciesBlock.doBuild (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:241:4)
    at DependenciesBlock.build (/devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModule.js:84:14)
    at Compilation.buildModule (/devel/src/hotfix/megaplan/front/node_modules/webpack/lib/Compilation.js:126:9)
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/lib/Compilation.js:309:10
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModuleFactory.js:58:13
    at NormalModuleFactory.applyPluginsAsyncWaterfall (/devel/src/hotfix/megaplan/front/node_modules/tapable/lib/Tapable.js:75:69)
    at onDoneResolving (/devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModuleFactory.js:38:11)
    at onDoneResolving (/devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModuleFactory.js:121:6)
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModuleFactory.js:116:7
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:726:13
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:52:16
    at done (/devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:246:17)
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:44:16
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:723:17
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:167:37
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:52:16
Trace: HappyRPCHandler.registerActiveLoader tslint
    at Object.HappyRPCHandler.registerActiveLoader (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyRPCHandler.js:12:11)
    at Object.HappyLoader (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyLoader.js:20:19)
    at WEBPACK_CORE_LOADER_EXECUTION (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:155:71)
    at runSyncOrAsync (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:155:93)
    at nextLoader (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:290:3)
    at /devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:259:5
    at Storage.provide (/devel/src/hotfix/megaplan/front/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:52:20)
    at CachedInputFileSystem.readFile (/devel/src/hotfix/megaplan/front/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:140:24)
    at DependenciesBlock.onLoadPitchDone (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:255:7)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:182:27)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:186:21)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:223:61)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:186:21)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:223:61)
    at DependenciesBlock.doBuild (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:241:4)
    at DependenciesBlock.build (/devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModule.js:84:14)
    at Compilation.buildModule (/devel/src/hotfix/megaplan/front/node_modules/webpack/lib/Compilation.js:126:9)
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/lib/Compilation.js:309:10
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModuleFactory.js:58:13
    at NormalModuleFactory.applyPluginsAsyncWaterfall (/devel/src/hotfix/megaplan/front/node_modules/tapable/lib/Tapable.js:75:69)
    at onDoneResolving (/devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModuleFactory.js:38:11)
    at onDoneResolving (/devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModuleFactory.js:121:6)
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModuleFactory.js:116:7
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:726:13
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:52:16
    at done (/devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:246:17)
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:44:16
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:723:17
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:167:37
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:52:16
Trace: HappyRPCHandler.registerActiveLoader tslint
    at Object.HappyRPCHandler.registerActiveLoader (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyRPCHandler.js:12:11)
    at Object.HappyLoader (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyLoader.js:20:19)
    at WEBPACK_CORE_LOADER_EXECUTION (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:155:71)
    at runSyncOrAsync (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:155:93)
    at nextLoader (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:290:3)
    at /devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:259:5
    at Storage.provide (/devel/src/hotfix/megaplan/front/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:52:20)
    at CachedInputFileSystem.readFile (/devel/src/hotfix/megaplan/front/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:140:24)
    at DependenciesBlock.onLoadPitchDone (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:255:7)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:182:27)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:186:21)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:223:61)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:186:21)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:223:61)
    at DependenciesBlock.doBuild (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:241:4)
    at DependenciesBlock.build (/devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModule.js:84:14)
    at Compilation.buildModule (/devel/src/hotfix/megaplan/front/node_modules/webpack/lib/Compilation.js:126:9)
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/lib/Compilation.js:309:10
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModuleFactory.js:58:13
    at NormalModuleFactory.applyPluginsAsyncWaterfall (/devel/src/hotfix/megaplan/front/node_modules/tapable/lib/Tapable.js:75:69)
    at onDoneResolving (/devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModuleFactory.js:38:11)
    at onDoneResolving (/devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModuleFactory.js:121:6)
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModuleFactory.js:116:7
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:726:13
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:52:16
    at done (/devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:246:17)
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:44:16
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:723:17
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:167:37
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:52:16
Trace: HappyRPCHandler.registerActiveLoader tslint
    at Object.HappyRPCHandler.registerActiveLoader (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyRPCHandler.js:12:11)
    at Object.HappyLoader (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyLoader.js:20:19)
    at WEBPACK_CORE_LOADER_EXECUTION (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:155:71)
    at runSyncOrAsync (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:155:93)
    at nextLoader (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:290:3)
    at /devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:259:5
    at Storage.provide (/devel/src/hotfix/megaplan/front/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:52:20)
    at CachedInputFileSystem.readFile (/devel/src/hotfix/megaplan/front/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:140:24)
    at DependenciesBlock.onLoadPitchDone (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:255:7)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:182:27)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:186:21)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:223:61)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:186:21)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:223:61)
    at DependenciesBlock.doBuild (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:241:4)
    at DependenciesBlock.build (/devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModule.js:84:14)
    at Compilation.buildModule (/devel/src/hotfix/megaplan/front/node_modules/webpack/lib/Compilation.js:126:9)
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/lib/Compilation.js:309:10
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModuleFactory.js:58:13
    at NormalModuleFactory.applyPluginsAsyncWaterfall (/devel/src/hotfix/megaplan/front/node_modules/tapable/lib/Tapable.js:75:69)
    at onDoneResolving (/devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModuleFactory.js:38:11)
    at onDoneResolving (/devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModuleFactory.js:121:6)
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModuleFactory.js:116:7
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:726:13
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:52:16
    at done (/devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:246:17)
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:44:16
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:723:17
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:167:37
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:52:16
Trace: HappyRPCHandler.registerActiveLoader tslint
    at Object.HappyRPCHandler.registerActiveLoader (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyRPCHandler.js:12:11)
    at Object.HappyLoader (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyLoader.js:20:19)
    at WEBPACK_CORE_LOADER_EXECUTION (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:155:71)
    at runSyncOrAsync (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:155:93)
    at nextLoader (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:290:3)
    at /devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:259:5
    at Storage.provide (/devel/src/hotfix/megaplan/front/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:52:20)
    at CachedInputFileSystem.readFile (/devel/src/hotfix/megaplan/front/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:140:24)
    at DependenciesBlock.onLoadPitchDone (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:255:7)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:182:27)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:186:21)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:223:61)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:186:21)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:223:61)
    at DependenciesBlock.doBuild (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:241:4)
    at DependenciesBlock.build (/devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModule.js:84:14)
    at Compilation.buildModule (/devel/src/hotfix/megaplan/front/node_modules/webpack/lib/Compilation.js:126:9)
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/lib/Compilation.js:309:10
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModuleFactory.js:58:13
    at NormalModuleFactory.applyPluginsAsyncWaterfall (/devel/src/hotfix/megaplan/front/node_modules/tapable/lib/Tapable.js:75:69)
    at onDoneResolving (/devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModuleFactory.js:38:11)
    at onDoneResolving (/devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModuleFactory.js:121:6)
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModuleFactory.js:116:7
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:726:13
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:52:16
    at done (/devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:246:17)
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:44:16
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:723:17
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:167:37
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:52:16
Trace: HappyRPCHandler.registerActiveLoader tslint
    at Object.HappyRPCHandler.registerActiveLoader (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyRPCHandler.js:12:11)
    at Object.HappyLoader (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyLoader.js:20:19)
    at WEBPACK_CORE_LOADER_EXECUTION (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:155:71)
    at runSyncOrAsync (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:155:93)
    at nextLoader (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:290:3)
    at /devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:259:5
    at Storage.provide (/devel/src/hotfix/megaplan/front/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:52:20)
    at CachedInputFileSystem.readFile (/devel/src/hotfix/megaplan/front/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:140:24)
    at DependenciesBlock.onLoadPitchDone (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:255:7)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:182:27)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:186:21)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:223:61)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:186:21)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:223:61)
    at DependenciesBlock.doBuild (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:241:4)
    at DependenciesBlock.build (/devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModule.js:84:14)
    at Compilation.buildModule (/devel/src/hotfix/megaplan/front/node_modules/webpack/lib/Compilation.js:126:9)
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/lib/Compilation.js:309:10
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModuleFactory.js:58:13
    at NormalModuleFactory.applyPluginsAsyncWaterfall (/devel/src/hotfix/megaplan/front/node_modules/tapable/lib/Tapable.js:75:69)
    at onDoneResolving (/devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModuleFactory.js:38:11)
    at onDoneResolving (/devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModuleFactory.js:121:6)
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModuleFactory.js:116:7
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:726:13
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:52:16
    at done (/devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:246:17)
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:44:16
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:723:17
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:167:37
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:52:16
Trace: HappyRPCHandler.registerActiveLoader tslint
    at Object.HappyRPCHandler.registerActiveLoader (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyRPCHandler.js:12:11)
    at Object.HappyLoader (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyLoader.js:20:19)
    at WEBPACK_CORE_LOADER_EXECUTION (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:155:71)
    at runSyncOrAsync (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:155:93)
    at nextLoader (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:290:3)
    at /devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:259:5
    at Storage.provide (/devel/src/hotfix/megaplan/front/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:52:20)
    at CachedInputFileSystem.readFile (/devel/src/hotfix/megaplan/front/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:140:24)
    at DependenciesBlock.onLoadPitchDone (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:255:7)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:182:27)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:186:21)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:223:61)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:186:21)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:223:61)
    at DependenciesBlock.doBuild (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:241:4)
    at DependenciesBlock.build (/devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModule.js:84:14)
    at Compilation.buildModule (/devel/src/hotfix/megaplan/front/node_modules/webpack/lib/Compilation.js:126:9)
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/lib/Compilation.js:309:10
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModuleFactory.js:58:13
    at NormalModuleFactory.applyPluginsAsyncWaterfall (/devel/src/hotfix/megaplan/front/node_modules/tapable/lib/Tapable.js:75:69)
    at onDoneResolving (/devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModuleFactory.js:38:11)
    at onDoneResolving (/devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModuleFactory.js:121:6)
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModuleFactory.js:116:7
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:726:13
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:52:16
    at done (/devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:246:17)
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:44:16
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:723:17
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:167:37
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:52:16
Trace: HappyRPCHandler.registerActiveLoader tslint
    at Object.HappyRPCHandler.registerActiveLoader (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyRPCHandler.js:12:11)
    at Object.HappyLoader (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyLoader.js:20:19)
    at WEBPACK_CORE_LOADER_EXECUTION (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:155:71)
    at runSyncOrAsync (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:155:93)
    at nextLoader (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:290:3)
    at /devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:259:5
    at Storage.provide (/devel/src/hotfix/megaplan/front/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:52:20)
    at CachedInputFileSystem.readFile (/devel/src/hotfix/megaplan/front/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:140:24)
    at DependenciesBlock.onLoadPitchDone (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:255:7)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:182:27)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:186:21)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:223:61)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:186:21)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:223:61)
    at DependenciesBlock.doBuild (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:241:4)
    at DependenciesBlock.build (/devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModule.js:84:14)
    at Compilation.buildModule (/devel/src/hotfix/megaplan/front/node_modules/webpack/lib/Compilation.js:126:9)
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/lib/Compilation.js:309:10
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModuleFactory.js:58:13
    at NormalModuleFactory.applyPluginsAsyncWaterfall (/devel/src/hotfix/megaplan/front/node_modules/tapable/lib/Tapable.js:75:69)
    at onDoneResolving (/devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModuleFactory.js:38:11)
    at onDoneResolving (/devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModuleFactory.js:121:6)
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModuleFactory.js:116:7
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:726:13
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:52:16
    at done (/devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:246:17)
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:44:16
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:723:17
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:167:37
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:52:16
Trace: HappyRPCHandler.registerActiveLoader tslint
    at Object.HappyRPCHandler.registerActiveLoader (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyRPCHandler.js:12:11)
    at Object.HappyLoader (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyLoader.js:20:19)
    at WEBPACK_CORE_LOADER_EXECUTION (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:155:71)
    at runSyncOrAsync (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:155:93)
    at nextLoader (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:290:3)
    at /devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:259:5
    at Storage.provide (/devel/src/hotfix/megaplan/front/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:52:20)
    at CachedInputFileSystem.readFile (/devel/src/hotfix/megaplan/front/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:140:24)
    at DependenciesBlock.onLoadPitchDone (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:255:7)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:182:27)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:186:21)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:223:61)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:186:21)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:223:61)
    at DependenciesBlock.doBuild (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:241:4)
    at DependenciesBlock.build (/devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModule.js:84:14)
    at Compilation.buildModule (/devel/src/hotfix/megaplan/front/node_modules/webpack/lib/Compilation.js:126:9)
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/lib/Compilation.js:309:10
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModuleFactory.js:58:13
    at NormalModuleFactory.applyPluginsAsyncWaterfall (/devel/src/hotfix/megaplan/front/node_modules/tapable/lib/Tapable.js:75:69)
    at onDoneResolving (/devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModuleFactory.js:38:11)
    at onDoneResolving (/devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModuleFactory.js:121:6)
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModuleFactory.js:116:7
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:726:13
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:52:16
    at done (/devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:246:17)
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:44:16
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:723:17
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:167:37
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:52:16
Trace: HappyRPCHandler.registerActiveLoader tslint
    at Object.HappyRPCHandler.registerActiveLoader (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyRPCHandler.js:12:11)
    at Object.HappyLoader (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyLoader.js:20:19)
    at WEBPACK_CORE_LOADER_EXECUTION (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:155:71)
    at runSyncOrAsync (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:155:93)
    at nextLoader (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:290:3)
    at /devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:259:5
    at Storage.provide (/devel/src/hotfix/megaplan/front/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:52:20)
    at CachedInputFileSystem.readFile (/devel/src/hotfix/megaplan/front/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:140:24)
    at DependenciesBlock.onLoadPitchDone (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:255:7)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:182:27)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:186:21)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:223:61)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:186:21)
    at DependenciesBlock.loadPitch (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:223:61)
    at DependenciesBlock.doBuild (/devel/src/hotfix/megaplan/front/node_modules/webpack-core/lib/NormalModuleMixin.js:241:4)
    at DependenciesBlock.build (/devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModule.js:84:14)
    at Compilation.buildModule (/devel/src/hotfix/megaplan/front/node_modules/webpack/lib/Compilation.js:126:9)
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/lib/Compilation.js:309:10
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModuleFactory.js:58:13
    at NormalModuleFactory.applyPluginsAsyncWaterfall (/devel/src/hotfix/megaplan/front/node_modules/tapable/lib/Tapable.js:75:69)
    at onDoneResolving (/devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModuleFactory.js:38:11)
    at onDoneResolving (/devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModuleFactory.js:121:6)
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/lib/NormalModuleFactory.js:116:7
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:726:13
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:52:16
    at done (/devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:246:17)
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:44:16
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:723:17
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:167:37
    at /devel/src/hotfix/megaplan/front/node_modules/webpack/node_modules/async/lib/async.js:52:16
Trace: HappyRPCHandler.unregisterActiveLoader tslint
    at Object.HappyRPCHandler.unregisterActiveLoader (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyRPCHandler.js:17:11)
    at /devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyLoader.js:33:21
    at EventEmitter.<anonymous> (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyPlugin.js:249:7)
    at emitOne (events.js:77:13)
    at EventEmitter.emit (events.js:169:7)
    at ChildProcess.acceptMessageFromWorker (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyThread.js:49:21)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at handleMessage (internal/child_process.js:695:10)
    at Pipe.channel.onread (internal/child_process.js:440:11)

/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyRPCHandler.js:62
  assert(activeLoaders.hasOwnProperty(id),
  ^
AssertionError: A loader RPC (addDependency) was dispatched to HappyLoader[tslint] but no such loader is active!
    at assertLoaderIsActive (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyRPCHandler.js:62:3)
    at Object.HappyRPCHandler.execute (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyRPCHandler.js:30:5)
    at ChildProcess.acceptMessageFromWorker (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyThread.js:54:27)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at handleMessage (internal/child_process.js:695:10)
    at Pipe.channel.onread (internal/child_process.js:440:11)

As you see, there is a lot of registerActiveLoader calls, just one unregisterActiveLoader call and error right after that call. Reducing threads even to 1 does not helps. Seems this could be reproduced with multiple files in test repo.

Since we were identifying loaders merely by the plugin ID, having
multiple loader instances run concurrently could overwrite each other as
RPC targets. Now, each loader *instance* is identified by the plugin id
and the resource it is handling.

If this seems to still cause conflicts in the future, we can just resort
to using UUIDs.
@amireh
Copy link
Owner Author

amireh commented Apr 1, 2016

@Strate I was able to reproduce that case, although unreliably. However, the last patch should fix it in that the happy loader instances will not overwrite each other as targets for an RPC.

My guess is that this happens when webpack attempts to compile multiple files in parallel (probably using async.map or such), where more than one HappyLoader instance - identified by the same plugin ID - clobber each other. Now, we identify the loaders using both the plugin id and the resource they're handling. If this creeps up again, UUIDs can be used instead but I doubt it will be necessary.

Let me know if that fixes it.

@Strate
Copy link

Strate commented Apr 1, 2016

@amireh I'll try it on weekend, thank you a lot, man!

@Strate
Copy link

Strate commented Apr 4, 2016

@amireh Everything is ok with tslint-loader, thank you a lot man! Tested on 8 threads.

@Strate
Copy link

Strate commented Apr 4, 2016

I have tried happypacked tslint-loader together with watch mode, and there is an issue while file change triggered:

ERROR in ./src/bums/common/autocomplete/containers/CAutocomplete.tsx
Module build failed: Error: TypeError: Cannot read property '_sendMessage' of undefined
    at /devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyLoader.js:37:23
    at HappyPlugin.<anonymous> (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyPlugin.js:268:14)
    at /devel/src/hotfix/megaplan/front/node_modules/happypack/lib/applyLoaders.js:266:16
    at applySyncOrAsync (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/applyLoaders.js:347:5)
    at apply (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/applyLoaders.js:264:5)
    at /devel/src/hotfix/megaplan/front/node_modules/happypack/lib/applyLoaders.js:127:7
    at applyPitchLoader (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/applyLoaders.js:180:14)
    at applyPitchLoader (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/applyLoaders.js:188:14)
    at applyPitchLoaders (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/applyLoaders.js:218:4)
    at Object.applyLoaders (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/applyLoaders.js:112:3)
    at HappyPlugin.compileInForeground (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyPlugin.js:266:16)
    at HappyPlugin.compile (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyPlugin.js:219:17)
    at Object.HappyLoader (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyLoader.js:23:14)
 @ ./src/bums/common/example/Example.tsx 19:21-85

Seems that you need to test watch mode also.

@Strate
Copy link

Strate commented Apr 4, 2016

And there is another thing: usgin tslint laoder with cache enabled does not produce any warning and error if cache used. Seems that all calls to emitWarning and similar should be cached also.

amireh added 2 commits April 4, 2016 15:17
This patch makes the async/sync stages more similar as they now both
utilize HappyWorker which does the actual compilation. This should avoid
surprises between the watch and single run modes.

Also modified the examples to be run with cache and without cache, and
they diff their output against webpack without happypack.
Loader dependencies needed for downstream examples are no longer tracked
in the main package.json and one spec was referencing babel-loader which
is no longer there.
@amireh
Copy link
Owner Author

amireh commented Apr 4, 2016

@Strate watch mode should be functional in the last patch, but the caching of loaders like tslint is gonna take more work so I'll leave it for the future.

@Strate
Copy link

Strate commented Apr 6, 2016

@amireh I have updated happypack to #57a27045ea5c25fd65e6234a1c2350df8ddf8694 and it is still fails:

ERROR in ./src/lib/components/CSelect/CSelect.tsx
Module build failed: Error: loader._compiler._sendMessage is not a function
TypeError: loader._compiler._sendMessage is not a function
    at Object.HappyFakeLoaderContext.loader.addDependency (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyFakeLoaderContext.js:54:22)
    at Object.loadRelativeConfig (/devel/src/hotfix/megaplan/front/node_modules/tslint-loader/index.js:26:10)
    at Object.module.exports (/devel/src/hotfix/megaplan/front/node_modules/tslint-loader/index.js:150:35)
    at applySyncOrAsync (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/applyLoaders.js:336:21)
    at apply (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/applyLoaders.js:265:5)
    at /devel/src/hotfix/megaplan/front/node_modules/happypack/lib/applyLoaders.js:128:7
    at applyPitchLoader (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/applyLoaders.js:181:14)
    at applyPitchLoader (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/applyLoaders.js:189:14)
    at applyPitchLoaders (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/applyLoaders.js:219:4)
    at applyLoaders (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/applyLoaders.js:113:3)
    at HappyWorker.compile (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyWorker.js:28:3)
    at HappyPlugin._performCompilationRequest (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyPlugin.js:259:10)
    at HappyPlugin.compileInForeground (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyPlugin.js:250:8)
    at HappyPlugin.compile (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyPlugin.js:225:17)
    at Object.HappyLoader (/devel/src/hotfix/megaplan/front/node_modules/happypack/lib/HappyLoader.js:23:14)
 @ ./src/lib/components.ts 115:15-54

amireh added 2 commits April 8, 2016 20:04
Foreground worker is now set up properly with an instance of
HappyFakeCompiler instead of webpack's compiler.
the "teardown" routine is now idempotent, got rid of much of the
book-keeping state needed between initial/successive builds
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.

4 participants