Skip to content

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

Merged
sverker merged 7 commits into
erlang:maintfrom
sverker:sverker/add-since-doc/OTP-15460
Dec 13, 2018
Merged

Add OTP versions in docs for "new" functions and modules#2044
sverker merged 7 commits into
erlang:maintfrom
sverker:sverker/add-since-doc/OTP-15460

Conversation

@sverker
Copy link
Copy Markdown
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
Copy Markdown
Contributor

essen commented Dec 5, 2018

Nice! That's useful. Orange though?

@sverker
Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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.

@sverker sverker added team:VM Assigned to OTP team VM enhancement labels Dec 5, 2018
@KennethL
Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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

@sverker
Copy link
Copy Markdown
Contributor Author

sverker commented Dec 10, 2018

Now a more discreet look.

@essen
Copy link
Copy Markdown
Contributor

essen commented Dec 10, 2018

Looks good!

'*' 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 Compare December 11, 2018 16:46
@sverker sverker added the testing currently being tested, tag is used by OTP internal CI label Dec 11, 2018
@sverker sverker added testing currently being tested, tag is used by OTP internal CI and removed testing currently being tested, tag is used by OTP internal CI labels Dec 11, 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
@sverker sverker deleted the sverker/add-since-doc/OTP-15460 branch June 16, 2022 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement team:VM Assigned to OTP team VM testing currently being tested, tag is used by OTP internal CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants