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

Add OTP versions in docs for "new" functions and modules #2044

Merged
merged 7 commits into from Dec 13, 2018

Conversation

@sverker
Copy link
Contributor

@sverker sverker commented Dec 5, 2018

The reference documentation will tell in which OTP version a function or module was first introduced.

For entire new modules, a "Since" headline is added at the top. Example:
http://erlang.org/~sverker/since/lib/stdlib-3.6/doc/html/rand.html

For functions, an OTP version is shown in the right margin. Example:
http://erlang.org/~sverker/since/erts-10.1.3/doc/html/erlang.html
(search for "OTP" a couple of times)

OTP versions older than R13B04 will not be shown.

You can browse all modules here:
http://erlang.org/~sverker/since/doc/man_index.html

@essen
Copy link
Contributor

@essen essen commented Dec 5, 2018

Nice! That's useful. Orange though?

@sverker
Copy link
Contributor Author

@sverker sverker commented Dec 5, 2018

@essen
For functions I thought the versions should have something that makes them stand out from the surrounding text, a possibly long function spec.

Maybe green is nicer, same color as the "Note" boxes.

@essen
Copy link
Contributor

@essen essen commented Dec 5, 2018

For functions I thought the versions should have something that makes them stand out from the surrounding text, a possibly long function spec.

It does! Perhaps a bit too much.

Maybe green is nicer, same color as the "Note" boxes.

I'm sure @marianoguerra will want to pitch in. :-)

@michalmuskala
Copy link
Contributor

@michalmuskala michalmuskala commented Dec 5, 2018

That's a great addition overall. It will make it simpler when working on libraries that need to support older versions.

For reference this is how similar information is displayed in the Elixir docs: https://hexdocs.pm/elixir/Date.html#add/2

@marianoguerra
Copy link
Contributor

@marianoguerra marianoguerra commented Dec 5, 2018

Looks good!

Maybe for recent releases (2?) it has a more prominent color, since you should consider the compatibility implications of using it

for older releases it gets a softer color like grey, since it should be OK to use them, and someone who has to support older versions knows where to look.

@KennethL
Copy link
Contributor

@KennethL KennethL commented Dec 5, 2018

The actual layout in the generated html is not in place yet. And is open for comments. A modified version is under construction.

@sverker sverker self-assigned this Dec 5, 2018
@crownedgrouse
Copy link
Contributor

@crownedgrouse crownedgrouse commented Dec 6, 2018

Orange color should be used for deprecated functions and modules, maybe?

@sverker
Copy link
Contributor Author

@sverker sverker commented Dec 10, 2018

Now a more discreet look.

@essen
Copy link
Contributor

@essen essen commented Dec 10, 2018

Looks good!

sverker added 3 commits Dec 11, 2018
'*' is part of the return type, not the function name.
for <func><name> and <module> with "since" attribute.
@sverker sverker force-pushed the sverker/add-since-doc/OTP-15460 branch from 7525fa0 to 20cc39d Dec 11, 2018
@sverker sverker added testing and removed testing labels Dec 11, 2018
sverker added 3 commits Dec 12, 2018
The ones marked since="?" are unknown (but newer than R13B03)

monitor/2
port_info/2
process_flag/2
statistics/1
system_flag/2
system_info/1
trace_pattern/3
@sverker sverker merged commit 7c7a477 into erlang:maint Dec 13, 2018
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants