Repository navigation
headless platform fallback - #257
Open
SimonDanisch wants to merge 2 commits into
Open
SimonDanisch wants to merge 2 commits into
SimonDanisch wants to merge 2 commits into
Conversation
GLFW.jl calls glfwInit() from __init__, so on a machine with no display server -- headless CI, cluster nodes, batch jobs -- merely loading the package (or any package that depends on it) throws an InitError, and it cannot even be precompiled there. Downstream packages get no chance to handle the situation themselves. GLFW 3.4's NULL platform exists for exactly this case and initializes without a display. When the default platform fails and the user has not requested a platform explicitly, retry with PLATFORM_NULL and warn: the package loads, windows cannot be created or shown, and downstream code can detect the state with GLFW.GetPlatform() == GLFW.PLATFORM_NULL. An explicit JULIA_GLFW_PLATFORM is honored as stated: if the requested platform cannot be initialized, loading fails as before rather than being second-guessed. Behavior with a working display is unchanged. Fixes #169. Addresses the load-time layer of #200 and #253. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Continuation of: #256
May need to be tagged as 4.0, since otherwise Makie will print bogous error messages on some platforms.