simple-binary-encoding icon indicating copy to clipboard operation
simple-binary-encoding copied to clipboard

SbeTool.main -> provide additional method SbeTool.mainWithProperties to aid build tools

Open smandy opened this issue 1 year ago • 0 comments

A static main (named 'mainWithProperties') that takes external properties so that build tools can supply their own properties, rather than injecting config by polluting system properties; This is a disaster in a multi-threaded build where system properties amount to shared global state and so separate invocations of SbeTool.main will end up trashing the properties of other invocations that are running concurrently :-( This new method allows parallel, independent invocations that don't interfere with each other and retains compatibility with existing command line workflows. The existing main now defers to this method passing System.getProperties() as the 'properties' argument.

smandy avatar Jun 28 '24 15:06 smandy