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

remove duplicate LinearIndices docs #27037

Merged
merged 3 commits into from
May 9, 2018
Merged

remove duplicate LinearIndices docs #27037

merged 3 commits into from
May 9, 2018

Conversation

fredrikekre
Copy link
Member

@fredrikekre fredrikekre added the docs This change adds or pertains to documentation label May 9, 2018
@fredrikekre
Copy link
Member Author

Hmm, seems like this was not the full solution, let me investigate.

@@ -377,7 +377,7 @@ module IteratorsMD
next(iter::Reverse{<:CartesianIndices{0}}, state) = CartesianIndex(), true
done(iter::Reverse{<:CartesianIndices{0}}, state) = state

LinearIndices(inds::CartesianIndices{N,R}) where {N,R} = LinearIndices{N,R}(inds.indices)
Base.LinearIndices(inds::CartesianIndices{N,R}) where {N,R} = LinearIndices{N,R}(inds.indices)
Copy link
Member Author

Choose a reason for hiding this comment

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

This was a module local function, which was undocumented. Documenter then complained that there were no docs, since we reference this function in the same module (L214).

Copy link
Member

@Sacha0 Sacha0 left a comment

Choose a reason for hiding this comment

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

Thanks Fredrik! :)

@deprecate CartesianIndices(inds::Vararg{AbstractUnitRange{Int},N}) where {N} CartesianIndices(inds)
@deprecate CartesianIndices(inds::Vararg{AbstractUnitRange{<:Integer},N}) where {N} CartesianIndices(inds)
@deprecate LinearIndices(inds::Vararg{AbstractUnitRange{Int},N}) where {N} LinearIndices(inds)
@deprecate LinearIndices(inds::Vararg{AbstractUnitRange{<:Integer},N}) where {N} LinearIndices(inds)
Copy link
Member Author

Choose a reason for hiding this comment

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

These two LinearIndices definitions ended up beeing module local without the import.

CartesianIndices(inds::AbstractUnitRange{Int}) = CartesianIndices(axes(inds))
CartesianIndices(inds::AbstractUnitRange{<:Integer}) = CartesianIndices(axes(inds))
LinearIndices(inds::AbstractUnitRange{Int}) = LinearIndices(axes(inds))
LinearIndices(inds::AbstractUnitRange{<:Integer}) = LinearIndices(axes(inds))
Copy link
Member Author

Choose a reason for hiding this comment

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

Are these definitions correct? Fixes #26775 (comment) at least.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, should be OK to work around the deprecation.

@fredrikekre fredrikekre requested review from mbauman and nalimilan May 9, 2018 08:05
@fredrikekre
Copy link
Member Author

Tests pass locally and doc building works on this branch. Failures are now only #27041

@nalimilan
Copy link
Member

Failures are indeed due to download, merging.

@nalimilan nalimilan merged commit b81b118 into master May 9, 2018
@nalimilan nalimilan deleted the fe/fix-doc-failure branch May 9, 2018 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This change adds or pertains to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants