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

Generate enum with no keys for large properties files #27

Merged
merged 5 commits into from
Jan 16, 2024

Conversation

aurambaj
Copy link
Collaborator

it has multiple commits, the main things it changes:

  • adding test for generation with argument builder
  • Generate enum with no keys for large properties files
  • exposing the resourcebundle

Use EnumType#NO_KEYS in @L10nProperties to generate an enum with no keys.

This can be used to work with large properties files that generate the following compilation
error: "error: code too large" when the enum becomes too large with {@link #KEYS_ONLY} due
the number of keys.

Obviously strong typing does not apply anymore but other enum attribute can be used for
example to create an instance of L10nMessages with {@link L10nMessages#builder(Class)}
This is useful to be able to list the keys when using {@link EnumType#NO_KEYS}
The error was

ERROR: /home/runner/work/l10nmessages/l10nmessages/examples/bazel-local/BUILD:14:12: //:l10nbazel depends on @@l10nmessages_local//:l10nmessages in repository @@l10nmessages_local which failed to fetch. no such package '@@l10nmessages_local//': /home/runner/work/l10nmessages/l10nmessages/examples/bazel-local/external/l10nmessages_local_maven.BUILD.bzl is not a regular file; if you're using a relative or absolute path for `build_file` in your `new_local_repository` rule, please switch to using a label instead
@aurambaj aurambaj merged commit bee6ef0 into main Jan 16, 2024
3 checks passed
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