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

embark run crashes if a contract is deleted #1077

Closed
bingen opened this issue Nov 13, 2018 · 1 comment
Closed

embark run crashes if a contract is deleted #1077

bingen opened this issue Nov 13, 2018 · 1 comment

Comments

@bingen
Copy link

bingen commented Nov 13, 2018

Bug Report

Dashboard crash when deleting contracts

Current behavior

If you have embark run dashboard active and then delete a .sol file inside the contracts/ path, it crashes.

It happens often to me because I have an emacs package that is constantly creating and deleting temporary files for syntax checking, but I happened to me once I was deleting a contract that I was no longer using.

@iurimatias suggested a workaround consisting of adding a negative match pattern in embark.json, like this:

"contracts": ["contracts/**", "!contracts/**/flycheck_*.sol"],

This works for me for the first case.

Expected behavior

Not sure, but it should definitely not crash, specially if the file is not actually needed

If you encounter an error, please create a logfile using the following command and post the output here

Error: ENOENT: no such file or directory, open 'contracts/test/mocks/flycheck_TokenMock.sol'
    at Object.fs.openSync (fs.js:663:18)
    at Function.fs.readFileSync (fs.js:568:33)
    at restrictPath (/home/bingen/.nvm/versions/node/v9.4.0/lib/node_modules/embark/lib/core/fs.js:54:43)
    at Object.readFileSync (/home/bingen/.nvm/versions/node/v9.4.0/lib/node_modules/embark/lib/core/fs.js:111:10)
    at File.content (/home/bingen/.nvm/versions/node/v9.4.0/lib/node_modules/embark/lib/core/file.js:137:20)
    at /home/bingen/.nvm/versions/node/v9.4.0/lib/node_modules/embark/lib/modules/solidity/index.js:172:18
    at /home/bingen/.nvm/versions/node/v9.4.0/lib/node_modules/embark/node_modules/async/dist/async.js:3110:16
    at eachOfArrayLike (/home/bingen/.nvm/versions/node/v9.4.0/lib/node_modules/embark/node_modules/async/dist/async.js:1069:9)
    at eachOf (/home/bingen/.nvm/versions/node/v9.4.0/lib/node_modules/embark/node_modules/async/dist/async.js:1117:5)
    at Object.eachLimit (/home/bingen/.nvm/versions/node/v9.4.0/lib/node_modules/embark/node_modules/async/dist/async.js:3172:5)
    at prepareInput (/home/bingen/.nvm/versions/node/v9.4.0/lib/node_modules/embark/lib/modules/solidity/index.js:161:15)
    at nextTask (/home/bingen/.nvm/versions/node/v9.4.0/lib/node_modules/embark/node_modules/async/dist/async.js:5324:14)
    at Object.waterfall (/home/bingen/.nvm/versions/node/v9.4.0/lib/node_modules/embark/node_modules/async/dist/async.js:5334:5)
    at Solidity.compile_solidity (/home/bingen/.nvm/versions/node/v9.4.0/lib/node_modules/embark/lib/modules/solidity/index.js:159:11)
    at /home/bingen/.nvm/versions/node/v9.4.0/lib/node_modules/embark/lib/modules/compiler/index.js:50:18
    at /home/bingen/.nvm/versions/node/v9.4.0/lib/node_modules/embark/lib/utils/async_extend.js:7:7
    at /home/bingen/.nvm/versions/node/v9.4.0/lib/node_modules/embark/node_modules/async/dist/async.js:3110:16
    at eachOfArrayLike (/home/bingen/.nvm/versions/node/v9.4.0/lib/node_modules/embark/node_modules/async/dist/async.js:1069:9)
    at eachOf (/home/bingen/.nvm/versions/node/v9.4.0/lib/node_modules/embark/node_modules/async/dist/async.js:1117:5)
    at Object.eachLimit (/home/bingen/.nvm/versions/node/v9.4.0/lib/node_modules/embark/node_modules/async/dist/async.js:3172:5)
    at Object.asyncEachObject [as eachObject] (/home/bingen/.nvm/versions/node/v9.4.0/lib/node_modules/embark/lib/utils/async_extend.js:4:9)
    at Compiler.compile_contracts (/home/bingen/.nvm/versions/node/v9.4.0/lib/node_modules/embark/lib/modules/compiler/index.js:36:11)

Please provide additional information about your system

OS: Ubuntu 16.04
Embark Version: 4.0.0-alpha.1
Node Version: v.9.4.0
NPM Version: 5.7.1

@0x-r4bbit
Copy link
Contributor

This will be fixed with: #1104

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Embark
  
Inbox
Development

No branches or pull requests

2 participants