79 Commits

Author SHA1 Message Date
Anthony Laibe
634fb63b71 File Editor 2018-09-30 12:14:54 -04:00
emizzle
afff55fe1b Fiddle use cases fixed
Handle use cases:

1) handle case when temp.sol doesn’t exist - due to the new saga updates, the response from retreiving a temp fiddle from the filesystem (even if it doesn’t exist) is forward to the compilation endpoint, which returns an ENOENT, and this is handled in the selector.
2) delete all code - shouldn’t return last fiddle and should compile an empty string.
3) Switch to different tab (ie contracts) then back to fiddle - previous fiddle should remain.

Also fixed an issue (most likely due to latest rebase) when deploying fiddle contracts. The gasLimit was not being specified.

Handled issue where entities stored in the state were not being put in the correct order, so a timestamp was sent with the requests and then sorted when the response was returned.
2018-09-30 12:08:53 -04:00
Anthony Laibe
e30bdf1222 Remove last fiddle, and use code to compile 2018-09-30 12:08:53 -04:00
emizzle
3898686c7b Handle use cases that were failing
1) hanlde case when temp.sol doesn’t exist
2) delete all code - shouldn’t return last fiddle
3) Switch to different tab (ie contracts) then back to fiddle - fiddle should now remain.
2018-09-30 12:08:53 -04:00
emizzle
290cbfa32a Remove ‘async’ from function name and remove comments 2018-09-30 12:08:41 -04:00
emizzle
a9071f714c Fiddle file stored in filesystem
Fiddles are now stored in the filesystem so they can be preserved across page reloads, but also so that contracts deployed via fiddles can have their source code shown.

Fiddles deployed as contracts now fully work with existing contract list UI and functionality. Fiddle deployed contracts are listed in a separate section in the UI.

Current limitation is that only single contracts per file are supported. If the fiddle contains multiple contracts, it’s currently not supported.
2018-09-30 12:08:41 -04:00
emizzle
b0ba46a0a9 Fiddle deploy integration
Fiddle is properly deploying now, except the source code needs to be saved to the filesystem in order to be recalled later.

Fixes for handling errors on deploy and compilation.

Update contract state UI for determining state / interface / deployed.
2018-09-30 12:08:41 -04:00
Jonathan Rainville
650a097ea8 add back return all errors 2018-09-30 11:48:39 -04:00
Jonathan Rainville
4beb492d70 fix most rebase issues 2018-09-30 11:48:39 -04:00
emizzle
ac2ce45f3b Removed the contract compile event
(really did it this time)
2018-09-30 11:34:15 -04:00
emizzle
9b22c79701 Addressed PR comments
Changed `fiddle` to an entity and removed unneeded fiddle reducer.

Added a selector for getting the entity.

Changed fiddle saga to `doRequest`.

Changed fiddle api call to the `post` method (did not see beofre the rebase).

Added `CompilerError` presentation component to handle displaying compiler errors and warnings.

Added spaces to css (as requested).

Removed extra space after function in solidity compiler (as requested).

Removed the compile contract event from the solidity compiler (as requested).

Handling of fatal api error in the UI.

Changed fiddle action to the one created with `createRequestTypes`.

Moved `Fiddle` nav tab before `Documentation`.

Changed `FiddleResults` DOM manipulation to be controlled via React state instead.
2018-09-30 11:34:15 -04:00
emizzle
607392ae6d Annotations, click to error, UI improvements
Compiler annotations added to editor gutter for errors and warnings

Clicking an error now scrolls editor to offending line and scrolls page to the top of the editor

Added Compiling… loader.
2018-09-30 11:33:14 -04:00
emizzle
03fc5889fc Fiddle now showing compilation warnings and errors 2018-09-30 11:33:14 -04:00
Anthony Laibe
635557b94b Display compilation result 2018-09-30 11:31:17 -04:00
emizzle
01f9508238 Code compilation API working, but not updating state 2018-09-30 11:31:17 -04:00
emizzle
27ff7f80cd Initial compile API and Fiddle container/pres components 2018-09-30 11:31:17 -04:00
Jonathan Rainville
14d36f5b88 fix eslint on EVERYTHING 2018-09-30 11:21:23 -04:00
Iuri Matias
433fd6f11e track original filepath of the contract 2018-09-30 10:53:43 -04:00
Andre Medeiros
c6d7bec9d7 Do not request legacyAST from solc to speed up compilation 2018-09-19 15:51:11 -04:00
Anthony Laibe
5957be9571 Avoid Solc to die because of compilation 2018-09-06 11:24:29 +01:00
Andre Medeiros
05dea5844a Fix the way we pass compiler options instead of assuming via the environment 2018-08-30 13:27:18 -04:00
Jonathan Rainville
86f1cf51d2 enable node=embark 2018-08-23 12:54:43 -04:00
Iuri Matias
6ae697f36a add solc options 2018-08-21 16:11:07 -04:00
Andre Medeiros
f2939ae91b Address feedback 2018-08-21 16:09:48 -04:00
Andre Medeiros
951e31ae6d Linting things 2018-08-21 16:09:13 -04:00
Andre Medeiros
8e396a17d8 Progress 2018-08-21 16:09:13 -04:00
Iuri Matias
29b0d01f22 move processes into core 2018-08-21 16:04:22 -04:00
Iuri Matias
7fcc504873 fix requires 2018-08-21 16:03:35 -04:00
Iuri Matias
540afedbaf fix library manager init 2018-08-21 16:03:35 -04:00
Iuri Matias
2ed7238190 move process files into processes folder 2018-08-21 16:02:18 -04:00
emizzle
a100dd4260 Requested PR fixes
Added catch to live-plugin-manager install promise running in child process

Removed some `else`'s ;)

Only showing solc downloading spinner when `--nodashboard` option is used.

When installing package in main process and simultaneous downloads fail, all callbacks called with error.

Updated logging in npmTimer.
2018-06-15 17:06:59 -04:00
emizzle
5e20f27c99 Solc loading issue now fully resolved
Added better error checking for solidity compilation errors

Extracted timer functionality for downloading packages so it works across the main process and child processes.

Npm class is instantiated only once and reused for event commands.

Npm class can handle concurrent requests for the same package and callback the installation result for each request.
2018-06-15 17:06:59 -04:00
emizzle
b96df79c59 Finally fixed the solc loading issue.
Moved the instantiation of the live-plugin-manager in to the child solc process. This allowed us to use the live-plugin-manager to require the installed solc file.

If the module is the same version as used by embark, the module is still loading using the normal require (from node_modules), as before.
2018-06-15 17:06:59 -04:00
emizzle
eedcdc77a7 Solc loading issue now fully resolved
Added better error checking for solidity compilation errors

Extracted timer functionality for downloading packages so it works across the main process and child processes.

Npm class is instantiated only once and reused for event commands.

Npm class can handle concurrent requests for the same package and callback the installation result for each request.
2018-06-15 17:02:53 -04:00
emizzle
62f3b85bc4 Finally fixed the solc loading issue.
Moved the instantiation of the live-plugin-manager in to the child solc process. This allowed us to use the live-plugin-manager to require the installed solc file.

If the module is the same version as used by embark, the module is still loading using the normal require (from node_modules), as before.
2018-06-15 16:54:08 -04:00
Richard Ramos
bf25381fa6 Rebasing changes from develop 2018-06-11 16:40:14 -04:00
Jonathan Rainville
3d70028cc5 fixing small stuff 2018-06-07 13:01:12 -04:00
Iuri Matias
a41cf99be0 reverse condition 2018-06-05 16:13:17 -04:00
Iuri Matias
0e6d526ab4 comply with linter 2018-06-05 08:37:27 -04:00
Iuri Matias
85443959e0 remove unneded option 2018-06-05 08:04:27 -04:00
Iuri Matias
c0e559a7d9 assign roles so ipc connections don't conflict; fallback if can't connect to ipc 2018-06-04 18:15:37 -04:00
Iuri Matias
a57bce2a40 refactor to use callbacks on ipc requests 2018-06-04 18:15:37 -04:00
Iuri Matias
1821e89346 refactor ipc to a module 2018-06-04 18:15:37 -04:00
Iuri Matias
6e37c2d91b only reply to compile action 2018-06-04 18:15:37 -04:00
Iuri Matias
e96842f9da use .embark instead of /tmp 2018-06-04 18:15:37 -04:00
Iuri Matias
b16c06025b use ipc for compiler 2018-06-04 18:15:37 -04:00
Jonathan Rainville
33bd52e9ec add id to solc process to avoid multiple callback calls 2018-06-01 13:44:35 -04:00
Iuri Matias
b43a766de7 cleanup module call 2018-05-30 13:38:08 -04:00
Jonathan Rainville
a7be2cda26 convert solcw to use once 2018-05-18 14:22:58 -04:00
Jonathan Rainville
c5c00fc3b4 conflict in solcW 2018-05-18 14:11:29 -04:00