Open sebibek opened 10 months ago
Open Julia and type:
julia> import Pkg
julia> Pkg.activate(temp=true)
julia> Pkg.add(url="https://github.com/sebibek/Pluto.jl", rev="vscode-webview-proxy")
julia> using Pluto
Currently, the UI is coming up, but no notebook cells visible. TBH, I don't get it, so feel free to take over or close this PR!
Maybe the failing frontend tests can help you debug? It looks like the frontend tests never manage to open a notebook. You can see this by running the tests locally (check out tests/frontend/README) or the screenshots generated by the GHA
test-screenshot-artifacts (4).zip
Did you try to just run Pluto normally (without vscode) using this branch?
Did you try to just run Pluto normally (without vscode) using this branch?
Yes, this worked on fonsp:vscode-webview-proxy, as well (so I assumed this should work here, too). Will try the frontend tests you mentioned, thx ๐ฏ .
edit: I noticed that the previews open as expected, soon as I hit "Edit or run..", it goes back to the "Loading"-screen.
I could only find out so much:
When the frontend opens, this is logged in the JS console, so:
// let's say hello
console.log("Hello?")
const u = await send("connect", {}, connect_metadata) // HERE IS THE BUG
console.log("Hello!")
never succeeds.
๐ฏ Main theme: Updating the VSCode webview proxy and making various improvements and fixes across the codebase.
๐ PR summary: This PR updates the VSCode webview proxy to version 0.19.32 and includes a wide range of improvements and fixes. These include refactoring and enhancing the handling of package contexts, updating registry caches, modifying compatibility entries, and improving error handling. The PR also includes changes to the frontend components and tests.
๐ Type of PR: Enhancement
๐งช Relevant tests added: No
โฑ๏ธ Estimated effort to review [1-5]: 4, because the PR includes a large number of changes across multiple files, including both backend and frontend. The changes are complex, involving updates to core functionalities and require a deep understanding of the codebase to review effectively.
๐ก General suggestions: The PR includes a wide range of improvements and fixes which are generally well-implemented. However, it would be beneficial to split such a large PR into smaller, more manageable PRs, each focusing on a specific issue or enhancement. This would make the review process more efficient and ensure each change is thoroughly reviewed. Additionally, adding relevant tests for the new changes would help ensure the stability and reliability of the code.
good news, after resetting the frontend folder by hard-copying, I managed to get Pluto to start up from a separate dev environment. notably, changes like these were needed (to Editor.js):
if (await confirm("This cell is still running - would you like to interrupt the notebook?")) {
(since create_alert_confirm
in alert_confirm.js returns Promises)
also:
create_vscode_connection
opts to use base64_arraybuffer
now:
const buffer = await base64_arraybuffer(raw.base64_encoded)
PlutoConnection.js and Editor.js were the pain points that needed manual merges. I somehow need to test if the vscode integration still works, I didn't find that out yet... edit: maybe this eases reviewing: https://github.com/fonsp/Pluto.jl/compare/main...sebibek:Pluto.jl:vscode-webview-proxy?expand=1
For the record: I created the file use_local_pluto.txt as mentioned here and with minor modifications, I could get it to launch. Sadly, no file is opened but rather the screen stays loading, while the backend (URL) functions.
@pankgeorg to conclude: I managed to get Pluto to work again, but I struggle testing it using the https://github.com/JuliaComputing/pluto-vscode repo. In my case, the backend URL functions perfectly fine, but in vscode it just hangs at the "Loading" page. Pls try it if you want, or close the PR! An idea for reviewing changes could be: https://github.com/fonsp/Pluto.jl/compare/main...sebibek:Pluto.jl:vscode-webview-proxy?expand=1 (maybe something is missing)
The vs code proxy is currently sitting at Pluto v0.17.3, update to 0.19.32! (I'm using it :)