Skip to content

Remove typeStore check from class path discovery #478

@AntoineGautier

Description

@AntoineGautier

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)

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions