Skip to content
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

ocamldoc: loses parameter descriptions without even warning #7693

Closed
vicuna opened this issue Dec 20, 2017 · 1 comment
Closed

ocamldoc: loses parameter descriptions without even warning #7693

vicuna opened this issue Dec 20, 2017 · 1 comment

Comments

@vicuna
Copy link

vicuna commented Dec 20, 2017

Original bug ID: 7693
Reporter: @ygrek
Status: acknowledged (set by @damiendoligez on 2018-06-05T14:49:34Z)
Resolution: open
Priority: normal
Severity: major
Version: 4.05.0
Category: ocamldoc
Monitored by: @nojb @gasche @dbuenzli

Bug description

It seems that @param id only works for named arguments, this is not mentioned in the manual afaics. It means when function has unnamed arguments then @param declarations are just ignored, also if named parameter doesn't match @param name the latter is ignored too. I would expect at least a warning when @param is ignored and I would better suggest to never drop user-supplied documentation even if it seems wrong to ocamldoc.

Steps to reproduce

$ cat a.ml

(** @param x argument to increment*)
let unnamed x = x + 1

(** @param x argument to increment *)
let named ~x = x + 1

(** @param x argument to increment *)
let misnamed ~y = y + 1

module type X = sig

(** [f1 x]
@param x argument to increment
@return result
*)
val f1 : int -> int

(** [f2 ~x]
@param x argument to increment
@return result
*)
val f2 : x:int -> int

(** [f3 ~x]
@param x argument to increment
@return result
*)
val f3 : y:int -> int

end

$ ocamldoc a.ml -html

@github-actions
Copy link

github-actions bot commented May 7, 2020

This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc.

@github-actions github-actions bot added the Stale label May 7, 2020
@github-actions github-actions bot closed this as completed Jun 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant