I’ve created an organization at github for Derelict. Unfortunately, Derelict already exists as a username, so I went with DerelictOrg. At present, I’ve got five repositories set up for DerelictAL, DerelictGL3, DerelictGLFW3, and DerelictPHSYFS, and DerelictUtil. I’ve tested all of them except AL with another project I’m working on and didn’t have any immediate issues other than some refactoring due to the glfw callbacks all being declared as nothrow now.
Most of the source changes are cosmetic, such as changing the alias syntax to the alias= style and other changes to reflect my current D style. It was bothering me to look at my old style. One change that might affect users, as it did me, is that I now make more use of nothrow, adding it to callbacks and function pointers where it was missing. I also have removed the static module destructors from the loader modules.
Calling each loader’s unload method in a module destructor has been the source of the number one issue I’ve heard from new users (they try to call clean up methods in destructors, but at app exit the module destructors are run before the gc cleanup is done, causing access violations because the destructors are calling invalid function pointers). Long ago, when first learning C, I learned that for every load, there is an unload, for every create/new/initFoo, there is a destroy/delete/terminateFoo. I have stuck with that rather religiously ever since. But multiple posts by Walter in the newsgroups over the years coupled with the documentation for the LoadLibrary and dlopen family of functions have convinced me that, in principle, I can relax and let the operating system clean things up in this case (even though it does feel I’m going against my nature). I say “in principle” because it now opens the door for other errors related to the indeterminate state of object destruction that might not be easy to track down. We’ll see.
The biggest change is that are no build scripts. All Derelict packages now rely solely on dub. If you are currently using dub for a project along with one or more of the Derelict packages I’ve moved to DerelictOrg, please give it a try and let me know. I’ve tagged a couple of the packages with a 0.9.x version, but that was just experimentation. When listing dependencies, for now use “~master”. The package names are derelict-al, derelict-gl3, derelict-glfw3 and derelict-physfs. There is also a derelict-util package, but you don’t need to list that directly since each of the other packages already list it as a dependency. Also, I wouldn’t recommend using this in tandem with the existing “derelict” package and its subpackages. I don’t thing that’s going to work.
If you’re using a package that hasn’t been moved over yet, please be patient. I’ll be getting them all eventually. Next on the todo list is DerelictSDL2, since that’s a fairly commonly used package. The others will follow in due course.
Once I’m confident that everything works as expected, I’ll tag each package with a 1.0.0. Then it will be easy to always stay up to date with the latest version of whichever Derelict packages you use, courtesy of dub.