Skip to content

Conversation

@meistermeier
Copy link
Collaborator

Those things that we do to support AOT 😄

Copy link
Member

@christophstrobl christophstrobl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left a few comments - other than that LGTM.

protected void contribute(AotRepositoryContext repositoryContext, GenerationContext generationContext) {
super.contribute(repositoryContext, generationContext);

repositoryContext.getResolvedTypes().stream().filter(Neo4jAotPredicates.IS_SIMPLE_TYPE.negate()).forEach(type -> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the filter in data commons too restrictive? Which additional types are you expecting to cover here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TBH, I took this from the mongo commit ;)
If this is not needed, I can remove it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case you man want to remove the entire processor as well as the reference to it in Neo4jRepositoryConfigurationExtension.java and just rely on the inspection done in data-commons.
less code :)

import org.springframework.data.aot.TypeContributor;

/**
* @author Gerrit Meier
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@since tags would be nice to have.

TypeReference.of(SimpleQueryByExampleExecutor.class),
TypeReference.of(BeforeBindCallback.class),
TypeReference.of(AfterConvertCallback.class),
// todo "temporary" fix, should get resolved when defined in @GeneratedValue
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please create an issue in spring-projects/spring-data-commons for this, so we can keep track of the progress there.

/**
* @author Gerrit Meier
*/
public class DataNeo4jRuntimeHints implements RuntimeHintsRegistrar {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe just Neo4jRuntimeHints?

@meistermeier meistermeier deleted the issue/aot-sf6 branch July 27, 2022 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants