-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Clarify nullability of ProjectDescription attributes #974
Comments
While this could be mitigated with the fact that contributors may infer a default, |
On the other hand, it's hard to force an attribute of the project to be set if the contributors at play don't need it. We can imagine a custom instance using a fixed Flagging for team attention to see what the rest of the team thinks. |
I am back with the idea of a Doing so would provide sensible defaults for all properties if none are provided and let users change that to whatever custom implementation they want if necessary. |
Some more brainstorming. I am now considering a We can't really make the The filler implementation can be swapped to provide useful defaults (potentially with some more complex logic similar to what The alternative to this is to check if the value is set and then fail or back-off. Backing off sounds interesting to some use cases (like not generating a build file if the build system isn't set) but that would probably require a way to notice what happened (what the auto-configuration report does at the moment in Spring Boot). |
We discussed this on the call today and it looks like a process in two steps could be more interesting. One step to fill the There are two things that are bugging me with this approach:
What I had in mind initially was to decide:
The downside of this approach is that the description is potentially "filled" with information contributors don't need. It is annoying but having a unique nullability description of each attributes feels more important to me. Taking a concrete example. Let's assume we decide Perhaps this issue is complicated because the concept of |
Thanks for the summary @snicoll. I'm actually leaning towards the first approach that we discussed this morning. I think rather than setting if the attribute is optional or not in stone, it seems better to let the infrastructure decide what's mandatory and what's not. To your point about the nullability then being dependent on the infrastructure, I think that's acceptable because the infrastructure defines what assets should be contributed to the project. It addresses the issue for simpler infrastructures, the ones that contribute only a build file for example, and they don't need to provide defaults or validate other fields. |
Right now, platformVersion is expected to be non null in various contributors but there is nothing that really enforces that.
We should review the various attributes, document them and enforce non nullability when the description is resolved.
The text was updated successfully, but these errors were encountered: