Skip to content

Conversation

@SentryMan
Copy link
Collaborator

@SentryMan SentryMan commented Jul 31, 2024

Was testing with valhalla, and thought why not?

  • will generate value classes if on a valhalla JDK build and previews are enabled
  • Modifies generated module classes to work as value types (no mutable fields)
@Generated
@InjectModule
public final value class ApiModule implements AvajeModule {
  @Override
  public void build(Builder builder) {
    // builder is now passed into the DI methods instead of being a field
    build_config_HttpClientFactory(builder);
  }
...

@SentryMan SentryMan added this to the 10.3 milestone Jul 31, 2024
@SentryMan SentryMan requested a review from rbygrave July 31, 2024 23:17
@SentryMan SentryMan self-assigned this Jul 31, 2024
@SentryMan SentryMan changed the title Write Value Classes When on Valhalla Generate Value Classes When on Valhalla Aug 1, 2024
@SentryMan
Copy link
Collaborator Author

Alright, I'm good with this

@rbygrave rbygrave merged commit b204598 into avaje:master Aug 1, 2024
@SentryMan SentryMan deleted the valhalla branch August 1, 2024 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants