Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add flag to disable warnings #10

Merged
merged 1 commit into from
Apr 1, 2018
Merged

add flag to disable warnings #10

merged 1 commit into from
Apr 1, 2018

Conversation

jrevels
Copy link
Contributor

@jrevels jrevels commented Mar 31, 2018

First of all, thanks for this package - it works great for auto-CSEing dual number primitive definitions in ForwardDiff.

After JuliaDiff/DiffRules.jl#11, some of these primitive definitions contain if statements, which basically means that whenever somebody loads ForwardDiff for this first time, they see a bunch of:

WARNING: CommonSubexpressions can't yet handle expressions of this form: if

For ForwardDiff's case, I don't mind if CSE can't be applied to an expression - I'm fine with this package just trying its best and handing me whatever the result is. Thus, this PR will allow me to disable this warning so users don't get scared.

If you could get a new tag quickly after this is merged, I'd be super appreciative. If that's too complicated, right now, though, I can hack around this warning in ForwardDiff in the meantime.

@rdeits
Copy link
Owner

rdeits commented Mar 31, 2018

Thanks, and I'm happy to tag a release as soon as this is merged. Can you just please check the test failure on Travis? It looks like a real error. I can also look into it, but I'm on mobile so it wouldn't be until tonight.

@jrevels
Copy link
Contributor Author

jrevels commented Mar 31, 2018

Ah, forgot to add the warn_enabled argument to cse. Just pushed a fix, let's see if it passes now.

@codecov-io
Copy link

codecov-io commented Mar 31, 2018

Codecov Report

Merging #10 into master will not change coverage.
The diff coverage is 90.9%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #10   +/-   ##
=======================================
  Coverage   97.67%   97.67%           
=======================================
  Files           1        1           
  Lines          43       43           
=======================================
  Hits           42       42           
  Misses          1        1
Impacted Files Coverage Δ
src/CommonSubexpressions.jl 97.67% <90.9%> (ø) ⬆️

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 912260d...ab2005f. Read the comment docs.

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.

None yet

3 participants