Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib/types: Handle submodules for type "either"
So far the "either" type only handled "flat" types, so you couldn't do something like: type = either int (submodule { options = ...; }); Not only caused this the submodule's options not being checked but also not show up in the documentation. This was something we stumbled on with #13916. Signed-off-by: aszlig <aszlig@redmoonstudios.org> Cc: @edolstra
- Loading branch information
0f0805b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aszlig
This patch adds ambiguous behaviour in the way options are processed. One simple value can change the way all other values are interpreted without any warning.
from one module can make the change the semantic of
value
if it is defined in both submodules.If we are going to do so, I think the merge function should ensure that the set of options are completely disjoint.
In the mean time, I do not think this is a good idea, and suggest we should not accept this patch.
Also, why did this patch went into master without requesting a review?
0f0805b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nbp: You mean if you use something like
either submodule1 submodule2
?Other than that, I've tested the change by building the manual and checking against a few module declarations, but I'll revert and submit a PR for review.
0f0805b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also the reason I've pushed this directly to master is because we currently do not have option declarations with
either ... submodule
.0f0805b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nbp: See #14053.