-
Notifications
You must be signed in to change notification settings - Fork 39
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
Can't precompile without a display #219
Comments
I've wondered about that. But how would you use it without a display? |
Looking at the stacktrace, the error is thrown from Gtk's |
I've SSHed into a cluster from VS Code to use Julia, and get the same error. It is because GTK is checking the number of displays only on the remote node instead of my local device. |
This is an issue for myself as well. When using VSCode remote desktop ssh'd into a headless server I'm unable to use ProfileView because of GTK . |
I think I see a path to get precompiling to not fail (or at least fail silently) without a display, by allowing the call of Even if precompilation didn't error out on a headless server, GTK-based code isn't going to work through ssh without setting up something like X forwarding. Unless I'm missing something? Can you use VSCode's built-in |
VSCode's built-in @profview does indeed work for my use case. |
Failing at compile time creates problems for modules that perform image analyses on headless HPC nodes, and also provide methods to visualize data and results with an interactive session. Are properties of the display needed for the compilation to work properly, or is it just checking because a display will be needed later? An error for no display is needed at run time. Perhaps a warning is appropriate at compile time. Dependent ImageView also fails to compile for this reason. |
The most effective technique for precompilation in Julia is using The only solution I see is allowing the Gtk4 check to fail (with a warning to let users know about the danger of calling Gtk4 code) and then in downstream modules, doing precompilation only if initialization succeeded. The cost will be TTFX for those downstream modules (if precompilation was done while e.g. accessing the system through an SSH connection). |
I'm using remote VSCode to a remote ssh backend and trying to precompile ProfileView but it fails with:
Should ProfileView compile when no display is available?
The text was updated successfully, but these errors were encountered: