GithubHelp home page GithubHelp logo

Comments (6)

beurdouche avatar beurdouche commented on July 23, 2024

By the way, maybe always having a feedback would be nice ?
Printing "OK" or "Success" in emacs when everything goes fine
Printing "ERROR : blabla" in emacs on failure

from fstar-mode.el.

cpitclaudel avatar cpitclaudel commented on July 23, 2024

Thanks for that feedback! I'll look at it now.

from fstar-mode.el.

cpitclaudel avatar cpitclaudel commented on July 23, 2024

Ok, I see where the problem is from: this is another case of F*'s error messages not being consistent:

Error: Could not parse a valid build configuration from ; Invalid options : unrecognized option '--admit-fsi'

and

heap.fst(14,37-14,40) : Error
Identifier not found: [set] 

as opposed to

<input>(5,21-5,32): Name "FStar.All.ML" not found

(notice the extra space in the second message). Also notice that it doesn't point to the current file, but to another file.

from fstar-mode.el.

cpitclaudel avatar cpitclaudel commented on July 23, 2024

Ah, I see the actual issue here. The problem is that the F* subprocess exits after that error, but before printing the #done flag, so the Emacs mode never knows that the message is complete. I'm not sure what I can do about this particular issue; it would seem better for the interactive mode to print one last #done before exiting :/

from fstar-mode.el.

cpitclaudel avatar cpitclaudel commented on July 23, 2024

I looked at the code in a bit more detail, and I think this shouldn't be too hard to fix on the F* side. The problem is that F* exits right after starting with an error message if it can't parse the current document. fstar-mode doesn't know why it exited, and doesn't know what to do with that output.

I can fix it partially on the Emacs side by displaying the remaining output, but it won't be very nice.

Instead, the F* side could be changed to delay looking for dependencies (that's the part that causes a parse) until it receives a "#init" query, or something like this. Then if the parsing failed F* would print the error (as it does now), print a #done-nok, and exit. F*-mode would process the error message just fine, because it would come in response to an IDE query ("#init").

I think that should be a pretty simple patch (all in FStar.Interactive.fs).

from fstar-mode.el.

cpitclaudel avatar cpitclaudel commented on July 23, 2024

Fixing this would be nice: there are tutorial entries and README tips about this bug.

from fstar-mode.el.

Related Issues (20)

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.