Move run_passes into the library compilation function. That way the
FileDiagnostics are created by the parser, can be passed on to the library
compilation function and after that we don't need them anymore and can
replace them with future BuildDiagnostics for example.
Remove the need for PartialEq for the Diagnostics. The objective is to
introduce an enum here in the future
that may hold types that do not support
PartialEq. It turns out that we don't really need it though.
Provided the caller gets the order of calls to add_type_from_resource, it
should be possible to load one type after another that depends on the former.
It should be possible to load multiple times into the same registry,
which will require interior mutability: While a loaded type has a
reference to the registry, a newly loaded type shall be added.
Taking &mut self makes more sense when wanting to populate from a list.
Also we should return a list of diagnostics for each file that we loaded
or an error if we couldn't load the file (for example due to permission
problems, etc.).
This way the caller can choose to show diagnostics, ignore them, etc.
Don't require the callers to hold on to the source code string until an
eventual diagnostics code path is hit. Instead it turns out it's
simpler to let the parser consume the source code as string, where
internally after tokenizing it can be moved into the diagnostics and
from there into the code map if needed.
There are a few places where we now clone the source code, but that's
only in cases where we also extract stuff separately (test code) or the
syntax updater.
Don't need an accessor function in the Document for a public field. That said,
the choice of registry instance for the path "compilation" doesn't really matter,
as the lookup shall always end up
in the global registry.
For a .60 files the locally defined components are now stored in a separate
per-document TypeRegistry instance that falls back to the global registry
for lookups.
Don't concatenate paths as strings with directory separators, use the
variant to create from an iterator. This could also be cannonicalized,
but it's not necessary AFAICS.
Work around a problem with specifying multiple properties in property animations.
While trying to find what the problem is
and how to fix it, this patch avoids the
test failure in the CI.