Developers guide
Checklists for developing new things in Corrade itself.
This guide is meant mainly for core Corrade 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
CORRADE_WITH_LIBRARYNAME
CMake option to:- root
CMakeLists.txt
(if it has some inter-library dependencies, update the others / convert them tocmake_dependent_option()
, addingNOT CORRADE_WITH_LIBRARYNAME
to 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
FindCorrade.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
_CORRADE_${_COMPONENT}_DEPENDENCIES
entry - add its name to the
_CORRADE_LIBRARY_COMPONENTS
regex - 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/corrade-cmake.dox
- Add a conditional
add_subdirectory()
tosrc/Corrade/CMakeLists.txt
- Create a new
src/Corrade/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
CorradeLibraryName_SRCS
variable - add installable headers to
CorradeLibraryName_HEADERS
variable - add private headers to
CorradeLibraryName_PRIVATE_HEADERS
variable (if any) - if the test needs some extra setup (such as e.g. CORRADE_
NO_ ASSERT enabled for particular files), create a new CorradeLibraryNameObjects
OBJECT
library 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(CorradeLibraryName PROPERTIES DEBUG_POSTFIX "-d")
) - verify that folder is set for all libraries and
OBJECT
libraries to avoid cluttering project tree view in IDEs (set_target_properties(CorradeLibraryName PROPERTIES FOLDER "Corrade/LibraryName")
) - verify that target installation is done in proper places (separate
RUNTIME
/LIBRARY
/ARCHIVE
destinations) - verify that
set_target_properties(CorradeLibraryName PROPERTIES VERSION ${CORRADE_LIBRARY_VERSION} SOVERSION ${CORRADE_LIBRARY_SOVERSION})
is done in caseCORRADE_BUILD_STATIC
is not set - verify that
set_target_properties(CorradeLibraryName PROPERTIES POSITION_INDEPENDENT_CODE ON)
is done in caseCORRADE_BUILD_STATIC_PIC
is set - verify that
add_library(Corrade::LibraryName ALIAS CorradeLibraryName)
(or equivalent) is added to make the library visible for CMake subprojects
- add source files to
- Create a new
src/Corrade/LibraryName/Test/
directory:- add a
CMakeLists.txt
with pre-populated license header, add your name to it - conditionally
add_subdirectory()
it ifCORRADE_BUILD_TESTS
is enabled
- add a
- Create a new
src/Corrade/LibraryName/LibraryName.h
header for forward declarations (if needed), add a file-level doc block withForward declarations for the @ref Corrade::LibraryName namespace
as brief docs - Create a new
src/Corrade/LibraryName/visibility.h
header withCORRADE_LIBRARYNAME_EXPORT
andCORRADE_LIBRARYNAME_LOCAL
macros by copypasting it from another library:- adapt
#ifdef CorradeLibraryName_EXPORTS
so it matches CMake target name - if the library is combined from an
OBJECT
library, add its name to the above#ifdef
as well (and then explicitly addtarget_compile_definitions(ĆorradeLibraryNameObjects PRIVATE "CorradeLibraryNameObjects_EXPORTS")
toCMakeLists.txt
in caseCORRADE_BUILD_STATIC
is 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
CORRADE_WITH_LIBRARYNAME
option, 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
CORRADE_WITH_LIBRARYNAME
option to all files inpackage/
directory, explicitly saying eitherON
orOFF
based on platform support:- all
package/archlinux/PKGBUILD*
files (and the AUR package(s)) - the
package/debian/rules
file (watch out, tabs!) - the
package/gentoo/
*.ebuild
file - the
package/homebrew/
*.rb
file (watch out, Ruby!) - all
package/ci/appveyor-*.bat
files (^
is a line continuation) - all
package/ci/
*.sh
files (\
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 CircleCI and AppVeyor downloads them (based on platform support)
- Mention the library in
doc/corrade-changelog.dox
- Build documentation:
- run dox2html5.py on
Doxyfile-mcss
and 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 a plugin
Similarly to Checklist for adding / removing a library except points 2 and 5, with:
- Update
FindCorrade.cmake
(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
_CORRADE_PLUGIN_COMPONENTS
regex - add a new
elseif(_component STREQUAL PluginName)
section with special setup of includes or dependencies or explicitly say# PluginName has no dependencies
- Create
PluginName.conf
and list all plugin dependencies (if any). The file has to be present even if empty. - Create
pluginRegistration.cpp
by copypasting it from another plugin and adapting plugin name and plugin interface string. It's needed to be in a separate file that gets compiled only to the plugin library, not to the test library. - Create
configure.h.cmake
for plugin-specific information about whether the library was built as static or not - Create a new
src/CorradePlugins/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_SRCS
variable - add installable headers to
PluginName_HEADERS
variable - add private headers to
PluginName_PRIVATE_HEADERS
variable (if any) - create a
PluginNameObjects
library that contains all files that are common for the plugin library and test library (usually everything exceptpluginRegistration.cpp
), add atarget_compile_definitions(PluginNameObjects PRIVATE "PluginNameObjects_EXPORTS")
for it - use
add_plugin()
command (which is aliased to either corrade_add_ plugin() or corrade_ add_ static_ plugin()) to create the PluginName
library, use${CORRADE_PLUGINS_*_DEBUG_BINARY_INSTALL_DIR}
/${CORRADE_PLUGINS_*_RELEASE_BINARY_INSTALL_DIR}
and${CORRADE_PLUGINS_*_DEBUG_LIBRARY_INSTALL_DIR}
/${CORRADE_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 the
OBJECT
library and the test library to avoid cluttering project tree view in IDEs (set_target_properties(PluginNameObjects PROPERTIES FOLDER "CorradePlugins/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 caseCORRADE_BUILD_STATIC_PIC
is set - verify that
add_library(Corrade::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.h
being installed), add a newvisibility.h
header. Otherwise put the visibility macros directly inPluginName.h
.
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 new
src/examples/name
directory, copy up-to-date UNLICENSE headers from other files in the repo - Verify that
src/examples/name/CMakeLists.txt
containscmake_minimum_required()
,project()
and allcmake_policy()
commands so it can be used as a top-level project level - Add a new
doc/name.dox
page with@brief
,@m_footernavigation
and@page
name equivalent to filename, describe what the example is doing - Add a new
examplename-source
section 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/corrade-example-index.dox
and list the example there - Mention the example in
doc/corrade-changelog.dox
- Push to a temporary branch (e.g.,
next
orports-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@brief
listing all classes, functions, typedefs, enums, macros etc. that are in the file - Add the file to corresponding
*_SRCS
,*_HEADERS
,*_PRIVATE_HEADERS
list inCMakeLists.txt
- If applicable, add a new test class file in the
Test/
directory- name it
FileNameTest.cpp
, put a class namedFileNameTest
inside, wrapped in aTest
subnamespace 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
GLTest
suffix, 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/corrade-changelog.dox
- Build documentation:
- run dox2html5.py on
Doxyfile-mcss
and 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@brief
docs - 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-mcss
and 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.dox
file, 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.dox
to ensure it gets listed at a proper place - If the page is not top-level, list it using
@subpage
in its parent page and add@m_footernavigation
for automatic linking to parent and prev/next pages - Add a
@brief
documentation, 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-mcss
and 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
/using
for 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 @copybrief
from the replacement functionality together with a@deprecated
line to the deprecated feature - Reference the replacement functionality in both the deprecation macro and in the
@deprecated
line to make porting easier - Ensure the deprecated symbol is wrapped in
#ifdef CORRADE_BUILD_DEPRECATED
, - Ensure deprecated files
#error
in 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/corrade-changelog.dox
- Build documentation:
- run dox2html5.py on
Doxyfile-mcss
and 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 CORRADE_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-mcss
and 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 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/
*.yml
to download a newer version - look for all mentions of the old version and remove them, grep for
CMAKE_VERSION
in all projects and remove what's obsolete
- In case of a compiler:
- remove everything related to
CORRADE_GCCXY_COMPATIBILITY
of 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*.cmake
module 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/json
is 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.md
of 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
CORRADE_TARGET_*
CMake variable:- to root
CMakeLists.txt
, which either gets enabled automatically based on system introspection or is exposed through aoption()
command - to the list of variables extracted out of
configure.h
inmodules/FindCorrade.cmake
- to root
- Add a
CORRADE_TARGET_*
preprocessor variable:- add it as a
#cmakedefine
macro tosrc/Corrade/configure.h.cmake
- add documentation for it to
src/Corrade/Corrade.h
- mention it in
modules/FindCorrade.cmake
docs - mention it in
doc/corrade-cmake.dox
anddoc/building-corrade.dox
- add it as a
- Add a new CircleCI / AppVeyor matrix build for this port (or update existing)
- Add a new
PKGBUILD-*
file inpackage/archlinux
for testing (or update existing) - Enable or disable functionality using
if(CORRADE_TARGET_*)
in CMake and#ifdef CORRADE_TARGET_*
in C++ - Mention the new stuff in
doc/corrade-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 adding / removing a CPU instruction set
- Add a new
CORRADE_TARGET_FOO
preprocessor variable toCorrade.h
:- With relevant documentation pointing ideally to a Wikipedia page describing the instruction set
- Mentioning the GCC/Clang
-m
option that enables it and the MSVC equivalent, if any, or the closest/arch:
option that implies it - Linking to related other
CORRADE_TARGET_*
variables, or saying it's a superset of / implied by another - Mentioning possible caveats (like with
LZCNT
having a dangerousBSR
fallback)
- Add detection into
configure.h.cmake
- On GCC / Clang it's usually a preprocessor variable in a form of
__FOO__
, verify withecho | gcc -dM -E -mfoo | grep FOO
- If it's a superset of / implied by another, verify that the other preprocessor variables are set / imply this option as expected
- Cross-check with Clang and if it has a different behavior drop the implication
- On MSVC just assume it's enabled by the option that implies it, as there it's harder to verify
- Special-case clang-cl under the MSVC branch, reusing the
__FOO__
check for it - Add a case into
TargetTest::cpu()
verifying that it correctly implies / is implied by other target macros, or if independent that it's set only if the overarching platform macro such as CORRADE_TARGET_ X86 is set as well.
- On GCC / Clang it's usually a preprocessor variable in a form of
- Add a new
FooT
tag type intoCpu.h
- Roughly at the place where it historically appeared among other extensions (e.g. Cpu::
PopcntT is after Sse42T
and beforeAvxT
but new AVX-512 extensions would go at the end) - If a superset of / implied by another, wire it into the class hierarchy (like e.g. Cpu::
AvxT), otherwise keep it standalone (like e.g. Cpu:: PopcntT) - Make the minimal documentation only link to the tag instance
- Roughly at the place where it historically appeared among other extensions (e.g. Cpu::
- Add a
TypeTraits<FooT>
entry. Its value is important for proper overload resolution:- If it's in a hierarchy, renumber the other indices so it's larger than everything before it and smaller than everything after. Worst case, if the hierarchy becomes larger than 16 items, the
ExtraTagBitOffset
may need to get increased. - If it's not,
ExtraTagCount
may need to get updated to account for the new extra tag. You'll get static assertions if the tag value is too small.
- If it's in a hierarchy, renumber the other indices so it's larger than everything before it and smaller than everything after. Worst case, if the hierarchy becomes larger than 16 items, the
- Add a new
Foo
tag:- Position matching the order in which the tag types were defined
- Documentation similar to the
CORRADE_TARGET_FOO
docs, including the Wikipedia link and potential caveats - Mentioning it's either a superset of / implied by another (like e.g. Cpu::
Avx) or an "extra" (like e.g. Cpu:: Popcnt) - Linking to relevant other tags and corresponding
CORRADE_TARGET_FOO
andCORRADE_ENABLE_FOO
variables - List it in the right place in the Utility::
Debug output operator in Cpu.cpp
— "extra" tags go after the base ones - If it seems like a reasonable addition, expand the
doc/cpu.dot
graph with the new tag
- Wire it into compile-time detection:
- Inside the Cpu::
DefaultBaseT / Cpu:: DefaultExtraT typedef and in the Cpu:: compiledFeatures() function, at a place that corresponds to where it was defined among the tags - Mentioned in Cpu::
DefaultBase / Cpu:: DefaultExtra and Cpu:: compiledFeatures() docs, again in proper order - If it doesn't have a direct mapping to a MSVC
/arch:
option, consider also listing it among others in the yellow warning block in Cpu namespace docs
- Inside the Cpu::
- Wire it into runtime detection:
- For x86 find the right CPUID bit, order the branch among checks for surrounding bits
- For ARM on Linux and Android check for a corresponding HWCAP bit, in some cases it may need to read the
AT_HWCAP2
entry as well which has support further limited – see docs in the code for more information. - For ARM on macOS / iOS check the corresponding sysctlbyname() value
- For WebAssembly there's no runtime detection yet. Check if anything happened with the feature detection proposal.
- List it in Cpu::
runtimeFeatures() docs, if it's depending on AVX like e.g. Cpu:: Bmi1 on x86 and the dependency isn't obvious, mention that as well
- Add a new
CORRADE_ENABLE_FOO
macro:- With a corresponding
__attribute__((__target__("foo")))
, mention the matching-m
option in the docs - If the instruction set works on clang-cl without having to define anything, then add the attribute also for clang-cl (like e.g. CORRADE_
ENABLE_ SSE42), if it doesn't then explicitly exclude clang-cl such as with CORRADE_ ENABLE_ LZCNT or CORRADE_ ENABLE_ AVX512F. Reflect that in the documentation — either saying that it expands to the target attribute also on clang-cl, or that it isn't defined there ever. - Verify and mention the special case with
CORRADE_TARGET_FOO
- If it's a superset of / implied by any other
-m
option (as discovered when implementing theCORRADE_TARGET_FOO
detection), mention that in the docs – but only if it's consistent for GCC and Clang. - Add a
_CORRADE_ENABLE_FOO
variant for the GCC multiple target attribute workaround – one empty for whenCORRADE_TARGET_FOO
is defined and one just the string with a comma after ("foo",
)
- With a corresponding
- Add a test for the
CORRADE_ENABLE_FOO
macro:- New
callInstructionFor()
variant for given tag type - Annotated with the "function variant" of the macro (thus
CORRADE_ENABLE(FOO)
) and also with an#ifdef
for the macro around. The function variant should be used in order to test both the_CORRADE_ENABLE_FOO
macro (on Clang before version 8 and GCC) andCORRADE_ENABLE_FOO
(elsewhere). - Ideally using just that instruction alone (such as is the case with
POPCNT
), if not then try to use an instruction set that's implied by it so it doesn't need a secondCORRADE_ENABLE_*
. Clearly mark which expression uses the tested instruction set. It should verify something nontrivial (so not just a load/store) and return a non-zero value.
- New
- Be sure to build & run on weird / broken compilers such as GCC 4.8 or clang-cl:
- In case of GCC 4.8 the
Utility/Intrinsics*.h
headers may need to get expanded to correctly pull in the intrinsics without requiring-mfoo
globally, see their code for more info. - Otherwise, if the new instruction set is pulled in by one of these headers already, update their docs to list it as well.
- In case of GCC 4.8 the
- Run
CpuTest
to verify everything:- Compile-time detection (test with a
-march=native
build or equivalent) - Runtime detection, ideally on multiple platforms (AMD/Intel for x86, phone + Apple M1 + CircleCI for ARM...)
CORRADE_ENABLE_*
macro (that a correspondingenableMacros()
test case is run and gives a reasonable result, use CircleCI for AVX-512 and new ARM extensions if not available locally)- If the instruction set isn't detected as supported on a target, verify that calling it crashes (temporarily comment out the
CORRADE_SKIP()
inenableMacros()
)
- Compile-time detection (test with a
- List the new
CORRADE_TARGET_FOO
,CORRADE_ENABLE_FOO
variables and theCpu::Foo
tag indoc/changelog.dox
- Check the output of
CpuTest
CI jobs for sanity:- Especially differences between Linux, Windows and macOS
- Between x86, ARM and WebAssembly
- Docker CircleCI x86 and ARM jobs tend to have very recent hardware, OTOH macOS jobs have outdated Intel CPUs without AVX2, the output should correspond to that
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 © ..., 20XZ
in the root directory of every project, so nothing gets left out- If the line gets over 79 characters, wrap the name on the new line where the first letter is aligned under the
©
- If the line gets over 79 characters, wrap the name on the new line where the first letter is aligned under the
- Examples use partially MIT (mainly in docs) and partially UNLICENSE, replace
... —
with..., 20XZ —
there as well - Copy all
Find*.cmake
modules to dependent projects to update the copyright year in these as well - Update other occurences by hand:
COPYING
doc/conf.py
doc/mainpage.dox
package/debian/copyright
- Use
git diff
to 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-public
to get rid of stale files - Verify there are no untracked files, modifications or branches different than
master
checked 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/corrade-new/
and removedoc/corrade-old/
if any - Once the upload is finished, rename
doc/corrade/
todoc/corrade-old/
anddoc/corrade-new/
todoc/corrade/
- 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/corrade-changelog.dox
, if not already done - Build documentation:
- run dox2html5.py on
Doxyfile-mcss
and 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 creating/updating a single-header lib
This assumes the magnum-singles
repository is cloned next to the corrade
repository.
- Create/update a driver file in
src/singles/
, if needed - Update
src/singles/generate.sh
, if needed - Run
src/singles/generate.sh
, regenerating all headers - Check
git diff
for suspicious changes.- no
-dirty
suffix in revision IDs - no preprocessed LoC being over 10k
- no
- If nothing changes except for revision IDs in the "Generated from" lines, there's no need to update given file. Otherwise:
- Ensure the working copy is clean with all commits pushed to
master
so the generated revision IDs are stable. If not, commit and push all changes first and regenerate the headers. - Then, write up a changelog entry in affected files, taking the revision IDs from files generated earlier. Don't commit anything, otherwise the revision ID changes again.
- Then, generate again. This will make the changelog entry have the same revision ID as the "Generated from" line.
- Commit that into the
magnum-singles
repository and ensure the CI passes. - After that, commit the changelog entry.
- Ensure the working copy is clean with all commits pushed to
- In case of new header-only libraries:
- Commit & push all changes that are needed elsewhere, except for the new file itself (and related doc updates, etc.)
- Generate to get an revision ID.
- Write an "Initial release" changelog entry using the generated revision ID.
- Generate again and verify the IDs still match.
- Commit that into the
magnum-singles
repository, including a new test:- new file in
magnum-singles/test
, named after the header, including the header and doing a simple operation that results inreturn 0
- new entry in
magnum-singles/package/ci/
*.yml
, compiling the new test Ensure the CI runs on the new file and passes.
- new file in
- After that, commit the new file and everything else inside Corrade:
- Also mention it in
doc/corrade-singles.dox
- And reference the single-header lib from the class documentation itself (look at e.g. Containers::
Pointer for an example)
- Also mention it in
- Run
magnum-singles/package/generate-loc.sh
, update the README with its output (use block editing) - If there's something important to be mentioned, update the changelog in the README
- Push to the
next
branch. If green, merge tomaster
, if not, restart from point 1.
See Single-header generator tool for developer-facing description of the single-header generator tool.
Checklist for making a release
- Open a new
20XY.ac
milestone - 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/corrade-changelog.dox
and update it, in case it doesn't contain all changes (usegitk
to 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
- Go through merged PRs (and the most important issues) and add new people to
doc/corrade-credits.dox
and https:// magnum.graphics/ about/ , if they are not there yet - Update changelog for the next release:
- change section names for the latest release from
latest
to20XY-ab
- change the title from
Changes since 20XY.aa
to20XY.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
CORRADE_LIBRARY_VERSION
andCORRADE_LIBRARY_SOVERSION
in all projects, if needed — ensure consistency with Magnum releases - 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
- Update
conanfile.py
with a new version — this has to be done before the version is tagged. - Update Debian package changelog in
package/debian/changelog
, copypasting the last entry, updating it and usingdate -R
for a date — again, this should be done before the version is tagged so stable releases in PPAs can be done directly from the tag with no extra patching - Tag a new version using
git tag -a v20XY.ab
, say justVersion 20XY.ab
as a message - Push the tag, verify that the CIs are still green
- Add content to the corresponding Magnum release announcement
- Update versions of ArchLinux AUR packages:
- run
makepkg
inpackage/archlinux/corrade-git
, verify it builds and says correct version, ideally withr0
at the ennd - copy the updated
PKGBUILD
to the AUR package repo, runmakepkg --printsrcinfo > .SRCINFO
there - commit the updated
PKGBUILD
and.SRCINFO
, push - after pushing all, verify that the version is updated in the AUR web interface as well
- run
- Update Homebrew package versions
- Ask someone to update the Ubuntu PPA
- Ask someone to update Vcpkg packages
- Close the 20XY.ab GitHub milestone
- Add link to the release notes to the tag on GitHub