Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

smandy
Copy link

@smandy smandy commented Jun 28, 2024

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.

Add overload for main in SbeTool.main
@smandy smandy changed the title Main properties overload SbeTool.main -> provide additional method SbeTool.mainWithProperties to help out build tools Jun 28, 2024
@smandy smandy changed the title SbeTool.main -> provide additional method SbeTool.mainWithProperties to help out build tools SbeTool.main -> provide additional method SbeTool.mainWithProperties to aid build tools Jun 28, 2024
@smandy smandy force-pushed the main_properties_overload branch from 07aa26c to 45755a2 Compare July 5, 2024 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant