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

Unix: the API doc should say how functions behave under windows. #5253

Closed
vicuna opened this issue Apr 22, 2011 · 7 comments
Closed

Unix: the API doc should say how functions behave under windows. #5253

vicuna opened this issue Apr 22, 2011 · 7 comments

Comments

@vicuna
Copy link

vicuna commented Apr 22, 2011

Original bug ID: 5253
Reporter: @Chris00
Status: closed (set by @damiendoligez on 2016-03-22T15:14:05Z)
Resolution: fixed
Priority: normal
Severity: text
Version: 3.13.0+dev
Target version: 4.03.0+dev / +beta1
Fixed in version: 4.03.0+dev / +beta1
Category: documentation
Tags: patch
Monitored by: @dbuenzli @Chris00

Bug description

It is rather inconvenient to have to go back to the manual [1] to find out whether a function has been implemented under windows. It would be more convenient to have this information right in the documentation of the Unix module (especially if one searches the API with ocamldoc). Moreover, I believe this would keep the doc. more in sync: for example [getgid] is reported twice with different comments, [getegid] is said to be not implemented while it is, [geteuid] is not mentioned,...

[1] http://caml.inria.fr/pub/docs/manual-ocaml/manual035.html

File attachments

@vicuna
Copy link
Author

vicuna commented Sep 16, 2013

Comment author: Bardou

The documentation for set_nonblock is that one should use threads, but maybe Unix.select is another option.

@vicuna
Copy link
Author

vicuna commented Dec 11, 2015

Comment author: @alainfrisch

It's an excellent idea to document Windows support right in unix.mli. Do you feel like bringing your patch up to date with the current trunk and submitting a pull request on Github?

@vicuna
Copy link
Author

vicuna commented Dec 13, 2015

Comment author: @Chris00

I definitely can bring the patch up to date with the current trunk. With the advent of ppx however, I was wondering if, in addition to the documentation, it would not be desirable to introduce a new attribute to say that some function is only on some os_type. An associated warning (turned off by default) would make possible to be sure that a given code does not use functions specific to a given platform (that would also be useful for some external libraries I think).

@vicuna
Copy link
Author

vicuna commented Dec 13, 2015

Comment author: @Chris00

Done. See #349

@vicuna
Copy link
Author

vicuna commented Dec 14, 2015

Comment author: @alainfrisch

Great! Should we keep the explicit list of unsupported features in the manual, or simply refer to the documentation of the Unix interface?

@vicuna
Copy link
Author

vicuna commented Dec 14, 2015

Comment author: @dbuenzli

The list in the manual is useful because it gives a bird eyes view of what you don't get on Windows but OTOH having the same information at two places increases the chances that it gets out of sync.

@vicuna
Copy link
Author

vicuna commented Mar 22, 2016

Comment author: @damiendoligez

Closing this PR: #349 was merged.

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