-
Notifications
You must be signed in to change notification settings - Fork 90
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
Cleanup implementation of --parent-id #1126
Conversation
src/odoc/compile.ml
Outdated
@@ -79,7 +85,7 @@ let resolve_parent_page resolver f = | |||
in | |||
let extract_parent = function | |||
| { Paths.Identifier.iv = `Page _; _ } as container -> Ok container | |||
| _ -> Error (`Msg "Specified parent is not a parent of this file") | |||
| { Paths.Identifier.iv = `LeafPage _; _ } -> Error (`Msg "leaf page") |
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.
Does this error message ever get exposed to the user?
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.
No, this is a leftover from debugging. The more exhaustive matching should be kept though.
| { Paths.Identifier.iv = `LeafPage _; _ } -> Error (`Msg "leaf page") | |
| { Paths.Identifier.iv = `LeafPage _; _ } -> Error (`Msg "Specified parent is not a parent of this file") |
Co-authored-by: panglesd <peada@free.fr>
Co-authored-by: panglesd <peada@free.fr>
Co-authored-by: panglesd <peada@free.fr>
When there was `--child` options passed, but no `--parent` option, the children were ignored. Co-authored-by: panglesd <peada@free.fr>
Co-authored-by: panglesd <peada@free.fr>
Signed-off-by: Paul-Elliot <peada@free.fr>
I'd prefer |
Good point! |
Heh, naming is hard :-) |
Option.map is 4.08+. We've talked about dropping support for older OCamls, but I'd rather do this in a separate PR than just because we happen to use a newer function. |
Only the changelog is left in the PR, but I am not sure what to do with it because this PR cleans up something that was done in a previous PR already. |
This cleans up the implementation of --parent-id.
It is currently possible to declare a module as your parent id, which can lead to conflicts that are silently resolved by overwritting pages.