Hyperfoil / qDup

Lab automation and queuing scripting
Apache License 2.0
12 stars 12 forks source link

static initialize Parser allowing for extension of parser #172

Closed johnaohara closed 1 year ago

willr3 commented 1 year ago

We should not change to a static instance. A shared Parser forces all Runs in the jvm to support any custom commands or yaml loaded into the Parser. This would limit the re-usability of qDup as a library. I didn't think the QDup class was part of the supported public interface for qDup. If we want to make it more re-usable then perhaps we make the Parser a private member variable with getters and setters?

johnaohara commented 1 year ago

The thought process for making it static was for reducing memory footprint. Seeing as no state is maintained in Parser wrt the document being parsed, the parsing definitions could be shared between Runs. Tbf idk if Yaml maintains state, so probably safer to have a new instance of Parser for each run

Is there a supported API for qDup defined anywhere?