Giter VIP home page Giter VIP logo

reach-ide's People

Contributors

chrisnevers avatar ericglau avatar hamirmahal avatar jeapostrophe avatar kbryan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

reach-ide's Issues

Compile highlighting stops working when there are too many Docker networks

Each time you run the extension, it creates a temp folder with a random suffix. Reach creates a Docker network using this folder name. Eventually if you have too many Docker networks, compile highlighting no longer works and the following error can be seen in the Reach IDE output logs:

Command failed: cd /var/folders/5v/nrjqxr7s3l5g1mm1l2ngjg8r0000gn/T/reach-ide-PMUN3K && /Users/eric/reach/tut/reach compile index.rsh
Creating network "reach-ide-pmun3k_default" with the default driver
could not find an available, non-overlapping IPv4 address pool among the defaults to assign to the network

As a workaround, run docker network prune to delete unused networks.

To fix this, the temp folder should use a consistent name instead of random name. Or revert to building within (a subfolder of) the project dir instead.

Tell Reach devs a preferred error format

Right now you are doing a noble job parsing the errors, but it would be pretty easy for us to add a command-line option and mode to produce JSON-formatted error messages for a tighter integration.

Clean up logging

Clean up unnecessary logging from the VS Code output console.

Expected 1 arguments, but got 0. Did you forget to include 'void' in your type argument to 'Promise'?

The following error Expected 1 arguments, but got 0. Did you forget to include 'void' in your type argument to 'Promise'? is found in buttons.ts.

Problem:
In newer versions of TypeScript 4.1.x the following syntax is not supported and will produce the above error.
function removeAllButtons() { return new Promise((resolve, reject) => { shownButtons.forEach(button => button.hide()); shownButtons = []; resolve(); }); }
Fix:
resolve is unknown in this context I assume and thus the following syntax works without error.
function removeAllButtons() { return new Promise<void>((resolve, reject) => { shownButtons.forEach(button => button.hide()); shownButtons = []; resolve(); }); }

Menu item references command 'reach.issue' which is not defined in the 'commands' section.

When working with Reach IDE extension and building and running the extension project in a new Extension Development Host window. I get the following error.

Step to reproduce:
= git clone the Reach IDE project
= install necessary npm packages
= compile and run the extension within the extension development host

Expected outcome:

= I think this should create a gist file for easier reporting in the help section in the Reach discord channel.

Screen Shot 2021-06-21 at 8 56 00 AM

Restore copyright headers

Existing copyright notices should not be removed as per the following section in the EPL v2.0 license:

3.3 Contributors may not remove or alter any copyright, patent,
trademark, attribution notices, disclaimers of warranty, or limitations
of liability ("notices") contained within the Program from any copy of
the Program which they Distribute, provided that Contributors may add
their own appropriate notices.

Please restore the copyright notices from the following commits, and add Reach copyright notices as a separate line.

108fb96#diff-7b7aa9c8b1944a19471cbe4172196463223080d88b4433c79933f3a47f8ca0f3

108fb96#diff-4398e3b2ab3e7e7e70a93409fa893abf68608d45a5ad1ac7faaf888dac77005d

Determine how theorem failures should be displayed

The compiler currently throws out a lot of information if theorem errors occur. Determine which parts of the theorem failure information are relevant for an IDE scenario, and how it should be presented (e.g. using diagnostic highlighting as with other errors, or something in addition to that).

invalid function causes crash

compiler gives error: error: ./.index.rsh.temp:18:26:application: Invalid function appication. Expected 2 args, got 1 for function defined at reach standard library:33:27:function exp

index.rsh:

'reach 0.1';

const Player =
      { getHand: Fun([], UInt256),
        seeOutcome: Fun([UInt256], Null) };

export const main =
  Reach.App(
    {},
    [['Alice', Player], ['Bob', Player]],
    (A, B) => {
      A.only(() => {
        const handA = declassify(interact.getHand()); });
      A.publish(handA);
      commit();

      B.only(() => {
        const handB = add(interact.getHand());
      });
      B.publish(handB);

      const outcome = (handA + (4 - handB)) % 3;
      commit();

      each([A, B], () => {
        interact.seeOutcome(outcome); });
      exit(); });

extension gives error:

CallStack (from HasCallStack):
  error, called at src/Reach/AST.hs:58:3 in reach-0.1.2-KZ4oXxVSV3mFfbu8tz29Bg:Reach.AST
  expect_throw, called at src/Reach/Eval.hs:356:10 in reach-0.1.2-KZ4oXxVSV3mFfbu8tz29Bg:Reach.Eval

/Users/eric/git/reach-ide/server/out/server.js:278
        problematicString = problematicString.substring(0, problematicString.length - 1); // remove trailing period at end of sentence 
                                              ^

TypeError: Cannot read property 'substring' of undefined
    at findErrorLocations (/Users/eric/git/reach-ide/server/out/server.js:278:47)
    at /Users/eric/git/reach-ide/server/out/server.js:180:38
    at ChildProcess.exithandler (child_process.js:311:5)
    at ChildProcess.emit (events.js:223:5)
    at maybeClose (internal/child_process.js:1021:16)
    at Socket.<anonymous> (internal/child_process.js:430:11)
    at Socket.emit (events.js:223:5)
    at Pipe.<anonymous> (net.js:664:12)

Support hover documentation with simpler markdown or plaintext

Current hover content is in Markdown that has a lot of content which is hard to read in text-based editors such as Vim or Neovim. See screenshots below. It would be helpful if the server can accept a setting (passed from the client) to produce hover content in a simpler Markdown format (perhaps without links) or in plaintext.

Screen Shot 2021-03-03 at 9 41 00 AM
Screen Shot 2021-03-03 at 9 39 50 AM

Null language client settings causes error on validation

If the language client passes null settings, the following error occurs:

reach-language-server: (node:76751) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'executableLocation' of null
reach-language-server: at /Users/eric/git/reach-ide/server/out/server.js:201:37
reach-language-server: at Generator.next (<anonymous>)

The issue occurs at this line: https://github.com/reach-sh/reach-ide/blob/master/server/src/server.ts#L257

To reproduce this, follow steps at https://github.com/ericglau/sublime-reach but remove the following section from the configuration:

"settings": {
        "reachide": {
          "executableLocation": "./reach"
        }
      }

Running Reach launch client from Visual Studio Code producing eslint errors

Visual Studio code produces the following errors when running Launch Client IDE.

Step to reproduce:
= git clone and install necessary npm packages
= Run Reach Launch Client
You will see the following errors.
Screen Shot 2021-06-21 at 10 07 27 AM

Expected outcome:
Launch client should run without error.

Proposed fix:
The use of single quotes and semi-colons.
use
const TEST_ETH_PRIVATE_KEY = '0x422c874bed50b69add046296530dc580f8e2e253879d98d66023b7897ab15742';
instead of
const TEST_ETH_PRIVATE_KEY = "0x422c874bed50b69add046296530dc580f8e2e253879d98d66023b7897ab15742"

Will fix this issue and have the Launch Client run as expected.

Review Ethereum deployment in tutorial and check out the prototype Reach demos

In your IDE (and pitch video), you copy & paste the Ethereum bytecode & ABI and interact with them directly. The model of Reach is that your front-end program would be responsible for doing deployment and would do so programmatically. The end-to-end tests do this on a development node, but in the "real world" it would also be done by the application.

We're about to update the documentation with a walk-through of React apps that deploy and drive Reach-implemented dApps --- https://github.com/reach-sh/reach-lang/tree/master/react-examples/overview --- and they demonstrate the way we imagine this working. In particular, using the programmatic method retains the blockchain agnosticism of Reach (right now, you can deploy on Ethereum AND Algorand!)

I'd love to talk to you about this and get your perspective.

Fix dot compile errors

Handle this syntax: error, ./.index.rsh.temp,8,8,dot, AApp is not a field of Reach. Did you mean, ["App"]

Separate Reach language server into a different repo

Currently this repo has two projects:
https://github.com/reach-sh/reach-ide/tree/master/server - which is the Reach language server
https://github.com/reach-sh/reach-ide/tree/master/client - which is the VS Code client that uses the Reach language server

It would be useful to separate code for the Reach language server into a different GitHub repo where it can be published separately as an npm package. Then the VS Code client and any other language client (such as for Vim or Sublime) can just pull it in as an npm dependency.

(It may not be strictly necessary to use a different repo -- the main suggestion here is to publish the server as an npm package. But separating the repos could make it cleaner since VS Code will just be one of the clients.)

@chrisnevers Any thoughts on this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.