cucumber-jvm icon indicating copy to clipboard operation
cucumber-jvm copied to clipboard

Scan UuidGenerator implementations without starting them

Open mpkorstanje opened this issue 1 year ago • 2 comments

The ideal solution would be to have the UuidGenerator return a supplier instance that keeps the state internally.

public interface UuidGenerator {

    Supplier<UUID> supplier();
}

And then have the UuidGeneratorServiceLoader return that supplier only for the selected generator. Fortunately the UuidGenerator is experimental so I don't feel too bad about breaking the contract. But I'd rather avoid doing that on a patch version.

Originally posted by @mpkorstanje in https://github.com/cucumber/cucumber-jvm/issues/2931#issuecomment-2402922990

mpkorstanje avatar Oct 09 '24 17:10 mpkorstanje