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

pass correct paths through to docstrings #22113

Merged
merged 1 commit into from
May 30, 2017
Merged

pass correct paths through to docstrings #22113

merged 1 commit into from
May 30, 2017

Conversation

vtjnash
Copy link
Member

@vtjnash vtjnash commented May 29, 2017

fix #22105

@tkelman
Copy link
Contributor

tkelman commented May 29, 2017

@mortenpi is there a test that could be added within base that would have caught the regression?

@mortenpi
Copy link
Contributor

This would have caught it:

# issue #22105
module I22105
lineno = @__LINE__
"""
"""
function foo end
end

let foo_docs = meta(I22105)[@var(I22105.foo)].docs
    @test length(foo_docs) === 1
    @test isa(first(foo_docs), Pair)
    local docstr = first(foo_docs).second
    @test isa(docstr, DocStr)
    @test docstr.data[:path] == Base.source_path()
    @test docstr.data[:linenumber] == I22105.lineno + 1
    @test docstr.data[:module] === I22105
    @test docstr.data[:typesig] === Union{}
    @test docstr.data[:binding] == Binding(I22105, :foo)
end

Also, I can confirm that this fixes the issue.

@tkelman tkelman added the needs tests Unit tests are required for this change label May 29, 2017
@vtjnash vtjnash removed the needs tests Unit tests are required for this change label May 29, 2017
@kshyatt kshyatt added the docsystem The documentation building system label May 29, 2017
@vtjnash vtjnash merged commit 526ed78 into master May 30, 2017
@vtjnash vtjnash deleted the jn/22105 branch May 30, 2017 03:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docsystem The documentation building system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong paths for docstrings
4 participants