Conversation
|
A few more materials:
On establishing connection Content-Length: 85
{ "jsonrpc": "2.0", "id": 1, "method": "initialize","params": { "processId": null}}On Viper program creation/updates Content-Length: 173
{ "jsonrpc": "2.0", "method": "textDocument/didOpen","params": { "textDocument": { "languageId": "viper","version": 0,"uri": "file:///Users/ggreif/motoko/post-fail.vpr"}}}
Content-Length: 137
{ "jsonrpc": "2.0", "method": "textDocument/didSave","params": { "textDocument": {"uri": "file:///Users/ggreif/motoko/post-fail.vpr"}}}Asking for verification Content-Length: 274
{ "jsonrpc": "2.0", "id": 1, "method": "Verify","params":{"uri":"file:/Users/ggreif/motoko/post-fail.vpr","backend":"silicon","customArgs":"--z3Exe /nix/store/3dpbapw0ia9q835pqbf7khdi9rps2rm2-z3-4.8.15/bin/z3 /Users/ggreif/motoko/post-fail.vpr","manuallyTriggered":false}}Here You may get a request asking for file endings ( Content-Length: 66
{ "jsonrpc": "2.0", "id": 1, "result":{"fileEndings":["*.vpr"]}}A You'll see something like this: {"jsonrpc":"2.0","method":"StateChange","params":{"newState":6,"progress":-1.0,"success":4,"verificationCompleted":1.0,"manuallyTriggered":1.0,"filename":"post-fail.vpr","time":3.346,"verificationNeeded":-1.0,"uri":"file:///Users/ggreif/motoko/post-fail.vpr","error":"","diagnostics":[{"range":{"start":{"line":3,"character":12},"end":{"line":3,"character":17}},"severity":1,"source":"","message":"Postcondition of bar might not hold. Assertion foo() might not hold. (post-fail.vpr@4.13--4.18)"}]}} |
|
Btw. If you start |
| "compile": "rimraf ./out && tsc -p .", | ||
| "vscode:prepublish": "npm run generate && npm run compile", | ||
| "generate": "npm run download && cd ../motoko && nix-shell --command 'make -C src moc.js' && cp -vL src/moc.js ../vscode-motoko/src/generated", | ||
| "download": "curl -L -o src/generated/viperserver.jar https://github.com/viperproject/viperserver/releases/download/v-2022-10-18-0728/viperserver.jar -C -", |
There was a problem hiding this comment.
You can use $VIPER_SERVER in the first place.
There was a problem hiding this comment.
Good idea; now using the Nix environment for the stand-in portable build logic.
|
Progress:
In this screenshot, the |
|
While installing the extension from this branch, I've experienced the following minor hick-ups:
The rest of the instructions worked out nicely! PS. I ran |
|
Also, one probably needs |
An you mean create (not run) src/generated. |
Fixed; thanks! |
by adding more commands
* Bump compiler version * Patch viperTools path for WSL environment * 0.0.4 * Remove unused import * 0.1.0
…esting (#281) * first * Use built-in 'moc.js' * Reduce diff * Bump version * Bump 'motoko' npm package --------- Co-authored-by: rvanasa <ryan.vandersmith@dfinity.org>

VS Code support for caffeinelabs/motoko#3477.
moc.js(rather than the OCaml LSP) to generate Viper files.mocordfxinstallation.// @verifyat the top of a Motoko file.Example (
Main.mo):Generated file (
Main.vpr):Recommended editor workflow using split-screen tabs (updates as you type):
Steps to build the extension:
motokoandvscode-motokoare in the same parent directoryryan/viperbranch in the Motoko compiler repositorycd vscode-motokoand thennpm run package(this will rebuildmoc.js)/vscode-motoko-*-viper.vsixfile and select "Install extension VSIX"Progress:
Pipeline.viper_files