Skip to content
This repository has been archived by the owner on May 4, 2019. It is now read-only.

RFC: work around MethodErrors with Base.OneTo #205

Merged
merged 7 commits into from
Jul 11, 2016

Conversation

tkelman
Copy link
Contributor

@tkelman tkelman commented Jul 10, 2016

trying to work around OneTo issue on nightly

to work around OneTo issue
@tkelman tkelman changed the title Call map(last, ...) on broadcast_shape WIP: Call map(last, ...) on broadcast_shape Jul 10, 2016
on output of broadcast_shape and index_shape

still need to work out a checkbounds test
@nalimilan
Copy link
Member

Thanks. Looks good to me, though I'd have called these _broadcast_shape and _index_shape.

@tkelman tkelman changed the title WIP: Call map(last, ...) on broadcast_shape WIP: Trying to work around MethodErrors with Base.OneTo Jul 10, 2016
@tkelman
Copy link
Contributor Author

tkelman commented Jul 10, 2016

Unfortunately it seems to break an @inferred test on release, and still has a bounds-checking issue on nightly.

@@ -79,7 +79,7 @@ end


if isdefined(Base, :checkindex)
Base.checkindex(::Type{Bool}, ::UnitRange, ::NAtype) =
Base.checkindex(::Type{Bool}, ::AbstractUnitRange, ::NAtype) =
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@timholy there will presumably be a window of base versions where checkindex is defined but AbstractUnitRange is not, so for the sake of bisecting base bugs I think this needs adjusting a little? I gave you collaborator access to my fork if that helps, I'm not a member of JuliaStats (are you?)

Copy link
Member

Choose a reason for hiding this comment

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

Looks like Tim isn't a JuliaStats member. I was recently made a member so I'd be happy to help out however I can.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was just gonna declare you my next-most-active surrogate for Milan while he's on vacation ☀️

Copy link
Member

Choose a reason for hiding this comment

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

Party on, Wayne

@tkelman
Copy link
Contributor Author

tkelman commented Jul 11, 2016

I'll make Milan's suggested renamings when I'm at a desk.

@tkelman tkelman changed the title WIP: Trying to work around MethodErrors with Base.OneTo RFC: work around MethodErrors with Base.OneTo Jul 11, 2016
@tkelman
Copy link
Contributor Author

tkelman commented Jul 11, 2016

okay if this is green I think it's good to merge, and I suppose tag too since there haven't been many serious changes since the last tag

@ararslan
Copy link
Member

ararslan commented Jul 11, 2016

Yep, I agree it should be merged and tagged. Idk how permissions work since you aren't a JuliaStats member but if you can't tag it then I can tag it a little later (then go around frantically submitting and rebasing my PRs to bump the DataArrays requirement).

Thanks so much for doing this!

@tkelman
Copy link
Contributor Author

tkelman commented Jul 11, 2016

I could submit a tag PR to metadata, but someone with commit access would need to push the git tag here

@tkelman
Copy link
Contributor Author

tkelman commented Jul 11, 2016

submitting and rebasing my PRs to bump the DataArrays requirement

Which PR's? This fixes matters on 0.5, but I don't think there's anything in here as far as DataArrays API's that other packages would rely on?

@ararslan
Copy link
Member

I assume this would fix the issue that's breaking the DataFrames and GLM tests on 0.5. Regarding the PRs, my brain was stuck in yesterday when I had a couple of outstanding PRs. (Insert hackneyed joke about Mondays here)

@tkelman
Copy link
Contributor Author

tkelman commented Jul 11, 2016

Ah, I hope so. What you would do there is add upper bounds on the julia dependency of old package tags to reflect that they don't work with too-new versions of 0.5-dev, but people don't usually go to that level of detail on Julia version bounds.

@ararslan ararslan merged commit b8cf8ae into JuliaStats:master Jul 11, 2016
@tkelman
Copy link
Contributor Author

tkelman commented Jul 12, 2016

annoying thing about squashes is they don't preserve multiple-author information very well

@ararslan
Copy link
Member

Oh you're right, I hadn't noticed that. That's too bad.

@ararslan
Copy link
Member

Is there anything that can be done that's somewhere between a straight merge and a squash-n-merge that would better preserve the author information? Or in cases like these should regular merges be preferred?

@tkelman
Copy link
Contributor Author

tkelman commented Jul 12, 2016

Depends what you care more about - skipping the intermediate commits (not all of which may have worked perfectly) in the future if you need to bisect through the history of the package, or preserving the authorship information. I don't think git allows you to have more than one author on a single commit, though you could manually edit the message to at least acknowledge multiple authors in the content of the log?

@ararslan
Copy link
Member

Should I revert the commit, modify the log to mention Tim, and recommit? It'd be nice to have him in there. In the future I'll make sure all contributors are mentioned in squashed commits before merging. Sorry for the oversight here.

@tkelman
Copy link
Contributor Author

tkelman commented Jul 12, 2016

I don't think he'll take it personally, and the more-linear history might help matters for some future bisect, you never know. You could also do the thing that Stefan has done on base a few times and make an empty merge commit that has both current master and the granular series of commits from this branch as parents. Though I don't know what that would do to bisects...

@ararslan
Copy link
Member

I'm not sure how to do that but I'd be happy to figure it out if that's what you think would be best.

@tkelman
Copy link
Contributor Author

tkelman commented Jul 12, 2016

I'm not positive how to do it either, I don't think it's worth worrying about.

@ararslan
Copy link
Member

Okay. Well, to anyone reading this, Tim Holy rocks and has made invaluable contributions to this PR! 🎸 🤘 👏

@timholy
Copy link
Contributor

timholy commented Jul 12, 2016

Thanks guys. As @tkelman surmises, credit is much less important than avoiding possibly-dangerous git shenanigans, so no sweat.

@tkelman tkelman deleted the broadcast_shape branch July 12, 2016 08:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants