Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Conversation

@eggplantzzz
Copy link
Contributor

Update webpack for the debugger and adjust webpack config.

I did a very basic smoke test involving migrating the metacoin box (using truffle develop) and then debugging one of the deployment transactions. It seemed to work. @haltman-at if you think there is some more due diligence that I can help out with then let me know!

Copy link
Contributor

@gnidan gnidan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌

Copy link
Contributor

@CruzMolina CruzMolina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet LGTM :shipit:

Copy link
Contributor

@CruzMolina CruzMolina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooo, one thing to note is that it looks like mocha-webpack no longer works when running the COVERAGE job because of the changes here.

We don't really get to see this in CI because of the weird dependency error that keeps popping up, but on the remote VM I'm using this is the error that gets thrown when mocha-webpack gets invoked:

WEBPACK  Failed to compile with 1 error(s)

Error: Chunk.parents: Use ChunkGroup.getParents() instead
    at Chunk.get (/home/cruz/truffle/node_modules/webpack/lib/Chunk.js:844:9)
    at /home/cruz/truffle/node_modules/mocha-webpack/lib/webpack/util/sortChunks.js:24:15
    at Array.forEach (<anonymous>)
    at sortChunks (/home/cruz/truffle/node_modules/mocha-webpack/lib/webpack/util/sortChunks.js:23:10)
    at getBuildStats (/home/cruz/truffle/node_modules/mocha-webpack/lib/webpack/util/getBuildStats.js:28:47)
    at TestRunner.prepareMocha (/home/cruz/truffle/node_modules/mocha-webpack/lib/runner/TestRunner.js:141:52)
    at /home/cruz/truffle/node_modules/mocha-webpack/lib/runner/TestRunner.js:193:36
    at /home/cruz/truffle/node_modules/mocha-webpack/lib/webpack/compiler/registerReadyCallback.js:26:7
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/cruz/truffle/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:18:1)
    at AsyncSeriesHook.lazyCompileHook (/home/cruz/truffle/node_modules/tapable/lib/Hook.js:154:20)
    at emitRecords.err (/home/cruz/truffle/node_modules/webpack/lib/Compiler.js:304:22)
    at Compiler.emitRecords (/home/cruz/truffle/node_modules/webpack/lib/Compiler.js:499:39)
    at emitAssets.err (/home/cruz/truffle/node_modules/webpack/lib/Compiler.js:298:10)
    at callback (/home/cruz/truffle/node_modules/webpack/lib/Compiler.js:485:14)
    at _err0 (eval at create (/home/cruz/truffle/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:16:1)
    at handleAfterEmit (/home/cruz/truffle/node_modules/write-file-webpack-plugin/src/WriteFileWebpackPlugin.js:195:7)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/cruz/truffle/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:12:1)
    at AsyncSeriesHook.lazyCompileHook (/home/cruz/truffle/node_modules/tapable/lib/Hook.js:154:20)
    at asyncLib.forEachLimit.err (/home/cruz/truffle/node_modules/webpack/lib/Compiler.js:482:27)
    at /home/cruz/truffle/node_modules/neo-async/async.js:2818:7
    at done (/home/cruz/truffle/node_modules/neo-async/async.js:3522:9)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/cruz/truffle/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at outputFileSystem.writeFile.err (/home/cruz/truffle/node_modules/webpack/lib/Compiler.js:464:33)
    at MemoryFileSystem.writeFile (/home/cruz/truffle/node_modules/memory-fs/lib/MemoryFileSystem.js:328:9)
    at writeOut (/home/cruz/truffle/node_modules/webpack/lib/Compiler.js:462:30)
    at asyncLib.forEachLimit (/home/cruz/truffle/node_modules/webpack/lib/Compiler.js:476:7)
    at arrayIterator (/home/cruz/truffle/node_modules/neo-async/async.js:3467:9)
    at done (/home/cruz/truffle/node_modules/neo-async/async.js:3527:9)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/cruz/truffle/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (/home/cruz/truffle/node_modules/tapable/lib/Hook.js:154:20)
    at outputFileSystem.writeFile.err (/home/cruz/truffle/node_modules/webpack/lib/Compiler.js:464:33)
    at MemoryFileSystem.writeFile (/home/cruz/truffle/node_modules/memory-fs/lib/MemoryFileSystem.js:328:9)
    at writeOut (/home/cruz/truffle/node_modules/webpack/lib/Compiler.js:462:30)
    at asyncLib.forEachLimit (/home/cruz/truffle/node_modules/webpack/lib/Compiler.js:476:7)
    at arrayIterator (/home/cruz/truffle/node_modules/neo-async/async.js:3467:9)
    at timesSync (/home/cruz/truffle/node_modules/neo-async/async.js:2297:7)
    at Object.eachLimit (/home/cruz/truffle/node_modules/neo-async/async.js:3463:5)
    at emitFiles (/home/cruz/truffle/node_modules/webpack/lib/Compiler.js:358:13)
    at Immediate._onImmediate (/home/cruz/truffle/node_modules/memory-fs/lib/MemoryFileSystem.js:288:4)
    at runCallback (timers.js:705:18)
    at tryOnImmediate (timers.js:676:5)
    at processImmediate (timers.js:658:5)

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Copy link
Contributor

@CruzMolina CruzMolina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, just verified that the COVERAGE job still bundles and runs just fine on develop.

@eggplantzzz eggplantzzz requested a review from haltman-at April 23, 2020 17:47
@eggplantzzz
Copy link
Contributor Author

So what's the deal @CruzMolina? Do we need to update that dependency as well or are we good?

@CruzMolina
Copy link
Contributor

If we care about that job still, then seems like we need to update the dep (or maybe just the webpack config script being passed to mocha-webpack in the scripts step?). That job is failing for some other odd reason in CI that I've tried fixing (didn't try very hard), but I can still pass that job locally in the Ubuntu VM when on develop. Not with this change though.

What do you think @gnidan?

@eggplantzzz
Copy link
Contributor Author

Welp, looks like that dep is already on the latest version.

@haltman-at
Copy link
Contributor

Oh, the mocha-webpack issue came up when I tried to do this earlier on my branch babel-up, where I tried to upgrade not only webpack but also babel. (Glad to hear upgrading webpack by itself went much better!) Yeah mocha-webpack unfortunately isn't maintained, and the last stable release isn't compatible with webpack v4...

...but there is a beta version that is. When @gnidan and I discussed this earlier when I was trying this, we decided using that version was OK in this case. So, I'd suggest upgrading mocha-webpack to 2.0.0-beta.0.

@eggplantzzz
Copy link
Contributor Author

@CruzMolina Do you want to try upgrading to that beta version and see what happens on your environment?

Copy link
Contributor

@haltman-at haltman-at left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact, why not, I'll go ahead and request changes there. Don't want this being merged without that!

@CruzMolina CruzMolina requested a review from haltman-at April 23, 2020 20:47
Copy link
Contributor

@CruzMolina CruzMolina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet mocha-webpack 2.0.0-beta.0 works!

Copy link
Contributor

@haltman-at haltman-at left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

@CruzMolina
Copy link
Contributor

FYI, this is still failing the build cause of latest geth.

@eggplantzzz
Copy link
Contributor Author

Everybody's lovin it!

@gnidan gnidan merged commit c88cd1d into develop Apr 24, 2020
@gnidan gnidan deleted the update-debugger-wp branch April 24, 2020 23:50
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.

5 participants