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

Julia 0.4.6 backport of #15334 #16990

Merged

Conversation

omus
Copy link
Member

@omus omus commented Jun 17, 2016

The original PR didn't backport cleanly as base/docs/helpdb/Dates.jl didn't exist on 0.4 and Markdown tables were not supported.

@tkelman
Copy link
Contributor

tkelman commented Jun 17, 2016

can you add the cross-reference to the original commit sha and PR # in the commit message? thanks

Millisecond(v)

.. Docstring generated from Julia source
.. data:: Year(v)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this supposed to be data?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original PR did switch it from function to data. Worth noting that all those functions do have docstrings attached.

@tkelman
Copy link
Contributor

tkelman commented Jun 17, 2016

and Markdown tables were not supported.

I think I backported that in my branch?

- Added documentation for Dates.format
- Added documentation for date accessors
- Eliminated cross-referencing similar to: "see above"
- Sync date accessor docstrings with manual
- Fixed signatures of certain Period constructors. Hour, Minute, Second
  and Millisecond would always fail when a Date was given as an argument

(cherry picked from commit c26cfa7)
ref JuliaLang#15334
@omus omus force-pushed the cv/backports-dateformat-docs branch from a14441e to 3be0d25 Compare June 18, 2016 04:23
@omus
Copy link
Member Author

omus commented Jun 18, 2016

I'm working off of your branch (currently 7d54836). When running make julia-genstdlib I'm getting:

ERROR: LoadError: MethodError: `writemime` has no method matching writemime(::Base.AbstractIOBuffer{Array{UInt8,1}}, ::MIME{symbol("text/rst")}, ::Base.Markdown.Table)
Closest candidates are:
  writemime(::IO, !Matched::AbstractString, ::Any)
  writemime(::IO, !Matched::MIME{symbol("text/plain")}, ::Any)
  writemime(::IO, ::MIME{symbol("text/rst")}, !Matched::Base.Markdown.MD)
  ...
 in rst at markdown/render/rst.jl:66
 in rst at markdown/render/rst.jl:8
 in rst at markdown/render/rst.jl:14
 in sprint at ./iostream.jl:206
 in split_decl_rst at /Users/omus/Development/Julia/0.4/doc/genstdlib.jl:166
 in anonymous at /Users/omus/Development/Julia/0.4/doc/genstdlib.jl:248
 in open at iostream.jl:114
 in translate at /Users/omus/Development/Julia/0.4/doc/genstdlib.jl:184
 [inlined code] from /Users/omus/Development/Julia/0.4/doc/genstdlib.jl:292
 in anonymous at no file:0
 in include at ./boot.jl:261
 in include_from_node1 at ./loading.jl:320
 in process_options at ./client.jl:280
 in _start at ./client.jl:378
while loading /Users/omus/Development/Julia/0.4/doc/genstdlib.jl, in expression starting on line 288
make: *** [julia-genstdlib] Error 1

If/when Markdown tables get backported I'll happily update this PR to use the Markdown tables.

@tkelman
Copy link
Contributor

tkelman commented Jun 18, 2016

I was thinking of c47090d - so is genstdlib broken in some way here?

@omus
Copy link
Member Author

omus commented Jun 18, 2016

The issue with make julia-genstdlib only occurs when trying to use Markdown tables in docstrings. In this PR I switched to using RST tables so the documentation builds just fine.

I don't think we need to fix genstdlib here. I'm fine with just using an RST table for the backport but if we decide to backport Markdown table support I can switch this documentation back to using Markdown tables.

@MichaelHatherly
Copy link
Member

I think 1517b72 is probably what's needed here as well as c47090d. There might be some other parts of #14378 that are also needed for backporting these changes to work correctly.

@tkelman tkelman merged commit 2c7288e into JuliaLang:tk/backports-0.4.6 Jun 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants