You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While it's useful to have this happen automatically, it also makes it difficult to use GLFW in a package that is running on a headless machine and only uses GLFW for a small part of it's functionality. Given that it's just a single call to Init(), would you consider removing it from __init__?
The text was updated successfully, but these errors were encountered:
Removing Init in __init__ would be a breaking change from a semantic versioning perspective, and I'm reluctant to do that (right now). However, I don't want to totally dismiss this issue either. Some ideas:
Apps and packages could avoid importing GLFW.jl for their code paths that do not use it.
GLFW.jl could avoid calling Init in __init__ if it detects the presence of some global symbol or environment variable.
GLFW.jl could remove the call to Init in __init__, but automatically call Init the first time some other function is executed, thereby preserving compatibility with existing apps or packages that will not call Init themselves.
Option 3 seems quite sensible. We do something similar in MATLAB.jl with regards to initialization, whereby we only initialize code after an appropriate constructor is called for the first time.
While it's useful to have this happen automatically, it also makes it difficult to use GLFW in a package that is running on a headless machine and only uses GLFW for a small part of it's functionality. Given that it's just a single call to
Init()
, would you consider removing it from__init__
?The text was updated successfully, but these errors were encountered: