-
Install the extension, fully close and open vscode.
cd extension code --uninstall-extension paperproof.paperproof || true code --install-extension paperproof.vsix
-
Go to your vscode settings, and change your
Paperproof: Environment
setting to"Development"
. -
Start watching your changes.
cd app yarn install yarn server yarn watch
That's it! You can check that everything works by going to /Examples.lean
, and opening the Paperproof panel by clicking on a piece of a crumpled paper:
You can now change any piece of code within the /app
folder, and the changes will be built automatically. To see those changes in the webview, you will need to run Cmd+Shift+P "Developer: Reload Webviews".
If you change something it /extension
, or in /lean
, seeing the updates is more involved, and that's described in the next section.
If you change something in the /app
folder, wait for yarn watch
to compile it, and run Cmd+Shift+P > Developer: Reload Webviews
.
If you change something in the /extension
folder, run
cd extension
vsce package --out paperproof.vsix --no-yarn
code --uninstall-extension paperproof.paperproof || true
code --install-extension paperproof.vsix
and restart vscode (literally - quit it fully, and open it again).
ATTENTION: if paperproof webview doesn't respond to .postMessage(...)
calls, AND you have the OUTPUT pane open - close it, and it should start working. It's just some weird vscode glitch.
If you change something in the /lean
folder, then go to the file where you're checking your code, usually it's Examples.lean
, and run Cmd+Shift+P > Lean 4: Refresh File Dependencies
.
Deploying our main
branch consists of 2 steps - publishing a new vscode extension, and publishing a new Paperproof Lean library.
To deploy a vscode Paperproof extension:
- Login into vsce
vsce login paperproof
You will need the Personal Access Token for the paperproof organisation to do this (please ask Evgenia or Anton if you need access).
- Build and publish
vsce publish patch --no-yarn
This will autoincrement the /extension/package.json
version, and publish the extension on https://marketplace.visualstudio.com/items?itemName=paperproof.paperproof.
Possible increment options are major
, minor
, and patch
.
To publish a new Paperproof Lean library, we just push to github.com/Paper-Proof/paperproof main
branch, the changes will be picked up automatically.
lean/
- defines the custom Lean server method which parses the InfoTree into appropriate format for visualization.app/
- contains a simple server and the browser app which renders the proof tree.extension/
- contains the VSCode extension which queries the Lean server method defined inlean/
each time the cursor position changes and sends the proof tree to the browser app defines inapp/
.Examples.lean
- contains example theorems and can be used for testing.