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

[BUG] Config.disableLazy isn't functional as written #51

Open
pkwarren opened this issue Oct 16, 2023 · 1 comment
Open

[BUG] Config.disableLazy isn't functional as written #51

pkwarren opened this issue Oct 16, 2023 · 1 comment
Labels
Bug Something isn't working

Comments

@pkwarren
Copy link
Member

pkwarren commented Oct 16, 2023

Description

The current implementation of Config.disableLazy isn't functional. In addition to specifying disableLazy = true, a user also needs to provide the initial set of messages/descriptors to use to initialize the cache.

Steps to Reproduce

Pass a Config to Validator with disableLazy = true. Attempt to validate a message - nothing will work because it assumes the supported messages are already cached.

Expected Behavior

The Config object should support passing the initial set of messages or descriptors to use to seed the cache with disableLazy = true.

Actual Behavior

The disableLazy = true config option isn't usable.

Screenshots/Logs

n/a

Environment

  • Operating System: macOS
  • Version: 14.0
  • Compiler/Toolchain: Java 17
  • Protobuf Compiler & Version: protoc 24.4
  • Protoc-gen-validate Version: n/a
  • Protovalidate Version: 0.1.6

Possible Solution

Pass a list of messages/descriptors in the Config object to allow initializing the cache prior to use with disableLazy = true.

Additional Context

n/a

@pkwarren pkwarren added the Bug Something isn't working label Oct 16, 2023
@jeffawx
Copy link

jeffawx commented Mar 19, 2024

I see the same problem, the flag doesn't work even if I manually register message type via: loadDescriptors method

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants