Skip to content

Use $ to eagerly evaluate expressions in @~#90

Open
tkf wants to merge 5 commits into
JuliaArrays:masterfrom
tkf:escape
Open

Use $ to eagerly evaluate expressions in @~#90
tkf wants to merge 5 commits into
JuliaArrays:masterfrom
tkf:escape

Conversation

@tkf

@tkf tkf commented Dec 22, 2019

Copy link
Copy Markdown
Member

With this PR, you can use @~ A .+ $Ref(x) to eagerly evaluate the sub-expression Ref(x).

@tkf

tkf commented Dec 22, 2019

Copy link
Copy Markdown
Member Author

This test is failing:

@test apply(*,A,x) == apply(*,Array(A),x) == apply(*,A,Array(x)) == Array(A)*Array(x)

https://travis-ci.org/JuliaArrays/LazyArrays.jl/jobs/628247559#L302

But I don't understand why changing the macro definition would change this test. Also, I can't reproduce this locally with Pkg.test(coverage=true)... Any idea how to fix this?

@dlfivefifty

Copy link
Copy Markdown
Member

Just change it to : there's no reason to assume it should be ==: Array multiplication uses BLAS while the other doesn't.

I have no idea why an unrelated change would trigger this, and only on two builds though.

@codecov

codecov Bot commented Dec 22, 2019

Copy link
Copy Markdown

Codecov Report

Merging #90 into master will increase coverage by 0.43%.
The diff coverage is 82.35%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #90      +/-   ##
==========================================
+ Coverage   77.41%   77.84%   +0.43%     
==========================================
  Files          14       14              
  Lines        1160     1169       +9     
==========================================
+ Hits          898      910      +12     
+ Misses        262      259       -3
Impacted Files Coverage Δ
src/LazyArrays.jl 66.66% <0%> (-33.34%) ⬇️
src/lazyapplying.jl 62.93% <50%> (+0.26%) ⬆️
src/lazyconcat.jl 83.81% <75%> (+0.09%) ⬆️
src/cache.jl 95.32% <80%> (+6%) ⬆️
src/linalg/lazymul.jl 89.36% <88.88%> (+1.36%) ⬆️
src/lazybroadcasting.jl 77.89% <92.3%> (-2.33%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fa70c53...2348dbc. Read the comment docs.

@tkf

tkf commented Dec 22, 2019

Copy link
Copy Markdown
Member Author

Thanks, using helps.

@dlfivefifty

Copy link
Copy Markdown
Member

Let me know when you want this merged

@tkf

tkf commented Jan 14, 2020

Copy link
Copy Markdown
Member Author

It's good to go for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants