Commit Graph

53 Commits

Author SHA1 Message Date
Iuri Matias 1d6da99e8f display last error found
display last line on tx

fix debugger call

listen to source event only after jumping to the end

keep track of last tx; add minimal debug feature; fix ast issue

initial debugger apis & ui integration

prevent crash when step is out of bounds; send all all available data in websocket

add debugger commands

fix line number tracking in editor; toggle breakpoints

replace timeouts with callbacks

add debugger manager & refactor

refactor debugger api

refactor cmd line debugger

reduce debugger decoupling

reduce debugger decoupling

fix debug buttons

trigger source update so api triggers ws event to update source location

move locals and contracts vars to a json view

improve debugger icons

simplify debugger data

update debug package

add command handler to get a contract given a tx; update debugger so it can get a contract by its tx instead of tracking latest txs only

update debugger package
2018-10-23 18:27:40 -04:00
Anthony Laibe 572cd20482
Fix backend tab request cached:
- Add no cache via helmet
- Fix linting (no-return-else)
- Rebase Fix: Use option.name for process log to avoid endpoint being called
blockchainProcess.js
- Rebase Fix: use option when compiling solidity
2018-10-23 10:47:24 +02:00
emizzle 199aa18c07
Fix solidity compilation
Issues introduced in rebase.
2018-10-23 10:44:14 +02:00
Anthony Laibe a08690ef43
File Editor 2018-10-23 10:41:20 +02:00
emizzle 05b324dffe
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-10-23 10:37:00 +02:00
Anthony Laibe 4ecb092ed3
Remove last fiddle, and use code to compile 2018-10-23 10:37:00 +02:00
emizzle cd176a5f95
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-10-23 10:37:00 +02:00
emizzle b8b98cd6c4
Remove ‘async’ from function name and remove comments 2018-10-23 10:36:59 +02:00
emizzle cba4e9fb91
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-10-23 10:36:59 +02:00
emizzle 59d3a3be83
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-10-23 10:36:58 +02:00
Jonathan Rainville c844338c8a
add back return all errors 2018-10-23 10:36:57 +02:00
Jonathan Rainville 56d541fb8d
fix most rebase issues 2018-10-23 10:36:57 +02:00
emizzle 23a1cf57c2
Removed the contract compile event
(really did it this time)
2018-10-23 10:31:36 +02:00
emizzle 6f8f9a14d9
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-10-23 10:31:36 +02:00
emizzle 8caa478968
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-10-23 10:31:35 +02:00
emizzle 70f5a09d47
Fiddle now showing compilation warnings and errors 2018-10-23 10:31:35 +02:00
Anthony Laibe 52cec0a29e
Display compilation result 2018-10-23 10:31:35 +02:00
emizzle 1d13c71d83
Code compilation API working, but not updating state 2018-10-23 10:31:34 +02:00
emizzle ddcccb3c2d
Initial compile API and Fiddle container/pres components 2018-10-23 10:31:34 +02:00
Jonathan Rainville 4e7a0389bb
fix eslint on EVERYTHING 2018-10-23 10:26:14 +02:00
Iuri Matias 05f0fef46d
track original filepath of the contract 2018-10-23 10:21:37 +02:00
Jonathan Rainville ddc8b36329
make tests work by using events 2018-10-22 19:54:45 +02:00
Jonathan Rainville ca3aea7923
BROKEN: solc doesnt load 2018-10-22 19:54:45 +02:00
Andre Medeiros c6d7bec9d7 Do not request legacyAST from solc to speed up compilation 2018-09-19 15:51:11 -04: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
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
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 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
Iuri Matias 85443959e0 remove unneded option 2018-06-05 08:04:27 -04:00
Iuri Matias 1821e89346 refactor ipc to a module 2018-06-04 18:15:37 -04:00
Iuri Matias b16c06025b use ipc for compiler 2018-06-04 18:15:37 -04:00
Iuri Matias b43a766de7 cleanup module call 2018-05-30 13:38:08 -04:00
Iuri Matias 46c2be16de don't unnecessary reload solc 2018-05-18 13:41:25 -04:00
Jonathan Rainville bcb7c80758 Early return if no sol files 2018-05-17 09:49:50 -04:00
Iuri Matias 0b70f32bb9 initial work for i18n 2018-05-10 15:01:34 -04:00
Jonathan Rainville b931efcf7d fix dir in contractsDirectory 2018-04-18 12:59:58 -04:00
Jonathan Rainville 9faf644c31 add loading in file.js but includes a patch to fix 2018-04-18 12:09:42 -04:00
Jonathan Rainville dc9e6c168b start vyper implementation 2018-04-13 14:59:01 -04:00
Iuri Matias b56f20db8a
Merge pull request #359 from embark-framework/node_module_import
better mappings
2018-04-12 20:41:52 -04:00
Iuri Matias 7dd36a7a3b support getting contract from module; fix bug in which entire contract path was being replaced instead of just the beginning (if matching contracts in embark.json) 2018-04-12 18:50:47 -04:00
emizzle 4a9b52e5df Removed annoying [Object object] from the log that was appearing during contract compilation.
The warnings in object that were attempted to be logged were already being logged in a previous loop, so this was simply removed.
2018-04-12 13:47:34 +10:00
Jonathan Rainville e90cead578 fix tests breaking because of line-endings 2018-04-10 16:38:49 -04:00
Iuri Matias da7e5747f9 report error message instead of array 2018-03-02 18:01:48 -05:00
Iuri Matias 3b60793b25 remove old jshint directives 2018-02-07 19:49:54 -05:00
Iuri Matias 1c45d215ce check error severity besides the type 2018-02-07 19:40:59 -05:00
Iuri Matias 7a7330e695 update solidity module to use compileStandard and the standard json 2018-01-27 15:07:48 -05:00
Iuri Matias 80e8f6323a display error when there is a unknown compilation error 2018-01-17 15:09:19 -05:00