JuliaLang / Compat.jl

Compatibility across Julia versions
Other
145 stars 117 forks source link

Add dot(x,A,y) #683

Closed mcabbott closed 4 years ago

mcabbott commented 4 years ago

This adds most of https://github.com/JuliaLang/julia/pull/32739.

I got tired of copying and skipped some of the more exotic matrix types. They should all hit the generic fallback though, so should still work.

I commented out bits of src/deprecated.jl to make tests pass. I’m not too sure what those are meant to do, and whether they are still needed post-1.0?

martinholters commented 4 years ago

Removing the deprecations makes this a breaking change, which I'd like to avoid. If you use dot qualified everywhere (i.e. LinearAlgebra.dot), that should go a long way. What other problems appear with the deprecations in place?

martinholters commented 4 years ago

Ok, I've re-enabled the deprecations after some tweaking.

martinholters commented 4 years ago

Can we get some nicer code formatting here? E.g. no lines longer than 92 chars and import and using statements collected at the top. (Yes, I missed the opportunity to do so in the commit I've pushed.)

mcabbott commented 4 years ago

See if you like the current version, not strictly 92 but narrower than earlier things. And thanks for fixing the deprecations earlier!

mcabbott commented 4 years ago

The generic case is tested, in that commenting it out leads to MethodError: no method matching dot(::Int64, ::Int64, ::Int64). I can't see a test for Diagonal in https://github.com/JuliaLang/julia/pull/32739/files , so I've invented one.

martinholters commented 4 years ago

I've added a merge of master and moved the README entry to the top of the list, and bumped the version to 3.2.0. Once CI is green, I'll merge and tag a release.