Importer: the path parameter for `resolveImports()` should be optional
Right now, we can resolve imports without providing a key as such (in case a model only exists in memory, it would seem). We do this by passing resolveImports() an empty string:
importer->resolveImports(model, "");
while, ideally, we would be able to just skip the parameter, i.e. have something like:
importer->resolveImports(model);
One reason for the Importer class' existence is so that we don't end up importing an instance of a model multiple times. In order for that to be possible, you have to store it somehow and be able to reference it later on; it needs a key. The second parameter to the resolveImports function is the path, not the key.
If others are happy with overloading the resolve function so that it doesn't need an input when the path is blank, I'm happy to do that ... just wanted to be clear it's unrelated to the key thing.
My bad, the path indeed.
Resolving imports can only be done when defining the context in which import paths should be evaluated. The only case in which providing no context makes sense is when all import URLs will be defined as absolute URLs. Requiring the base context to be defined requires the user to understand what they are doing and I personally have found it very useful in other packages to be forced to read the docs as to what that second argument should be.