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

Prepend existing prefix to new feature name prefix in GenerationContext.withName() #28974

Closed
sbrannen opened this issue Aug 17, 2022 · 2 comments
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: superseded An issue that has been superseded by another theme: aot An issue related to Ahead-of-time processing type: enhancement A general enhancement

Comments

@sbrannen
Copy link
Member

As discussed in #28928 (comment), we should change the semantics of GenerationContext.withName(String) so that an existing "feature name prefix" is not lost.

Specifically, we should prepend any existing prefix to a new provided prefix to ensure that there are no clashes with generated names.

This change may also be helpful in implementing #28204.

As mentioned by @snicoll, "the counter in DefaultGenerationContext [may no longer] need to be transmitted from one context to another."

@sbrannen sbrannen added in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement theme: aot An issue related to Ahead-of-time processing labels Aug 17, 2022
@sbrannen sbrannen added this to the 6.0.0-M6 milestone Aug 17, 2022
@sbrannen sbrannen modified the milestones: 6.0.0-M6, 6.0.0-RC1 Sep 10, 2022
@sbrannen sbrannen modified the milestones: 6.0.0-RC1, 6.0.x Oct 10, 2022
@sbrannen sbrannen modified the milestones: 6.0.x, 6.1.x Mar 7, 2023
@snicoll
Copy link
Member

snicoll commented Jun 19, 2023

I don't know if we should reuse this issue and migrate it to a bug or if we should create a separate issue, but, withName cannot be used with the TCF. It works fine when processing an application but fails if more than one context needs the feature that withName triggers.

A reproducer is available in the linked Spring Boot issue. I think it would be better that the TCF provides a context that deals with the name clashing automatically, so that withName works transparently in both cases.

@sbrannen
Copy link
Member Author

@sbrannen sbrannen closed this as not planned Won't fix, can't repro, duplicate, stale Jul 11, 2023
@sbrannen sbrannen removed this from the 6.1.x milestone Jul 11, 2023
@sbrannen sbrannen added the status: superseded An issue that has been superseded by another label Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: superseded An issue that has been superseded by another theme: aot An issue related to Ahead-of-time processing type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants