{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaArrays/StaticArrays.jl/issues/348","repository_url":"https://api.github.com/repos/JuliaArrays/StaticArrays.jl","labels_url":"https://api.github.com/repos/JuliaArrays/StaticArrays.jl/issues/348/labels{/name}","comments_url":"https://api.github.com/repos/JuliaArrays/StaticArrays.jl/issues/348/comments","events_url":"https://api.github.com/repos/JuliaArrays/StaticArrays.jl/issues/348/events","html_url":"https://github.com/JuliaArrays/StaticArrays.jl/pull/348","id":280243260,"number":348,"title":"Use new broadcast API","user":{"login":"pablosanjose","id":4310809,"avatar_url":"https://avatars3.githubusercontent.com/u/4310809?v=4","gravatar_id":"","url":"https://api.github.com/users/pablosanjose","html_url":"https://github.com/pablosanjose","followers_url":"https://api.github.com/users/pablosanjose/followers","following_url":"https://api.github.com/users/pablosanjose/following{/other_user}","gists_url":"https://api.github.com/users/pablosanjose/gists{/gist_id}","starred_url":"https://api.github.com/users/pablosanjose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pablosanjose/subscriptions","organizations_url":"https://api.github.com/users/pablosanjose/orgs","repos_url":"https://api.github.com/users/pablosanjose/repos","events_url":"https://api.github.com/users/pablosanjose/events{/privacy}","received_events_url":"https://api.github.com/users/pablosanjose/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-12-07T19:07:19Z","updated_at":"2017-12-07T22:10:04Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/JuliaArrays/StaticArrays.jl/pulls/348","html_url":"https://github.com/JuliaArrays/StaticArrays.jl/pull/348","diff_url":"https://github.com/JuliaArrays/StaticArrays.jl/pull/348.diff","patch_url":"https://github.com/JuliaArrays/StaticArrays.jl/pull/348.patch"},"body":"Attempt to fix #347 \r\n\r\n(Please review carefully, as I'm still quite new at this.)\r\n\r\nI implemented a `StaticArrayStyle{N} <: AbtractArrayStyle{N}` to plug into the new `broadcast` API introduced in julialang/#23939, together with two specialised indirections for `broadcast` and `broadcast!` that call the old `@generated _broadcast` and `@generated _broadcast!` routines. The latter does still seem to be a bit faster and allocate a little less than the Base `broadcast!` fallback. However, the Base fallback also works.\r\n\r\n~~I see tight `@code_native` output, similar or identical to the one before julialang/#23939. Timings and allocations also seem identical, although I didn't do exhaustive testing.~~ ~~[EDIT: not always]~~ [EDIT2: fixed now, hopefully]\r\n\r\n**Caveat**\r\nThe package tests now work again, except for those involving broadcast between `Scalar(...)` and normal `Array`s. I'm afraid I need a bit of help with this one. As an example `Scalar(3) .* [1,2,3]` fails with the same error as `Scalar(3) * 2`, a `BoundsError`. This is the case both before and after julialang/#23939, but for some reason `Scalar(3) .* [1,2,3]` did work with the old broadcast API, and returned `Array{Int}[2, 4, 6]`. What is the expected behavior for this? What should `Scalar(3) * 2` give? How should `Scalar(3) .* [1,2,3]` be fixed with the new broadcast API?\r\n\r\n[EDIT: fixed Scalar broadcast. I needed to properly define the correct broadcast promotions using binary methods for `BroadcastStyle`]"},"comment":{"url":"https://api.github.com/repos/JuliaArrays/StaticArrays.jl/issues/comments/350109965","html_url":"https://github.com/JuliaArrays/StaticArrays.jl/pull/348#issuecomment-350109965","issue_url":"https://api.github.com/repos/JuliaArrays/StaticArrays.jl/issues/348","id":350109965,"user":{"login":"coveralls","id":2354108,"avatar_url":"https://avatars1.githubusercontent.com/u/2354108?v=4","gravatar_id":"","url":"https://api.github.com/users/coveralls","html_url":"https://github.com/coveralls","followers_url":"https://api.github.com/users/coveralls/followers","following_url":"https://api.github.com/users/coveralls/following{/other_user}","gists_url":"https://api.github.com/users/coveralls/gists{/gist_id}","starred_url":"https://api.github.com/users/coveralls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coveralls/subscriptions","organizations_url":"https://api.github.com/users/coveralls/orgs","repos_url":"https://api.github.com/users/coveralls/repos","events_url":"https://api.github.com/users/coveralls/events{/privacy}","received_events_url":"https://api.github.com/users/coveralls/received_events","type":"User","site_admin":false},"created_at":"2017-12-07T22:10:04Z","updated_at":"2017-12-07T22:10:04Z","author_association":"NONE","body":"\n[![Coverage Status](https://coveralls.io/builds/14554041/badge)](https://coveralls.io/builds/14554041)\n\nCoverage decreased (-0.07%) to 93.297% when pulling **1a00c3fafb74d7139d4604d7504c7a17443ba32f on pablosanjose:newbroadcast** into **bb5102170dae514e440c1db5f22ba6e6e2bfc59a on JuliaArrays:master**.\n"}}
{"actor":{"display_login":"coveralls"}}