Closed kyllingstad closed 4 years ago
Closing for the time being. Will pick up again later.
Reopening now that open-simulation-platform/cse-core#388 is ready.
I just discovered that this PR had bitrotted. I've updated it now, so it's ready for a new review. It's a rather long-standing one, so it would be good to get it done. :)
This PR looks good to me. I've also tested it functionally. The cached fmus end up in localAppData/cse
as expected, and the ´clean-cache` subcommand clears it.
When running the dp-ship example or inspecting the OSOM.fmu, I notice that we still create a "cse_guid" folder in localAppData/Temp
. I think the importer in cse-core still extracts the fmu to the localAppData/Temp
folder. Is it supposed to work like this?
When running the dp-ship example or inspecting the OSOM.fmu, I notice that we still create a "cse_guid" folder in
localAppData/Temp
. I think the importer in cse-core still extracts the fmu to thelocalAppData/Temp
folder. Is it supposed to work like this?
Weird, I can't reproduce this on my computer, neither on Windows nor Linux. Are you able to run cse inspect
via a debugger and see when the folder gets created?
Debugged inspect with different FMUs now.
An empty cse_guid folder is created in localAppData/Temp
when line inspect.cpp line 72 is executed:
const auto uriReference = to_uri(args["uri_or_path"].as<std::string>());
This folder contains the extracted fmu after line 73 has executed:
const auto uriResolver = caching_model_uri_resolver();
All folders are deleted once the cse inspect command returns.
Sorry. Debugging outdated code. Will come back with more accurate info
It is inpect.cpp line 74:
const auto model = uriResolver->lookup_model(baseUri, uriReference);
A cse_guid is created and contains only the ModelDescription.xml and is destroyed when the lookup_model returns.
Could it be the peek_model_description
in importer.cpp?
Could it be the
peek_model_description
in importer.cpp?
Yes. That is as expected, and as long as the directory gets deleted again afterwards, it's not a bug. Thanks for checking!
Fixes #11.
~I've submitted a companion pull request for cse-core which must be merged first: open-simulation-platform/cse-core#388. Once that is accepted, I'll revert the channel change in
conanfile.txt
here.~