Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Support 0.6 #8

Merged
merged 2 commits into from
Apr 18, 2017
Merged

Support 0.6 #8

merged 2 commits into from
Apr 18, 2017

Conversation

iamed2
Copy link
Member

@iamed2 iamed2 commented Apr 17, 2017

Adds some very specific version checks and fixes some (not all) deprecations.

@iamed2 iamed2 requested a review from rofinn April 17, 2017 21:49
@codecov
Copy link

codecov bot commented Apr 17, 2017

Codecov Report

Merging #8 into master will increase coverage by 3.32%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master      #8      +/-   ##
=========================================
+ Coverage   75.07%   78.4%   +3.32%     
=========================================
  Files           6       6              
  Lines         333     338       +5     
=========================================
+ Hits          250     265      +15     
+ Misses         83      73      -10
Impacted Files Coverage Δ
src/nodes.jl 59.68% <ø> (+3.87%) ⬆️
src/executors.jl 84.94% <100%> (+6.53%) ⬆️
src/macros.jl 97.43% <100%> (ø) ⬆️

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 14acc21...0b31e90. Read the comment docs.

src/executors.jl Outdated
),
on_error_inner!
)
@static if VERSION < v"0.6.0-dev.2042"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be cleaner to do something like

retry_args = @static if VERSION < v"0.6.0-dev.2042"
    (retries(exec), Base.DEFAULT_RETRY_MAX_DELAY)
else
    ExponentialBackoff(; n=retries(exec))
end

f = wrap_on_error(wrap_retry(run_inner!, allow_retry(retry_on(exec)), retry_args...))

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

    retry_args = @static if VERSION < v"0.6.0-dev.2042"
        (allow_retry(retry_on(exec)), retries(exec), Base.DEFAULT_RETRY_MAX_DELAY)
    else
        (ExponentialBackOff(; n=retries(exec)), allow_retry(retry_on(exec)))
    end

    f = wrap_on_error(
        wrap_retry(
            run_inner!,
            retry_args...,
        ),
        on_error_inner!
    )

How's this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that seems fine. It's annoying that the ordering of the arguments changed as well, but I think this clearly identifies what's actually different.

@@ -129,7 +129,7 @@ function process_nodes!(ex::Expr, ctx_sym::Symbol)
elseif ex.head === :dispatchinclude
process_include!(ex, ctx_sym)
else
map!(x->process_nodes!(x, ctx_sym), ex.args)
map!(x->process_nodes!(x, ctx_sym), ex.args, ex.args)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These maps are kinda ugly. Do you know why map!(f, collection) was removed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iamed2 iamed2 merged commit 7fd7e38 into master Apr 18, 2017
tkelman referenced this pull request Apr 19, 2017
In 0.5 asyncmap throws a CompositeException of the errors collected, while
in 0.6 it will simply throws the first error it finds. I've made note of this
difference in the `dispatch!` docstrings and updated the tests to handle each
julia version explicitly.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants