You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Logging the value of prefix when executing npx ts-node scripts/parse-template-package.ts shows that it is either empty or equal to /dependencies/template-json/json/, which is already within MODELICAPATH.
So it seems that prefix can simply be removed.
The variable MODELICAPATH must also be renamed to avoid the confusion with the environment variable: https://github.com/lbl-srg/ctrl-flow-dev/blob/main/server/Dockerfile#L38
The function _findPath has an incorrect JSDoc and its argument reference seems to refer to a full class name. This should be made clearer.
The text was updated successfully, but these errors were encountered:
The confusion between file paths and class names spreads over several functions:
/** * Extracts the given file into the type store */exportconstgetFile=(filePath: string)=>{constjsonData=loader(pathPrefix,filePath);
exportclassFile{publicpackage="";// only important part of a filepublicelementList: Element[]=[];constructor(obj: any,filePath: string){this.package=obj.within;constsplitFilePath=filePath.split(".");
All these functions expect a full class name (dot notation), not a relative file path.
The
loader
function uses aprefix
string that is prepended to the list of directories containing Modelica JSON files:Logging the value of
prefix
when executingnpx ts-node scripts/parse-template-package.ts
shows that it is either empty or equal to/dependencies/template-json/json/
, which is already withinMODELICAPATH
.So it seems that
prefix
can simply be removed.The variable
MODELICAPATH
must also be renamed to avoid the confusion with the environment variable: https://github.com/lbl-srg/ctrl-flow-dev/blob/main/server/Dockerfile#L38The function
_findPath
has an incorrect JSDoc and its argumentreference
seems to refer to a full class name. This should be made clearer.The text was updated successfully, but these errors were encountered: