Developers guide
Checklists for developing new things in Magnum itself.
Contents
- Checklist for adding / removing a library
- Checklist for adding / removing an application library
- Checklist for adding / removing a plugin
- Checklist for adding / removing a plugin interface
- Checklist for adding / removing a tool
- Checklist for adding / removing an example
- Checklist for adding / removing a new source / header file
- Checklist for adding / removing a symbol
- Checklist for adding a new CMake documentation page
- Checklist for deprecating a feature
- Checklist for removing a feature
- Checklist for adding / removing GL versions and extensions
- Checklist for adding / removing GL functionality
- Checklist for adding / removing a driver workaround
- Checklist for adding, removing or updating a dependency
- Checklist for adding or removing a port
- Checklist for updating the bootstrap repo
- Checklist for updating copyright year
- Checklist for uploading documentation
- Checklist for merging a PR
- Checklist for making a release
This guide is meant mainly for core Magnum developers to avoid forgetting about things. If you are contributing a pull-request, you can use these checklists as a guide and save the maintainers a bit of work — but you are not strictly required to follow them to the point.
Checklist for adding / removing a library
- Add a
WITH_LIBRARYNAMECMake option to:- root
CMakeLists.txt(if it has some inter-library dependencies, update the others / convert them tocmake_dependent_option(), addingNOT WITH_LIBRARYNAMEto their condition — note the conditions are ANDed so they need to be specified in reverse) - the list in
doc/building.dox(and similar files in other repos)
- root
- Update
FindMagnum.cmake(or similar in other repos):- mention the new lib in the list of components in the docs
- if it has some inter-library dependencies, add a corresponding
_MAGNUM_Component_DEPENDENCIESentry - add its name to the
_MAGNUM_LIBRARY_COMPONENT_LISTlist - add a new
elseif(_component STREQUAL LibraryName)section with special setup of includes or dependencies or explicitly say# No special setup for LibraryName library
- Add the library to the list in
doc/cmake.dox(or similar files in other repos) - Add a conditional
add_subdirectory()tosrc/Magnum/CMakeLists.txt - Create a new
src/Magnum/LibraryName/CMakeLists.txt, copy over up-to-date license header from other CMake files, add your name to it and populate it:- add source files to
MagnumLibraryName_SRCSvariable - add installable headers to
MagnumLibraryName_HEADERSvariable - add private headers to
MagnumLibraryName_PRIVATE_HEADERSvariable (if any) - if the test needs some extra setup (such as e.g.
CORRADE_NO_ASSERTenabled for particular files), create a newMagnumLibraryNameObjectsOBJECTlibrary with files that can be compiled the same way in both cases to speed up compilation - verify that the
add_library()command references all input files (needed so QtCreator lists all project files properly) - verify that debug postfix is set (
set_target_properties(MagnumLibraryName PROPERTIES DEBUG_POSTFIX "-d")) - verify that folder is set for all libraries and
OBJECTlibraries to avoid cluttering project tree view in IDEs (set_target_properties(MagnumLibraryName PROPERTIES FOLDER "Magnum/LibraryName")) - verify that target installation is done in proper places (separate
RUNTIME/LIBRARY/ARCHIVEdestinations) - verify that
set_target_properties(MagnumLibraryName PROPERTIES VERSION ${MAGNUM_LIBRARY_VERSION} SOVERSION ${MAGNUM_LIBRARY_SOVERSION})is done in caseBUILD_STATICis not set - verify that
set_target_properties(MagnumLibraryName PROPERTIES POSITION_INDEPENDENT_CODE ON)is done in caseBUILD_STATIC_PICis set - verify that
add_library(Magnum::LibraryName ALIAS MagnumLibraryName)(or equivalent) is added to make the library visible for CMake subprojects
- add source files to
- Create a new
src/Magnum/LibraryName/Test/directory:- add a
CMakeLists.txtwith pre-populated license header, add your name to it - conditionally
add_subdirectory()it ifBUILD_TESTSis enabled
- add a
- Create a new
src/Magnum/LibraryName/LibraryName.hheader for forward declarations (if needed), add a file-level doc block withForward declarations for the @ref Magnum::LibraryName namespaceas brief docs - Create a new
src/Magnum/LibraryName/visibility.hheader withMAGNUM_LIBRARYNAME_EXPORTandMAGNUM_LIBRARYNAME_LOCALmacros by copypasting it from another library:- adapt
#ifdef MagnumLibraryName_EXPORTSso it matches CMake target name - if the library is combined from an
OBJECTlibrary, add its name to the above#ifdefas well (and then explicitly addtarget_compile_definitions(MagnumLibraryNameObjects PRIVATE "MagnumLibraryNameObjects_EXPORTS")toCMakeLists.txtin caseBUILD_STATICis not set)
- adapt
- Mention the directory and namespace in
doc/namespaces.dox, basically copy-pasting the following from existing documentation:- directory-level doc block referencing the namespace
- namespace-level doc block mentioning the
WITH_LIBRARYNAMEoption, dependencies (if any) and a code snippet showing how to use it with CMake
- Code and test the rest of the library, see Checklist for adding / removing a new source / header file and Checklist for adding / removing a symbol for more information
- Add the
WITH_LIBRARYNAMEoption to all files inpackage/directory, explicitly saying eitherONorOFFbased on platform support:- all
package/archlinux/PKGBUILD*files (and the AUR package(s)) - the
package/debian/rulesfile (watch out, tabs!) - the
package/gentoo/*.ebuildfile - the
package/homebrew/*.rbfile (watch out, Ruby!) - all
package/ci/appveyor-*.batfiles (^is a line continuation) - all
package/ci/travis-*.shfiles (\is a line continuation)
- all
- If the library has dependencies:
- make sure they are mentioned in the library documentation
- make sure they are mentioned in building and CMake docs
- make sure they are mentioned in
CREDITS.md - make sure AppVeyor and Travis downloads them (based on platform support)
- Mention the library in
doc/changelog.dox(or similar files in other repos) - Build documentation:
- run dox2html5.py on
Doxyfile-mcssand verify there are no new warnings - eyeball the namespace and directory docs, fix suspicious things, look also in the building and cmake docs
- run dox2html5.py on
- Build a coverage build (
package/archlinux/PKGBUILD-coverage), or abuse the CI for that later - Push to a temporary branch (e.g.,
next) - Iterate until the CIs are green and the code coverage is good enough
- Merge to
master
In order to remove a library, be sure to touch all places mentioned above, only in inverse — but usually deprecate first.
Checklist for adding / removing an application library
Similarly to Checklist for adding / removing a library except points 2 and 5, with:
- Update
FindMagnum.cmake(replaces point 2 in Checklist for adding / removing a library):- mention the new lib in the list of components in the docs
- add its name to the
_MAGNUM_LIBRARY_COMPONENTSregex - add a new
elseif(_component STREQUAL ApplicationName)section with special setup of includes or dependencies or explicitly say# Name application has no additional dependencies
- Add a condition to
src/Magnum/Platform/CMakeLists.txt:- add the source file to
MagnumApplicationName_SRCSvariable - add the installable header to
MagnumApplicationName_HEADERSvariable - add a
STATICMagnumApplicationNamelibrary, verify that theadd_library()command references all input files (needed so QtCreator lists all project files properly) - verify that debug postfix is set (
set_target_properties(MagnumApplicationName PROPERTIES DEBUG_POSTFIX "-d")) - verify that folder is set to avoid cluttering project tree view in IDEs (
set_target_properties(MagnumApplicationName PROPERTIES FOLDER "Magnum/Platform")) - verify that target installation is done in proper places (separate
RUNTIME/LIBRARY/ARCHIVEdestinations) - verify that
add_library(Magnum::ApplicationName ALIAS MagnumApplicationName)is added to make the application visible for CMake subprojects
- add the source file to
- If desired, provide a new bootstrap project:
- new
base-applicationnamebranch, forked from some_modules_*branch, with the rest copied from a subset of e.g. thebasebranch - update
README.mdin master, mentioning this - update
package/cifiles to build this project (probably a new matrix entry)
- new
- Mention the bootstrap project in the class documentation
- Mention all extra files and setup in the class documentation
In order to remove an application library, be sure to touch all places mentioned above, only in inverse — but usually deprecate first.
Checklist for adding / removing a plugin
Similarly to Checklist for adding / removing a library except points 2 and 5, with:
- Update
FindMagnumPlugins.cmake(orFindMagnum.cmakein the core repo) (replaces point 2 in Checklist for adding / removing a library):- mention the new plugin in the list of components in the docs
- add its name to the
_MAGNUMPLUGINS_PLUGIN_COMPONENT_LISTlist - add a new
elseif(_component STREQUAL PluginName)section with special setup of includes or dependencies or explicitly say# PluginName has no dependencies
- Create
PluginName.confand list all plugin dependencies (if any). The file has to be present even if empty. - Create
importStaticPlugin.cppby copypasting it from another plugin and adapting plugin name. This will get installed along with plugin headers to aid with automatic import. - Create
configure.h.cmakefor plugin-specific information about whether the library was built as static or not - Create a new
src/MagnumPlugins/PluginName/CMakeLists.txt, copy over up-to-date license header from other CMake files and populate it (replaces point 5 in Checklist for adding / removing a library):- add source files to
PluginName_SRCSvariable - add installable headers to
PluginName_HEADERSvariable - add private headers to
PluginName_PRIVATE_HEADERSvariable (if any) - use
add_plugin()command (which is aliased to either corrade_add_ plugin() or corrade_ add_ static_ plugin()) to create the PluginNamelibrary, use${MAGNUM_PLUGINS_*_DEBUG_BINARY_INSTALL_DIR}/${MAGNUM_PLUGINS_*_RELEASE_BINARY_INSTALL_DIR}and${MAGNUM_PLUGINS_*_DEBUG_LIBRARY_INSTALL_DIR}/${MAGNUM_PLUGINS_*_RELEASE_LIBRARY_INSTALL_DIR}variables that correspond to given plugin interface - verify that both
add_library()andadd_plugin()commands reference all input files (needed so QtCreator lists all project files properly) - verify that folder is set for all other targets to avoid cluttering project tree view in IDEs (
set_target_properties(PluginExtraTarget PROPERTIES FOLDER "MagnumPlugins/PluginName")) — for the plugin library it's done automatically insideadd_plugin() - verify that
set_target_properties(PluginName PROPERTIES POSITION_INDEPENDENT_CODE ON)is done in caseBUILD_STATIC_PICis set - verify that in case of
BUILD_PLUGINS_STATICtheimportStaticPlugin.cppfile is installed is set and that an absolute* path to it is added totarget_sources() - verify that
add_library(MagnumPlugins::PluginName ALIAS PluginName)(or equivalent) is added to make the library visible for CMake subprojects
- add source files to
- If there is more than one interface header (other than just
PluginName.hbeing installed), add a newvisibility.hheader. Otherwise put the visibility macros directly inPluginName.h. - If the plugin handles a new format:
- if the plugin is not named directly after the format, add an alias to it (for example the MiniExrImageConverter plugin is aliased to
OpenExrImageConverter) - update the AnyImageImporter, AnySceneImporter, AnyImageConverter or AnyAudioImporter plugins to delegate to this plugin (or its alias) upon encountering corresponding file extension
- if the plugin is not named directly after the format, add an alias to it (for example the MiniExrImageConverter plugin is aliased to
In order to remove a plugin, be sure to touch all places mentioned above, only in inverse — but usually deprecate first.
Checklist for adding / removing a plugin interface
In order to remove a plugin interface, be sure to touch all places mentioned above, only in inverse — but usually deprecate first.
Checklist for adding / removing a tool
In order to remove a tool, be sure to touch all places mentioned above, only in inverse — but usually deprecate first.
Checklist for adding / removing an example
- Add a
WITH_EXAMPLENAME_EXAMPLECMake option to:- root
CMakeLists.txt - the list in
doc/building-examples.dox
- root
- Add a new
src/example-namedirectory, copy up-to-date UNLICENSE headers from other files in the repo - Verify that
src/example-name/CMakeLists.txtcontainscmake_minimum_required(),project()and allcmake_policy()commands so it can be used as a top-level project level - If the example needs extra code to run on non-desktop platforms (and running on non-desktop platforms is not the primary goal), consider moving them to the
portsbranch to keep code inmasteras simple as possible - Add a new
doc/example-name.doxpage with@brief,@m_footernavigationand@pagename equivalent to filename - Add a new
doc/example-name.pngimage, scaled down to 400x300 from 800x600, reference it as@image html example-name.pngfrom the*.doxfile - In case there's a web demo, add a button link to it (copy over other example pages and adapt)
- Add a new
examples-examplename-sourcesection with:- link to GitHub
- referencing all textual example sources as
- @ref example-name/file.ext "file.ext" - breadcrumb and navigation setup for all example sources as
@example example-name/file.ext @m_examplenavigation{examples-example-name,example-name/} @m_footernavigation
- Update
doc/example-index.doxand list the example there, optionally adding a badge to advertise the web demo - Mention the example in
doc/changelog-examples.dox - Push to a temporary branch (e.g.,
nextorports-next) - Iterate until the CIs are green
- Merge to
master/ports
In order to remove an example, be sure to touch all places mentioned above, but in inverse.
Checklist for adding / removing a new source / header file
- Copy over a up-to-date license header (note that example code uses UNLICENSE instead of MIT) and add your name + year to it, if not already there
- Add a
@file-level documentation block, with@brieflisting all classes, functions, typedefs, enums, macros etc. that are in the file - Add the file to corresponding
*_SRCS,*_HEADERS,*_PRIVATE_HEADERSlist inCMakeLists.txt - If applicable, add a new test class file in the
Test/directory- name it
FileNameTest.cpp, put a class namedFileNameTestinside, wrapped in aTestsubnamespace of the original file namespace - use
corrade_add_test()to add it to tests - if some tests need GL context, add a separate test with
GLTestsuffix, wrapping the correspondingcorrade_add_test()inif(BUILD_GL_TESTS)
- name it
- Populate the file, see Checklist for adding / removing a symbol and Coding style for more information.
- Mention the new functionality in
doc/changelog.dox(and similar files in other repos) - Build documentation:
- run dox2html5.py on
Doxyfile-mcssand verify there are no new warnings - eyeball the relevant docs and fix suspicious things
- run dox2html5.py on
- Build a coverage build (
package/archlinux/PKGBUILD-coverage), or abuse the CI for that later - Push to a temporary branch (e.g.,
next) - Iterate until the CIs are green and the code coverage is good enough
- Merge to
master
In order to remove a file, be sure to touch all places mentioned above, only in inverse — but usually deprecate first.
Checklist for adding / removing a symbol
- If the symbol is standalone (i.e., not member of a class), list it in the
@file-level@briefdocs - Document it
- Add a test for it to corresponding file, verify the test gets actually run
- Mention the new functionality in
doc/changelog.dox(and similar files in other repos) - Build documentation:
- run dox2html5.py on
Doxyfile-mcssand verify there are no new warnings - eyeball the relevant docs and fix suspicious things
- run dox2html5.py on
- Build a coverage build (
package/archlinux/PKGBUILD-coverage), or abuse the CI for that later - Push to a temporary branch (e.g.,
next) - Iterate until the CIs are green and the code coverage is good enough
- Merge to
master
In order to remove a symbol, be sure to touch all places mentioned above, only in inverse — but usually deprecate first.
Checklist for adding a new CMake documentation page
- Add a
doc/pagename.doxfile, copy up-to-date license header and add your name + year to it, if not already there - If the page is top-level, list it in
doc/00-page-order.doxto ensure it gets listed at a proper place - If the page is not top-level, list it using
@subpagein its parent page and add@m_footernavigationfor automatic linking to parent and prev/next pages - Add a
@briefdocumentation, if applicable - Populate it, see Coding style for more information
- Mention the new page in
doc/changelog.dox(and similar files in other repos) - Build documentation:
- run dox2html5.py on
Doxyfile-mcssand verify there are no new warnings - eyeball the relevant docs and fix suspicious things
- run dox2html5.py on
- Push to
master
Checklist for deprecating a feature
- If the feature is publicly exposed, think about the best way of deprecation that preserves source compatibility:
- Add a compatibility
typedef/usingfor a renamed symbol, marking it with CORRADE_DEPRECATED() / CORRADE_ DEPRECATED_ ALIAS() - Add a compatibility header for a renamed include, including the original file from it and marking it with CORRADE_
DEPRECATED_ FILE() - Add a compatibility inline function for a function that got renamed or its arguments changed, mark it with CORRADE_
DEPRECATED() - Add a compatibility enum value for a value that got renamed or deleted, mark it with CORRADE_
DEPRECATED_ ENUM() - Don't ever change semantics of function arguments without changing the function signature. That would silently break with no possibility to let the user know.
- Function return type changes are hard. One possibility is working around that by returning a wrapper type that's implicitly convertible to both the old and new type, another is introducing a differently named function instead. The last resort is breaking the API without preserving backwards compatibility — but that makes people angry, so avoid that if possible.
- Add a compatibility
- Add just a
@brief @copybrieffrom the replacement functionality together with a@deprecatedline to the deprecated feature - Reference the replacement functionality in both the deprecation macro and in the
@deprecatedline to make porting easier - Ensure the deprecated symbol is wrapped in
#ifndef MAGNUM_BUILD_DEPRECATED, - Ensure deprecated files
#errorin case they get used in non-deprecated build, ensure they are not installed in non-deprecated builds - Build all tests and dependent projects and verify that:
- using the old functionality still compiles and works as intended
- deprecation warnings are emitted in proper places
- Upon verifying the above, start updating dependent code
- Mention the deprecated API in the deprecation section of
doc/changelog.dox(and similar files in other repos) - Build documentation:
- run dox2html5.py on
Doxyfile-mcssand verify there are no new warnings - eyeball the relevant docs and fix suspicious things
- run dox2html5.py on
- Push to a temporary branch (e.g.,
next) - Iterate until the CIs are green
- Merge to
master - If possible, trigger builds of dependent projects (where they are still using the old API) and verify they are still green (and red in non-deprecated build)
- Update dependent projects
Checklist for removing a feature
- Check that it was in deprecated state for more than a year with at least one release in between. Check that no important clients depend on it anymore. If not, wait a bit more.
- Remove relevant blocks wrapped in
#ifndef MAGNUM_BUILD_DEPRECATED, remove relevant deprecated files and updateCMakeLists.txt - Mention the removed API in the compatibility section of
doc/changelog.dox(or similar files in other repos) - Build documentation:
- run dox2html5.py on
Doxyfile-mcssand verify there are no new warnings — sometimes it happens that a deprecated API is still being referenced
- run dox2html5.py on
- Push to a temporary branch (e.g.,
next) - Iterate until the CIs are green
- Merge to
master - If possible, trigger builds of dependent projects and verify they are still green (or wait for the scheduled builds)
Checklist for adding / removing GL versions and extensions
- Install flextGL
- Go to
src/MagnumExternal/OpenGL/GL/:- Update
extensions.txt(bump a version or add/remove extensions) - Run
.../flextGLgen.py -D . -t . extensions.txtto generateflextGL.h,flextGL.cppandflextGLPlatform.cppfiles
- Update
- Go to
src/MagnumExternal/OpenGL/GLES2/:- Update
extensions.txtandEmscripten/extensions.txt(add/remove extensions) - Run
.../flextGLgen.py -D . -t . extensions.txtto generateflextGL.h,flextGL.cpp,flextGLPlatform.cpp,flextGLWindowsDesktop.h,flextGLWindowsDesktop.cpp,flextGLPlatformWindowsDesktop.cppandflextGLPlatformIOS.cppfiles. Desktop GLES on Windows still links to the ancientopengl32.dllwhich exports only OpenGL 1.1 symbols, so we have a special set of headers that queries pointers for everything above OpenGL 1.1 (instead of everything above OpenGL ES 2.0). iOS, on the other hand, doesn't have any extension loader mechanism and all supported entrypoints are exported from the library, so we set the function pointers to those exported symbols in case the system GL header defines them. - Run
.../flextGLgen.py -D . -t Emscripten/ Emscripten/extensions.txtto generate a stripped-downflextGLEmscripten.hfile. Emscripten doesn't have the ability to manually load extension pointers, thus it has only header files.
- Update
- Go to
src/MagnumExternal/OpenGL/GLES3/:- Update
extensions.txtandEmscripten/extensions.txt(bump a version or add/remove extensions) - Run
.../flextGLgen.py -D . -t . extensions.txtto generateflextGL.h,flextGL.cpp,flextGLPlatform.cpp,flextGLWindowsDesktop.h,flextGLWindowsDesktop.cpp,flextGLPlatformWindowsDesktop.cppandflextGLPlatformIOS.cppfiles. See above why there are so many. - Run
.../flextGLgen.py -D . -t Emscripten/ Emscripten/extensions.txtto generate a stripped-downflextGLEmscripten.hfile. See above for details.
- Update
- Check
git difffor suspicious changes and whitespace-at-EOL - For every new added function, add an entry to
doc/opengl-mapping.dox - For every new added limit query (various
GL_MIN_*andGL_MAX_*macros etc.), add an entry to the bottom ofdoc/opengl-mapping.dox - Add a table listing the new version and all new extensions in it to
doc/opengl-support.dox(take a list of them from the changelog in the official spec PDF). Some extensions might be already present in the general extension list, move them out of there - Add a new
requires-glXY,requires-glesXYorrequires-webglXYpage with@m_footernavigationtodoc/opengl-support.dox, mention it as a@subpageat a correct position in the list - Add a new
requires-glXY,requires-glesXYorrequires-webglXYalias toDoxyfile,Doxyfile-mcssandDoxyfile-public, copypaste it from existing and change the numbers - Add new version enum value:
- to
src/Magnum/GL/Version.h - to debug output in
src/Magnum/GL/Version.cpp - to GL::
Extension:: extensions() in src/Magnum/GL/Context.cpp - to
GL::Context::tryCreate()insrc/Magnum/GL/Context.cpp - to specify GLSL version in
src/Magnum/GL/Shader.cpp - to the list in
src/Magnum/Platform/magnum-gl-info.cpp - to the test in
src/Magnum/GL/Test/ContextTest.cpp
- to
- Add new extensions to
src/Magnum/GL/Extensions.h- order them by extension ID that is mentioned in every extension spec file
- update the numbering to stay monotonic and unique, round up start index of next section to nearest ten to make the updates bearable
- in case there's a lot of new extensions,
Implementation::ExtensionCountmight needed to be increased - run
ContextTestto verify everything is still okay
- Update existing extensions with version in which they become core (last parameter of the
_extension()macro) - Update extension list in
src/magnum/GL/Context.cppaccording to changes insrc/Magnum/GL/Extensions.h
In order to remove GL functionality, be sure to touch all places mentioned above, only in inverse — but usually deprecate first, unless it doesn't affect public API at all.
Checklist for adding / removing GL functionality
- Check if given desktop functionality has equivalent in ES or WebGL, add missing extensions if needed (see Checklist for adding / removing GL versions and extensions)
- Check if there's a DSA / non-DSA way to do the thing. Omit the non-DSA way if all drivers that support given functionality support DSA as well and there's no corresponding non-DSA functionality in ES or WebGL.
- If the functionality uses different entry points / defines on desktop and ES / WebGL platforms, use
#ifdef MAGNUM_TARGET_GLES,#ifdef MAGNUM_TARGET_GLES2and#ifdef MAGNUM_TARGET_WEBGLto cover the differences - If the functionality can use different entry points based on driver capabilities on the same platform (DSA / non-DSA is one of them), add separate code paths:
- new private and
MAGNUM_LOCALthingImplementation*()functions, each implementing one code path, preferrablystatic - a
thingImplementation(member) function pointer insrc/Magnum/Implementation/SomeState.hthat gets populated insrc/Magnum/GL/Implementation/SomeState.cppbased on extension / version availability - a public function, dispatching to
Context::current().state().some->thingImplementationin the implementation
- new private and
- If the functionality is a limit query, add a cache for it:
- a member variable that's either set to
0or Corrade::Containers:: NullOpt in src/Magnum/Implementation/SomeState.cpp - the query first checks for presence of cached value and queries it only if not cached yet
- in case the limit query depends on some extension which might not be available, return some reasonable value (
0) in that case
- a member variable that's either set to
- Implement the functionality (see Checklist for adding / removing a new source / header file, Checklist for adding / removing a symbol)
- Document the functionality
- if important, describe the different code paths (DSA / non-DSA) or functionality fallbacks
- list the DSA / non-DSA distinction among function list in the class-level docs
- a
@seeblock listing GL APIs used with@fn_gl{},@def_gl{}etc., use@fn_gl_keyword{}etc. to expose them in search if desired (see Links to related OpenGL, OpenAL functions and definitions) - list version / extension requirements using
@requires_glXYetc. (see Classes and functions requiring specific OpenGL, OpenAL version or extensions)
- Add the function or limit query to the mapping table in
doc/opengl-mapping.dox, possibly to multiple places - Update relevant extension support in tables in
doc/opengl-support.dox - Mention the new stuff in
doc/changelog.dox - Build documentation:
- run dox2html5.py on
Doxyfile-mcssand verify there are no new warnings - eyeball the relevant docs and fix suspicious things
- run dox2html5.py on
- Build and test for relevant platforms locally (as the public CI can't test GL things yet)
- Push to a temporary branch (e.g.,
next) - Iterate until the CIs are green
- Merge to
master
In order to remove GL functionality, be sure to touch all places mentioned above, only in inverse — but usually deprecate first, unless it doesn't affect public API at all.
Checklist for adding / removing a driver workaround
- Put a descriptive string with even more descriptive comment into the
KnownWorkaroundsarray insrc/Magnum/GL/Implementation/driverSpecific.cpp, ideally reuse some of the already existing vendor prefixes - If the workaround can be tied down to a particular platform / target, add apropriate
#ifdefaround it - Create (or extend) a pair of (member)
privateMAGNUM_LOCAL*Implementation*()functions in the affected class,*ImplementationDefault()having the optimistic default behavior, the other having the workaround. Add the appropriate#ifdefaround, if any. - Add a new (member) function pointer in
src/GL/Implementation/SomeState.hand call it from the affected class instead of executing the implementation directly. Add the appropriate#ifdefaround, if any. - Add a branch into
src/GL/Implementation/SomeState.cpp(with appropriate#ifdefaround, if any). First check for driver and other circumstances and call the!context.isDriverWorkaroundDisabled("the-workaround-string")last after you are really sure you need to use it — calling this function will append the workaround string to the engine startup log and it's not desirable to list workarounds that weren't used. - Test the affected functionality with the workaround enabled and verify it works
- Disable the workaround using
--magnum-disable-workaroundson command-line and verify it's still broken — if not, there's something off! - Add a changelog entry.
- Verify the driver workaround is listed in the snippet in Driver workarounds
Removeing a workaround is simply a matter of searching for its string, removing all occurences of that string and removing all *Implementation*() functions that were used only if the workaround was in place. No need to deprecate anything, users explicitly disabling given workaround will only be informed that such workaround does not exist anymore.
Checklist for adding, removing or updating a dependency
- Verify that there are no important clients stuck on the old version with no easy way to upgrade
- In case of CMake:
- it's usually possible to jump more than one version, check what's the version on the oldest supported system
- bump all
cmake_minimum_required()in all repos - remove
cmake_policy()calls that are not needed anymore - remove old workarounds, check changelogs for functionality that can be used now
- update building docs to say what version is required now
- add an entry to the dependencies section in
doc/changelog.dox - update
package/ci/travis.ymlto download a newer version, possibly removing 32-bit compat libraries
- In case of a compiler:
- remove everything related to
CORRADE_GCCXY_COMPATIBILITYof the old version, if applicable - update building docs to say what version is required now
- add an entry to the dependencies section in
doc/changelog.dox - update files in
package/ci/to use a newer version
- remove everything related to
- In case given dependency is external:
- Create a dedicated
Find*.cmakemodule and does not have a builtin one in CMake - update packages in
package/to depend on the new library - update files in
package/ci/to install it
- Create a dedicated
- In case given dependency is single-file:
- verify it's reasonably small (<50kB is okay,
nlohmann/jsonis a prime example of not okay) - add it to
src/external/without any modifications except for trailing whitespace cleanup - add it in a separate Git commit, mentioning its version (or Git hash) for easier upgrades later
- verify it's reasonably small (<50kB is okay,
- Update
CREDITS.mdof affected repo to mention the added/removed dependency, its homepage and its license
In order to remove a dependency, be sure to touch all places mentioned above, only in inverse.
Checklist for adding or removing a port
- Add a new
TARGET_*variable:- to root
CMakeLists.txt, which either gets enabled automatically based on system introspection or is exposed through anoption()command - to the list of variables extracted out of
configure.hinmodules/FindMagnum.cmake
- to root
- Add a
MAGNUM_TARGET_*variable:- set it in root
CMakeLists.txtin caseTARGET_*is enabled - add it as a
#cmakedefinemacro tosrc/Magnum/configure.h.cmake - add documentation for it to
src/Magnum/Magnum.h - mention it in
modules/FindMagnum.cmakedocs - mention it in
doc/cmake.doxanddoc/building.dox
- set it in root
- Add a new Travis / AppVeyor matrix build for this port (or update existing)
- Add a new
PKGBUILD-*file inpackage/archlinuxfor testing (or update existing) - Enable or disable functionality using
if(MAGNUM_TARGET_*)in CMake and#ifdef MAGNUM_TARGET_*in C++ - Mention the new stuff in
doc/changelog.dox - Push to a temporary branch (e.g.,
next) - Iterate until the CIs are green
- Merge to
master
In order to remove a port, be sure to touch all places mentioned above, only in inverse.
Checklist for updating the bootstrap repo
- Check out the
_modules_branch and update files inmodules/ - Check out the
_modules_sdl2_branch, merge_modules_to it, update remaining files inmodules/ - Check out the
_modules_es_branch, merge_modules_sdl2_to it, update remaining files inmodules/ - Check out all other (non-underscored) branches one by one
- use
git branch --list -vto keep track - merge proper
_modules_*branches to them, fix potential file deletion conflicts - update
toolchainsubmodule, if present
- use
- Push all branches
- Trigger build on
master, update theREADME.mdor files inpackage/ciif necessary
Checklist for updating copyright year
- Verify there are no uncommitted changes in any repos, as that would significantly complicate reverting a potential fuck-up
- Use msrp to batch replace copyright info in all files, replacing existing
Copyright © ...withCopyright © ..., 20XZin the root directory of every project, so nothing gets left out - Examples use partially MIT (mainly in docs) and partially UNLICENSE, replace
... —with..., 20XZ —there as well - Copy all
Find*.cmakemodules to dependent projects to update the copyright year in these as well - Update
package/debian/copyrightto say the new year as well - Use
git diffto verify the change went well and the new year is specified exactly once everywhere - Do a local verification build, push to
master
Checklist for uploading documentation
- (Optionally) remove
build/doc-publicto get rid of stale files - Verify there are no untracked files, modifications or branches different than
masterchecked out that could mess up the docs - Run dox2html5.py on
Doxyfile-public, look for suspicious warnings - Upload contents of
build/doc-public/html/todoc/magnum-new/and removedoc/magnum-old/if any - Once the upload is finished, rename
doc/magnum/todoc/magnum-old/anddoc/magnum-new/todoc/magnum/ - Quickly check that the docs still look as they should, if not, revert the backup and try again
Checklist for merging a PR
- After the public round of review, pull the changes locally to a temporary branch (i.e.,
next) - Verify a coverage build, verify that there are no compiler warnings
- Go over and fix issues that slipped through cracks in the public review
- Verify the contributor is mentioned in all relevant license headers, add if necessary
- Add the contributor to
CREDITS.md, if not already there - Update
doc/changelog.dox(and similar files in other repos), if not already done - Build documentation:
- run dox2html5.py on
Doxyfile-mcssand verify there are no new warnings - eyeball the relevant docs and fix suspicious things
- run dox2html5.py on
- Push to a temporary branch (e.g.,
next) - Iterate until the CIs are green
- Merge to
master, put a "thank you" comment to the PR, explaining additional changes if necessary
Checklist for making a release
- Open a new
20XY.acmilestone - Verify that there are no blocking issues in the current (
20XY.ab) milestone, either fix them or move to the next milestone - Verify that all CIs are green
- Go through
doc/changelog.doxand update it, in case it doesn't contain all changes (usegitkto check when it was last updated) - Go through fixed issues and merged PRs and add either a changelog mention added (and add a mention to the changelog), scrapped or no action needed label to wrap them up
- Update changelog for the next release:
- change section names for the latest release from
latestto20XY-ab - change the title from
Changes since 20XY.aato20XY.ab - add a paragraph stating date of release and referencing the to-be-added tag on GitHub
- change section names for the latest release from
- Bump
MAGNUM_LIBRARY_VERSIONandMAGNUM_LIBRARY_SOVERSIONin all projects, if needed — ensure all projects have the exact same version - Rebuild all projects with the new shared library version numbers, verify all tools and examples still behave properly
- Build and upload public docs (see Checklist for uploading documentation), verify that there are no new warnings and the changelog looks correct
- Push all new changes to a temporary branch (e.g.,
next) - Wait for the CIs to get green
- Tag a new version using
git tag -a v20XY.ab, say justVersion 20XY.abas a message - Push the tag, verify that the CIs are still green
- Write a release announcement for the blog
- highlight the most prominent features, mention detailed blog posts about them, if any
- reference detailed changelogs for all projects at the end
- don't forget to say thanks to significant contributors
- create some fancy eye-catchy cover image featuring nice screenshots of new functionality
- add release annoucement link under the button on front page
- Publish the release announcement, verify it looks correct
- Advertise the release announcement, preferrably Monday 5 PM, never Friday or weekends
- come up with some 100-character-long extended title
- Twitter (extended title + url and some hashtags), first dry-run the link on https:/
/ cards-dev.twitter.com/ validator to ensure the cover image gets displayed - Reddit
r/cpp,r/gamedev; Hacker News (extended title + url) - summarize the release to mailing list
- summarize the release highlighting GL- and Vulkan-related functionality and submit that to Khronos
- Add a message to the Gitter chat (title as heading, cover image, summary in a blockquote and "read more" link)
- Reference Twitter, Reddit, Hacker News and mailing list in a "Discussion" note at the end of the article, reupload that change
- Update versions of ArchLinux AUR packages:
- run
makepkginpackage/archlinux/magnum*-git, verify it builds and says correct version, ideally withr0at the ennd - copy the updated
PKGBUILDto the AUR package repo, runmakepkg --printsrcinfo > .SRCINFOthere - commit the updated
PKGBUILDand.SRCINFO, push - after pushing all, verify that the version is updated in the AUR web interface as well
- run
- Update Debian package changelog in
package/debian/changelog, copypasting the last entry, updating it and using the Git tag date+time for it (note that the date format is slightly different) - Update Homebrew package versions
- Ask someone to update Vcpkg packages
- Close the 20XY.ab GitHub milestone
- Add link to the release notes to the tag on GitHub
- Have a drink and take two days off