* This is a little specific to us, but when we see references to a `renderdoc`
module etc we want to be able to look up the generated stubs instead as they
have better type hints for processing.
* This tries to ast parse source that may contain an error.
* We don't try to fully error recover from unlimited problems, but a single
statement that is being edited can be tolerated by commenting out lines around
it
* We buffer output to avoid spamming huge numbers of signals especially when
single lines can be many write calls. This means if an exception is processed
immediately after a print the output from the print may come after the
extension.
* This is not the default python layout but is convenient for sharing the
standard library .zip and include folder with separate binary folders per-
platform. The layout mirrors what we include in the repository.
* This is expected to be in a pyside\ subfolder, with an organisation matching
our default setup.
* We also now copy the shiboken2 python module (if it exists) as required by new
pyside2 versions.
* We create both a stubs folder for each specific version, and a 'latest' that
is updated by newer RD versions.
* For development, the stubs will be regenerated any time the git commit hash
changes for development builds.
* Debug info could theoretically contain names which include path like
characters including '.' or '[]' even though these wouldn't be valid
identifier names. We assume this will not happen with names that are part of
structures/arrays themselves but instead only happen if there's a single
matching path.
* If there is no set/space and no array index, a single number is unclear of
what it actually means (when there is no sampler object, we don't have
anything to refer to except the binding).
* Because Qt is awful at customising controls, the functions used to fetch the
index of sections are not virtual so the internal QHeaderView version doesn't
get the right sections when we have column grouping enabled.