Skip to content

Add better control over generated files registration #31331

Closed
@wilkinsona

Description

@wilkinsona

Affects: 6.0

During test AOT processing, each merged context configuration results in a new initializer being generated. These initializers provide separation for the code that's required to bootstrap the AOT-processed context. When an AOT contribution adds files to the generated context (generationContext.getGeneratedFiles().addResourceFile(…) for example), no such separation occurs. As seen in this Spring Boot issue, this can lead to clashes as files from AOT processing of an earlier merged context configuration are overwritten by processing of a subsequent merged context configuration.

I think we need a way to separate the files that are generated during AOT processing so that they're isolated on a per-context basis. This would need to work both on the writing side when files are being generated during AOT processing and on the reading side when those generated files are being consumed at runtime when the AOT processed context is refreshed.

Metadata

Metadata

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)theme: aotAn issue related to Ahead-of-time processingtype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions