ort icon indicating copy to clipboard operation
ort copied to clipboard

chore(model): Avoid a Hoplite deprecation warning

Open sschuberth opened this issue 1 year ago • 2 comments

This avoids the console output of:

"Hoplite is configured to infer which sealed type to choose by inspecting the config values at runtime. This behaviour is now deprecated in favour of explicitly specifying the type through a discriminator field. In 3.0 this new behavior will become the default. To enable this behavior now (and disable this warning), invoke withExplicitSealedTypes() on the ConfigLoaderBuilder."

sschuberth avatar Oct 15 '24 13:10 sschuberth

This change causes

Invalid discriminator field to select sealed subtype. Must specify _type to be a valid subtype of org.ossreviewtoolkit.model.config.ScanStorageConfiguration.

when deserializing reference.yml, but I guess having to explicitly mention the _type is not an option for us... what do you think @mnonnenmacher?

sschuberth avatar Oct 15 '24 13:10 sschuberth

This change causes

Invalid discriminator field to select sealed subtype. Must specify _type to be a valid subtype of org.ossreviewtoolkit.model.config.ScanStorageConfiguration.

when deserializing reference.yml, but I guess having to explicitly mention the _type is not an option for us... what do you think @mnonnenmacher?

No, we should not introduce this in the config. I think we have to wait until I finally find time for #6603.

mnonnenmacher avatar Oct 15 '24 13:10 mnonnenmacher

I think we have to wait until I finally find time for #6603.

Closing this in favor of that.

sschuberth avatar Oct 25 '24 10:10 sschuberth

I think we have to wait until I finally find time for #6603.

Closing this in favor of that.

Note to myself: Hoplite is at version 3.0.0 RC1 now. We might not be able to upgrade to version 3.0.0 final (which has a chance of fixing https://github.com/oss-review-toolkit/ort/issues/9490) until #6603 is resolved.

sschuberth avatar Jun 16 '25 11:06 sschuberth