wilkinsona / project-generator

3 stars 4 forks source link

Make sure ProjectDescription in the child context is immutable #56

Closed snicoll closed 5 years ago

snicoll commented 5 years ago

ProjectDescription is the source of condition evaluations so it shouldn't be possible to mutate it. The original request, however, can and will be mutated by extensions (we have many in the current production instance).

To make the separation between the two crystal clear, the generation entry point signature could change to the following:

public Path generate(ResolvedProjectDescription description) throws IOException

The current ProjectDescription can be mutated at will before being resolved, probably via a ProjectDescriptionResolver. This will replace the existing ProjectRequestResolver