Comments (8)
Hi,
Thanks for the bug report! Do you have a small example of problematic code? I'm having trouble repducing the issue (for example, I'm not seeing this with the following code; I do get an error on the :=
)
method A(x: int) returns (y: int) {
y := true;
}
from boogie-friends.
Hi,
I'm not getting an error on the :=
with your example.
I can only see the error when (setq dafny-verification-backend 'server)
is commented in init.el
:
(require 'package)
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/"))
(package-initialize)
(setq dafny-verification-backend 'server)
(setq flycheck-dafny-executable "dafny")
(setq flycheck-inferior-dafny-executable "dafny-server")
However it seems that dafny-server
works because when I add (setq inferior-dafny--debug t)
the following appears in the Messages buffer:
[inferior-dafny-filter-live] [/tmp/example.dfy(2,3): Error: RHS (of type bool) not assignable to LHS (of type int)
^[[37mVerification completed successfully!
[SUCCESS] [[DAFNY-SERVER: EOM]]
from boogie-friends.
Hey there,
Which platform are you using this on? GNU/Linux, or Windows? If Windows, which Emacs are you using? Cygwin?
That ^[[37m
in the message looks suspicious.
Clément.
from boogie-friends.
Yes, ^[[37m
is suspicious. I should have guessed. It's an ANSI escape code to reset the foreground color back to white after setting it to red to print the error message. The problem seems to be that dafny-server
is producing colored output, and the terminal control codes appear in what Emacs reads.
I'm using GNU/Linux Ubuntu and Emacs 24.5 with GTK (from the official repository).
I have carried out some experiments:
- If I run
dafny-server
manually at the command line (with the base64 message and all that), the output is colored as if I were using the command line interface. - Mono checks whether the output channel is interactive (~
isatty
) and doesn't write control codes for colors when it is not. In cli mode it's likely the case. - In server mode, when called,
dafny-server
's standard output is interactive (isatty
returns true). - When using server mode and C-c C-c
dafny
is called with custom environment variables. One of them isTERM=dumb
. Whendafny-server
is called automatically, there isTERM=xterm-256color
instead, the default.
Conclusion: invoking Emacs with TERM=dumb emacs example.dfy
solves the problem rudimentaryly. But what I have written in 1 or 3 are unwanted facts, aren't they?
from boogie-friends.
Sorry for the delay. I can reproduce this when I start Emacs in command line mode with term set to xterm-256color
. The details are here. I think number 1 is generally fine; if you pipe into cat
, for example, you'll get no colors. 3 is an issue, which I'll fix ASAP :)
from boogie-friends.
Should be fixed :) Thanks for the report. The issue was that Emacs was using a TTY to talk to dafny-server, instead of a pipe.
from boogie-friends.
Thanks :). I have tried the fixed mode and it works fine.
from boogie-friends.
Wonderful, thanks so much for the report!
from boogie-friends.
Related Issues (20)
- feature request: scope interactive verification, akin to /proc: on the command-line HOT 3
- dafny-mode fails to parse warnings HOT 8
- feature suggestion: parse Dafny/Boogie error strings in M-x compile mode HOT 2
- Flycheck appears to report success when verification times out HOT 6
- Indentation after datatype declaration HOT 1
- Could not start checker for Dafny HOT 13
- Easy way to have flycheck detect that current file is in the Dafny or Boogie test suite? HOT 2
- Flycheck ignores Boogie errors if they lack proper location information HOT 4
- Extract proper filename for flycheck on related locations in refining modules
- Move temporary file for current buffer outside current folder HOT 10
- flycheck syntax checker doesn't work in Emacs on Mac OS X 10.10, suspicious state from syntax checker dafny HOT 2
- Strange indentation/whitespace in Boogie mode HOT 2
- Auto-formatting in calc
- Bug: Flycheck & Compilation cannot find .NET Core on Mac OS 11.6 HOT 5
- forall statement visually looks like forall expression
- When using `include`, helpful "this is the precondition that might not hold" information is missing from flycheck errors HOT 1
- Consider documenting the value of /printTooltips HOT 1
- Flycheck seems to report success when error is in included file HOT 5
- indentation of case with dafny-mode in emacs HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from boogie-friends.