This ticket is to check whether the following lines can be safely removed from getPathFromClassName:
https://github.com/lbl-srg/ctrl-flow-dev/blob/main/server/src/parser/loader.ts#L180-L186
This makes getPathFromClassName return null if typeStore.has(modelicaPath)?
This seems like breaking the proper separation of concerns between:
- the function
getPathFromClassName that should always try to return the path to the JSON file if it exists,
- any caller of
getPathFromClassName that should check that the file has already been loaded before loading it again.
I would be willing to remove this check from getPathFromClassName (for now, I've just moved it after the package path discovery).
Originally posted by @AntoineGautier in #457 (comment)
This ticket is to check whether the following lines can be safely removed from
getPathFromClassName:https://github.com/lbl-srg/ctrl-flow-dev/blob/main/server/src/parser/loader.ts#L180-L186
This makes
getPathFromClassNamereturn null iftypeStore.has(modelicaPath)?This seems like breaking the proper separation of concerns between:
getPathFromClassNamethat should always try to return the path to the JSON file if it exists,getPathFromClassNamethat should check that the file has already been loaded before loading it again.I would be willing to remove this check from
getPathFromClassName(for now, I've just moved it after the package path discovery).Originally posted by @AntoineGautier in #457 (comment)