JuliaLang/julia#24324 introduced a breaking change whereby diag(::Diagonal) returns a copy of the underlying vector, rather than the vector itself as it used to be in 0.6 (@fredrikekre ). For code that relies on diag(::Diagonal) as an accessor function, this now produces large memory allocations.
This was a somehow breaking change but no warnings are emitted. Perhaps, the NEWS.md should be updated to reflect the new behaviour and probably the docs of diag(::Diagonal) too. What is the recommended way of accessing the underlying field?