Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preview (VSCode) spins forever when NativeFileDialog.jl is used. #283

Open
nathanrboyer opened this issue Mar 17, 2025 · 4 comments
Open

Comments

@nathanrboyer
Copy link

nathanrboyer commented Mar 17, 2025

This .qmd file works if I "Run Cell" sequentially, but it spins forever (>2 days) if I try to render the document using the VSCode Preview button. Sometimes the file dialog will appear and let me select a file (usually after a computer restart), but in either case, there is no activity in terminal or on screen after:

$ quarto preview "s:/Julia/Design Report Pages/test.qmd" --no-browser --no-watch-inputs
Starting julia control server process. This might take a while...
Julia server process started.
Running [1/3] at line 8:  using NativeFileDialog
Running [2/3] at line 12:  file = pick_file()
---
title: "Test"
engine: julia
execute:
    echo: false
---

\```{julia}
using NativeFileDialog
\```

\```{julia}
file = pick_file()
\```

\```{julia}
basename(file)
\```
@jkrumbiegel
Copy link
Collaborator

The render workflow is not meant for interaction so I'm not surprised if things break. When you do Run Cell, you're executing code in some REPL, that's quite different. But in principle, we are not doing anything in particular on the QuartoNotebookRunner side that would prohibit this. Can you reproduce the issue in a normal julia process running a .jl file (not interactive via REPL)?

@nathanrboyer
Copy link
Author

nathanrboyer commented Mar 18, 2025

Sorry for the delay. The test worked fine for me in a script.

using NativeFileDialog
file = pick_file()
println(basename(file))
$ julia --project=. test.jl
  Activating project at `S:\Julia\Design Report Pages`
VectorPrincipalStress.xls

I'm looking for a way to load data from file for a Quarto report without having to manually type the paths. (I will have other users making reports, and paths are tricky on Windows, where you have to escape the \ or use a raw string.) I typically use NativeFileDialog.jl for my data loading functions.

@MichaelHatherly
Copy link
Collaborator

The test worked fine for me in a script.

All cells run within an IOCapture.capture call, so that might be interfering with pick_file somehow.

@MichaelHatherly
Copy link
Collaborator

On macOS for me NativeFileDialog seems to be working alright. Perhaps this is a Windows-specific problem, if that is what you're using @nathanrboyer? (Based on those paths you provided.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants