feat: add Waterproof bundle support - #47
Closed
GitLuckier wants to merge 1 commit into
Closed
GitLuckier wants to merge 1 commit into
GitLuckier wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR ended up somewhat larger than I originally expected, sorry about that.
Getting Waterproof bundles working exposed a few more general issues with building on Windows and computing import-closure, so I fixed those along the way.
--waterproofoption.injecting a local VSIX build with
--waterproof-vsix.--waterproof-version.--allow-unsolvedfor proof-sheet with incomplete exercises.longer need to be installed on the build machine.
builds to run on their respective platforms.
leanc.exeto compile the Windows git shim,so no separate C compiler is needed.
testing and adding a progress indicator.
hashes in
--ref, safer work-directory cleanup through--clean-work-dir,and better handling of Windows paths.
--open-fileso that an explicitly selected file is opened only onthe first launch. When it is omitted, only the workspace is opened.
the current limitations.
installation, and import-closure implementation.
Validation
fresh Linux Mint virtual machine.
Trying it
On the operating system you want to target, run
python3 bundle.py https://github.com/impermeable/introduction-to-proof-sheets-lean --ref e62b9166113d3f48b82a09bd5e728fbd779608cc --vscodium-version 1.126.04524 --waterproof-version 0.12.0 --allow-unsolved.Then unzip the generated bundle and launch
Start_Lean. Omit the three versionpins to use the latest versions, or replace
--waterproof-versionwith--waterproof-vsix PATHto test a local extension build.Known limitations
.leanfile in theWaterproof editor on first launch. On a cold start, VSCodium instead opens
the file in the normal text editor. The CLI therefore rejects the combination
of
--waterproof,--platform windows, and--open-file. This appears to berelated to VS Code issue #325506.
results are not cached yet. In hindsight, implementing caching earlier would
have saved me quite a few lengthy rebuilds.
Notes on AI use
Like the original bundle, this was developed with the assistance of LLMs. I
reviewed the resulting diff and manually tested the scenarios described above,
but I have not "re-derived" every implementation-detail.