-
Notifications
You must be signed in to change notification settings - Fork 7
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
Remove a convert method #52
base: master
Are you sure you want to change the base?
Conversation
Ok, it looks like a recent change to type intersection changed this, but I'm not totally confident it won't change again, so let's just keep the method for now. |
Codecov Report
@@ Coverage Diff @@
## master #52 +/- ##
=========================================
- Coverage 74.95% 74.9% -0.05%
=========================================
Files 13 13
Lines 519 518 -1
=========================================
- Hits 389 388 -1
Misses 130 130
Continue to review full report at Codecov.
|
I think removing the method seems to work on both julia 1.1 and 1.2, so maybe that is the right way to do it for now? |
Would it be crazy to dynamically determine if you need disambiguation at precompile-time? Something like this: try
convert(Any, NA)
true
catch err
err isa MethodError || rethrow()
false
end || begin
Base.convert(::Type{Any}, ::DataValue{Union{}}) = NA
end |
That seems very involved :) I almost feel having the static version check there is simpler? |
I thought it's nice to be able to define it only using stable public API; i.e., it does/will not have to record which past/future Julia versions need this definition. |
@JeffBezanson, do you have an opinion about that kind of approach? |
Fixes #51.
@JeffBezanson I guess this would be the PR, but it fails tests with the method ambiguity error. Opening a PR so that we can see what happens on julia nightly.