Releases: rabbitmq/horus
Horus 0.3.1
At this point, Horus should be considered Alpha and not production ready. The API will likely evolve and future releases will likely introduce breaking changes. The goal of this release is to make it easy for anyone to try it and possibly give feedback.
What's new in Horus 0.3.1
This release ships a single bugfix: it works around race in cover:is_compiled/1
that emits an exception passed up to the caller of the public API of Horus.
See #28.
Download
Horus 0.3.1 is available from Hex.pm: https://hex.pm/packages/horus/0.3.1
Upgrade
Using Rebar:
-
Update your
rebar.config
:%% In rebar.config {deps, [{horus, "0.3.1"}]}.
-
Run
rebar3 upgrade horus
.
Using Erlang.mk:
-
Update your
Makefile
:%% In your Makefile dep_horus = hex 0.3.1
-
Remove the
deps/horus
directory. The new version will be fetched the next time you build your project.
Documentation
Horus 0.3.0
At this point, Horus should be considered Alpha and not production ready. The API will likely evolve and future releases will likely introduce breaking changes. The goal of this release is to make it easy for anyone to try it and possibly give feedback.
What's new in Horus 0.3.0
No support for native coverage in Erlang/OTP 27
More a disclaimer than a highlight unfortunately. Erlang/OTP 27 introduced native coverage support: there is a new instruction associated with internal counters in ERTS. The counters are specific to each module, so module A can't bump the counters of module B.
Horus has no way to artificially bump the counters of the original module(s) it extracted code from. Therefore, extracted code will appear as not executed at all if native coverage support is active.
The only thing new in this release is the support for the new executable_line
instruction; see #24. Testing was also adapted and reduced in the case of native support; see #25.
Other changes
- Ignore new Dialyzer errors detected by Erlang/OTP 27 that are related to the incomplete type spec of
compile:forms/2
(#23).
Download
Horus 0.3.0 is available from Hex.pm: https://hex.pm/packages/horus/0.3.0
Upgrade
Using Rebar:
-
Update your
rebar.config
:%% In rebar.config {deps, [{horus, "0.3.0"}]}.
-
Run
rebar3 upgrade horus
.
Using Erlang.mk:
-
Update your
Makefile
:%% In your Makefile dep_horus = hex 0.3.0
-
Remove the
deps/horus
directory. The new version will be fetched the next time you build your project.
Documentation
Horus 0.2.6
At this point, Horus should be considered Alpha and not production ready. The API will likely evolve and future releases will likely introduce breaking changes. The goal of this release is to make it easy for anyone to try it and possibly give feedback.
What's new in Horus 0.2.6
This release fixes the horus.app
file so that license files are correctly published on Hex.pm.
See #22.
Download
Horus 0.2.6 is available from Hex.pm: https://hex.pm/packages/horus/0.2.6
Upgrade
Using Rebar:
-
Update your
rebar.config
:%% In rebar.config {deps, [{horus, "0.2.6"}]}.
-
Run
rebar3 upgrade horus
.
Using Erlang.mk:
-
Update your
Makefile
:%% In your Makefile dep_horus = hex 0.2.6
-
Remove the
deps/horus
directory. The new version will be fetched the next time you build your project.
Documentation
Horus 0.2.5
At this point, Horus should be considered Alpha and not production ready. The API will likely evolve and future releases will likely introduce breaking changes. The goal of this release is to make it easy for anyone to try it and possibly give feedback.
What's new in Horus 0.2.5
This release focuses on fixing support with the upcoming Erlang/OTP 27.x release series.
Support for Erlang/OTP 27.x
Erlang/OTP 27.0-rc1 brings new instructions, in particular around the code coverage support. As part of that, it adds support for native coverage (i.e. not through the cover
application) so that it works well with the JIT compiler. Unfortunately, the use of native cover instructions will prevent coverage support in Horus standalone modules because the new instructions rely on per-module counters.
Download
Horus 0.2.5 is available from Hex.pm: https://hex.pm/packages/horus/0.2.5
Upgrade
Using Rebar:
-
Update your
rebar.config
:%% In rebar.config {deps, [{horus, "0.2.5"}]}.
-
Run
rebar3 upgrade horus
.
Using Erlang.mk:
-
Update your
Makefile
:%% In your Makefile dep_horus = hex 0.2.5
-
Remove the
deps/horus
directory. The new version will be fetched the next time you build your project.
Documentation
Horus 0.2.4
At this point, Horus should be considered Alpha and not production ready. The API will likely evolve and future releases will likely introduce breaking changes. The goal of this release is to make it easy for anyone to try it and possibly give feedback.
What's new in Horus 0.2.4
This release focuses on bug fixes.
Fix the ability to bundle Horus in an Erlang release
Users who attempted to create an Erlang release that included Khepri or Horus got an error indicating Horus couldn't find the erlang
module (at runtime, not when building the release). The problem was that the dependency to erts
was implicit and not declared in horus.app
.
This is fixed by #15.
Reduce the pressure on the Code server
code:is_loaded/1
is a synchronous call to the Code server up to and including Erlang/OTP 25. In the context of Khepri, if multiple processes tried to execute the same transaction at the same time, we could end up trying to load the transaction standalone module multiple times concurrently, putting load on the Code server by just trying to see if it was already loaded.
This new version uses another approach to avoid that pressure on the Code server.
This is fixed by #12.
Download
Horus 0.2.4 is available from Hex.pm: https://hex.pm/packages/horus/0.2.4
Upgrade
Using Rebar:
-
Update your
rebar.config
:%% In rebar.config {deps, [{horus, "0.2.4"}]}.
-
Run
rebar3 upgrade horus
.
Using Erlang.mk:
-
Update your
Makefile
:%% In your Makefile dep_horus = hex 0.2.4
-
Remove the
deps/horus
directory. The new version will be fetched the next time you build your project.
Documentation
Horus 0.2.3
At this point, Horus should be considered Alpha and not production ready. The API will likely evolve and future releases will likely introduce breaking changes. The goal of this release is to make it easy for anyone to try it and possibly give feedback.
What's new in Horus 0.2.3
This release focuses on bug fixes.
Improvements to cover-compiled modules support
Horus 0.2.2 has two new problems related to cover-compiled modules support:
- When collecting coverage over multiple Erlang nodes, only one node, called the "main node" by
cover
stores the patched modules in an ETS table. - Instructions added by
cover
may be denied by the caller through the providedensure_instruction_is_permitted
andshould_process_function
callbacks
This is fixed by #10.
Download
Horus 0.2.3 is available from Hex.pm: https://hex.pm/packages/horus/0.2.3
Upgrade
Using Rebar:
-
Update your
rebar.config
:%% In rebar.config {deps, [{horus, "0.2.3"}]}.
-
Run
rebar3 upgrade horus
.
Using Erlang.mk:
-
Update your
Makefile
:%% In your Makefile dep_horus = hex 0.2.3
-
Remove the
deps/horus
directory. The new version will be fetched the next time you build your project.
Documentation
Horus 0.2.2
At this point, Horus should be considered Alpha and not production ready. The API will likely evolve and future releases will likely introduce breaking changes. The goal of this release is to make it easy for anyone to try it and possibly give feedback.
What's new in Horus 0.2.2
This release focuses on bug fixes.
Support argument lists in stacktraces
When we need to reconstruct a stacktrace to have frames matching actual module and function names, we assumed that the stacktrace frame would use module/function/arity. However some frames may contain the actual list of arguments instead.
In this release, we fixed the problem by keeping a list of arguments in the reconstructed stacktrace to match the initial stacktrace.
This is fixed by #9.
Download
Horus 0.2.2 is available from Hex.pm: https://hex.pm/packages/horus/0.2.2
Upgrade
Using Rebar:
-
Update your
rebar.config
:%% In rebar.config {deps, [{horus, "0.2.2"}]}.
-
Run
rebar3 upgrade horus
.
Using Erlang.mk:
-
Update your
Makefile
:%% In your Makefile dep_horus = hex 0.2.2
-
Remove the
deps/horus
directory. The new version will be fetched the next time you build your project.
Documentation
Horus 0.2.1
At this point, Horus should be considered Alpha and not production ready. The API will likely evolve and future releases will likely introduce breaking changes. The goal of this release is to make it easy for anyone to try it and possibly give feedback.
What's new in Horus 0.2.1
This release focuses on bug fixes.
Fix ?IS_HORUS_STANDALONE_FUN()
macro
The ?IS_HORUS_STANDALONE_FUN()
macro was not updated after the change to the #horus_fun{}
record in #5. Horus and any consumer would compiler just fine, but the macro would return the wrong result.
This is fixed by #8. A testcase was added to prevent this from happening again.
Download
Horus 0.2.1 is available from Hex.pm: https://hex.pm/packages/horus/0.2.1
Upgrade
Using Rebar:
-
Update your
rebar.config
:%% In rebar.config {deps, [{horus, "0.2.1"}]}.
-
Run
rebar3 upgrade horus
.
Using Erlang.mk:
-
Update your
Makefile
:%% In your Makefile dep_horus = hex 0.2.1
-
Remove the
deps/horus
directory. The new version will be fetched the next time you build your project.
Documentation
Horus 0.2.0
At this point, Horus should be considered Alpha and not production ready. The API will likely evolve and future releases will likely introduce breaking changes. The goal of this release is to make it easy for anyone to try it and possibly give feedback.
What's new in Horus 0.2.0
This release focuses on several new features.
Meaningful stacktraces
When the extracted standalone function throws an exception, the stacktrace points to the generated module by default. The file names and line numbers were already correct w.r.t. to the source code. However, the module and function names were the one from the generated module which don't make any sense for the reader. Horus 0.2.0 now reconstructs a meaningful stacktrace: it now looks like the exception comes from the correct function in the correct source file.
Let's take the following module to compare the regular stacktrace and the one after we extract and execute the failing function with Horus:
-module(readme).
-export([trigger_badmatch/0,
try_with_horus/0]).
trigger_badmatch() ->
1 = 2.
try_with_horus() ->
Fun = fun() ->
trigger_badmatch()
end,
StandaloneFun = horus:to_standalone_fun(Fun),
horus:exec(StandaloneFun, []).
If we execute readme:trigger_badmatch()
directly, the shell shows:
** exception error: no match of right hand side value 2
in function readme:trigger_badmatch/0 (.../readme.erl, line 7)
With Horus 0.1.0, we would get the following exception and cryptic stacktrace:
** exception error: no match of right hand side value 2
in function 'horus__readme__-try_with_horus/0-fun-0-__81480719':readme__trigger_badmatch/0 (.../readme.erl, line 7)
With Horus 0.2.0, we get the correct stacktrace:
** exception error: no match of right hand side value 2
in function readme:trigger_badmatch/0 (.../readme.erl, line 7)
in call from horus:exec/2 (.../horus/src/horus.erl, line 1019)
Support cover-compiled modules
Horus used to always get the Beam code from the code server. The returned code corresponds to the Beam file on disk.
However, when a module is compiled by cover
as part of a testsuite for instance, cover
stores the modified module in an ETS table. The modified module is instrumented with calls to cover
to emit the execution counts.
To keep the emission of execution counts, Horus now takes the Beam code from that ETS table if the module is cover-compiled (i.e. cover:is_compiled/1
returns true). Thanks to this, an executed standalone function from a cover-compiled module will still record that the original source code is executed.
Other changes
- Added support for the
maybe ... end
expression, introduced in Erlang 25 as an opt-in feature (#6, #7).
Download
Horus 0.2.0 is available from Hex.pm: https://hex.pm/packages/horus/0.2.0
Upgrade
Using Rebar:
-
Update your
rebar.config
:%% In rebar.config {deps, [{horus, "0.2.0"}]}.
-
Run
rebar3 upgrade horus
.
Using Erlang.mk:
-
Update your
Makefile
:%% In your Makefile dep_horus = hex 0.2.0
-
Remove the
deps/horus
directory. The new version will be fetched the next time you build your project.
Documentation
Horus 0.1.0
At this point, Horus should be considered Alpha and not production ready. The API will likely evolve and future releases will likely introduce breaking changes. The goal of this release is to make it easy for anyone to try it and possibly give feedback.
What's new in Horus 0.1.0
This is the first release of Horus.
Horus is a library that extracts an anonymous function's code and creates a standalone version of it in a new module at runtime. The goal is to have a storable and transferable function which does not depend on the availability of the module that defined it.
Download
Horus 0.1.0 is available from Hex.pm: https://hex.pm/packages/horus/0.1.0