Skip to content

Commit

Permalink
Lifecycle hooks called in reverse order
Browse files Browse the repository at this point in the history
  • Loading branch information
tisztamo committed Dec 6, 2020
1 parent 0b02afd commit f150b5e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Plugins"
uuid = "231a7ae5-8495-40ed-9891-ff920a14b9bd"
authors = ["Krisztián Schaffer"]
version = "0.4.1"
version = "0.4.2"

[compat]
julia = "1.4"
Expand Down
6 changes: 3 additions & 3 deletions src/Plugins.jl
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,12 @@ function create_lifecyclehook(op::Function)
return (stack::PluginStack, data...) -> begin
allok = true
results = []
for plugin in stack.plugins
for plugin in reverse(stack.plugins)
try
push!(results, op(plugin, data...))
pushfirst!(results, op(plugin, data...))
catch e
allok = false
push!(results, (e, catch_backtrace()))
pushfirst!(results, (e, catch_backtrace()))
end
end
return (allok = allok, results = results)
Expand Down

2 comments on commit f150b5e

@tisztamo
Copy link
Owner Author

Choose a reason for hiding this comment

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

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

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

Registration pull request created: JuliaRegistries/General/25902

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.4.2 -m "<description of version>" f150b5ea9b607f4e0dc857a0f6cf0f59bbb05ee3
git push origin v0.4.2

Please sign in to comment.