wilkinsona / project-generator

3 stars 4 forks source link

Add ProjectDescriptionCustomizer #58

Closed snicoll closed 5 years ago

snicoll commented 5 years ago

As the end goal is to replace the existing ProjectRequest by ProjectDescription we need a way to customize the description (this should probably happen in the resolved introduced in #56).

There are a lot of customizers in the production start-site. We should verify we have the necessary API to replace them with this new API.

mbhave commented 5 years ago

I think we can close this issue for now. Most of the ProjectRequestPostProcessors were replaced by BuildCustomizers.

snicoll commented 5 years ago

That's not what this issue is about though. We need to find a mechanism with the new API that allows us to customize the "request". We have fewer instances now but the use case still remains IMO

snicoll commented 5 years ago

We currently have a ProjectRequestResolver and a post-processor callback that should go away as ProjectRequest is going to be a web-specific concern once this work is merged.

I think it would be nice to have a ProjectDescriptionResolver that uses available ProjectDescriptionCustomizer beans from the context. Such bean is independent from the project generation lifecycle so we could attempt to get it from the context and fallback to a simple implementation if it is not available.

We should probably remove the resolve method on ProjectDescription and simply call the constructor of ResolvedProjectDesription in the few places we use it at the moment (tests for the most part).

Once we have this infrastructure in place, we can update the customizer on start-site and hopefully we shouldn't have no use whatsoever of ProjectRequest anymore.

I am happy to spend a bit of time on it if you prefer to focus on something else, feel free to assign me.