FHIR / GoFSH

GoFSH is a FHIR Shorthand (FSH) decompiler, able to convert formal FHIR definitions from JSON/XML to FSH.
Apache License 2.0
35 stars 6 forks source link

Update how plugin module is loaded to support FSH Online #225

Closed jafeltra closed 1 year ago

jafeltra commented 1 year ago

This PR updates how the plugin module is loaded in order to work in FSH Online. For some reason, even with the workaround we previously had, FSH Online was unable to load the plugins module after the GoFSH 2.0.0 release. I'm not sure exactly why things changes, but the root of the change seems to be trying to import a module set in a variable, rather than a string. The way the compiled code changed made it so that, even with the old workaround in place, a variable was still be passed into the function that does the import.

This update makes it so that, if no alternative plugin directory is provided, the default 'plugins' directory is imported via a string, rather than a variable whose value is not changed. Using this default is the behavior GoFSH uses in the getResources function, which FSH Online also calls, so FSH Online will only ever use the default behavior now.

This PR should be reviewed in combination with FSH Online #136 since its purpose is to resolve an issue there.