Skip to content

Releases: rabbitmq/horus

Horus 0.3.0

17 Jul 10:09
v0.3.0
0717681
Compare
Choose a tag to compare

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:

  1. Update your rebar.config:

    %% In rebar.config
    {deps, [{horus, "0.3.0"}]}.
  2. Run rebar3 upgrade horus.

Using Erlang.mk:

  1. Update your Makefile:

    %% In your Makefile
    dep_horus = hex 0.3.0
  2. Remove the deps/horus directory. The new version will be fetched the next time you build your project.

Documentation

The documentation for Horus 0.3.0 is available on Hex.pm.

Horus 0.2.6

20 Jun 12:38
v0.2.6
60f2161
Compare
Choose a tag to compare

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:

  1. Update your rebar.config:

    %% In rebar.config
    {deps, [{horus, "0.2.6"}]}.
  2. Run rebar3 upgrade horus.

Using Erlang.mk:

  1. Update your Makefile:

    %% In your Makefile
    dep_horus = hex 0.2.6
  2. Remove the deps/horus directory. The new version will be fetched the next time you build your project.

Documentation

The documentation for Horus 0.2.6 is available on Hex.pm.

Horus 0.2.5

11 Mar 11:08
v0.2.5
d9ad179
Compare
Choose a tag to compare

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.

See #19 and #21.

Download

Horus 0.2.5 is available from Hex.pm: https://hex.pm/packages/horus/0.2.5

Upgrade

Using Rebar:

  1. Update your rebar.config:

    %% In rebar.config
    {deps, [{horus, "0.2.5"}]}.
  2. Run rebar3 upgrade horus.

Using Erlang.mk:

  1. Update your Makefile:

    %% In your Makefile
    dep_horus = hex 0.2.5
  2. Remove the deps/horus directory. The new version will be fetched the next time you build your project.

Documentation

The documentation for Horus 0.2.5 is available on Hex.pm.

Horus 0.2.4

21 Aug 09:27
v0.2.4
Compare
Choose a tag to compare

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:

  1. Update your rebar.config:

    %% In rebar.config
    {deps, [{horus, "0.2.4"}]}.
  2. Run rebar3 upgrade horus.

Using Erlang.mk:

  1. Update your Makefile:

    %% In your Makefile
    dep_horus = hex 0.2.4
  2. Remove the deps/horus directory. The new version will be fetched the next time you build your project.

Documentation

The documentation for Horus 0.2.4 is available on Hex.pm.

Horus 0.2.3

14 Apr 14:46
v0.2.3
608d11c
Compare
Choose a tag to compare

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 provided ensure_instruction_is_permitted and should_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:

  1. Update your rebar.config:

    %% In rebar.config
    {deps, [{horus, "0.2.3"}]}.
  2. Run rebar3 upgrade horus.

Using Erlang.mk:

  1. Update your Makefile:

    %% In your Makefile
    dep_horus = hex 0.2.3
  2. Remove the deps/horus directory. The new version will be fetched the next time you build your project.

Documentation

The documentation for Horus 0.2.3 is available on Hex.pm.

Horus 0.2.2

30 Mar 15:04
v0.2.2
c3764bc
Compare
Choose a tag to compare

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:

  1. Update your rebar.config:

    %% In rebar.config
    {deps, [{horus, "0.2.2"}]}.
  2. Run rebar3 upgrade horus.

Using Erlang.mk:

  1. Update your Makefile:

    %% In your Makefile
    dep_horus = hex 0.2.2
  2. Remove the deps/horus directory. The new version will be fetched the next time you build your project.

Documentation

The documentation for Horus 0.2.2 is available on Hex.pm.

Horus 0.2.1

30 Mar 14:41
v0.2.1
d91d8d5
Compare
Choose a tag to compare

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:

  1. Update your rebar.config:

    %% In rebar.config
    {deps, [{horus, "0.2.1"}]}.
  2. Run rebar3 upgrade horus.

Using Erlang.mk:

  1. Update your Makefile:

    %% In your Makefile
    dep_horus = hex 0.2.1
  2. Remove the deps/horus directory. The new version will be fetched the next time you build your project.

Documentation

The documentation for Horus 0.2.1 is available on Hex.pm.

Horus 0.2.0

30 Mar 10:37
v0.2.0
5c37644
Compare
Choose a tag to compare

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)

See #2 and #5.

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.

See #3 and #4.

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:

  1. Update your rebar.config:

    %% In rebar.config
    {deps, [{horus, "0.2.0"}]}.
  2. Run rebar3 upgrade horus.

Using Erlang.mk:

  1. Update your Makefile:

    %% In your Makefile
    dep_horus = hex 0.2.0
  2. Remove the deps/horus directory. The new version will be fetched the next time you build your project.

Documentation

The documentation for Horus 0.2.0 is available on Hex.pm.

Horus 0.1.0

28 Mar 10:09
v0.1.0
56668a2
Compare
Choose a tag to compare

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

Documentation

The documentation for Horus 0.1.0 is available on Hex.pm.