Guess Erlang Application Scattering
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
mk Amend README for plugin use. Dec 12, 2015
priv Update OTP table Jan 19, 2019
src Remove deprecated maintainer field Jan 19, 2019
test Fix src detect when module name shorter than 3 Jan 8, 2017
.gitignore Amend readme Mar 25, 2018
.travis.yml Add travis CI config Sep 22, 2018
LICENCE first commit Apr 12, 2015
Makefile Update otp table Mar 24, 2018
README.md Amend to 21.2 Dec 15, 2018
erlang.mk Update erlang-mk and otp table Dec 5, 2018
plugins.mk Add guilty plugin Dec 6, 2015
rebar.config Add rebar.config Mar 16, 2016

README.md

geas Build Status

Guess Erlang Application Scattering

Geas : (In Irish folklore) an obligation or prohibition magically imposed on a person.

By extension, obligation or prohibition imposed by an Erlang application or module, which may modify its scattering.

Overview

Geas is a tool detecting the runnable official Erlang release window for your project.

Geas will tell you also :

  • what are the offending functions in the beam/source files that reduce the available window.
  • if some beam files are compiled native.
  • the installed patches and recommend patches that should be installed depending your code.

For example , if a dependency is using application:ensure_all_started/1 your project can only be used starting R16B02 or if maps is used somewhere, starting 17.0. On contrary, pg module cannot be used after 17.5.

For more details, see Wiki.

Geas is also available on hex.pm.

When using it ?

  • Each time you prepare a project release or update a dependancy.
  • When you plan to add a dependancy to your project
  • When writing your README, to inform your project's users on possible release window
  • To limit test of CI tools on only possible release window

Plugins

geas is available as a module, but you will probably prefere to use geas plugins with your usual build tool.

Plugin is available for erlang.mk and rebar .

Output example

Example on a test project using cowboy :

   R15                   21.2       Geas database
---Min--------Arch-------Max----------------------------------------------------
   R16B                             cowboy
                         19.3       cowlib
                                    ranch
   R16B       x86        18.1       test
--------------------------------------------------------------------------------
   R16B       x86        18.1       Global project

C : 20.2
P : 20.2.3 20.2.2 20.2.1
R : 20.2.4 20.3.5 20.3.6
T : R16B R16B01 R16B02 R16B03 R16B03-1 17.0 17.1 17.3 17.4 17.5 18.0 18.1

/home/eric/git/test/deps/cowboy/ebin/cowboy_clock.beam
R16B      erlang:integer_to_binary/1

/home/eric/git/test/deps/cowboy/ebin/cowboy_req.beam
R16B      erlang:integer_to_binary/1

/home/eric/git/test/deps/cowboy/ebin/cowboy_static.beam
R16B      erlang:integer_to_binary/1

/home/eric/git/test/deps/cowboy/ebin/cowboy_websocket.beam
R15B02    crypto:hash/2

/home/eric/git/test/deps/cowlib/ebin/cow_multipart.beam
19.3      crypto:rand_bytes/1

/home/eric/git/test/ebin/test.beam
R16B      erlang:binary_to_integer/1

18.1      ssh_message:encode_host_key/1

Current (C) Erlang release found is 20.2 and some patches (P) was detected. The global project can run starting R16B up to 18.1 in such case, due to use of a function introduced in R16B and another one removed in 18.2. Native x86 compilation was detected on test module. Recommended patches (R) are proposed when an application used in code is referenced in a not installed patche, even if in this exemple, current Erlang release cannot run the project.

Tuning output

Output can be tuned depending some environment variables.

Environment variables cheatsheet :

Key Value type Value Comment Details
GEAS_USE_SRC boolean [0 / 1] Use source code instead beam files ...
GEAS_MY_RELS string Erlang release list List possible releases ...
GEAS_EXC_RELS string Erlang release list Exclude some releases ...
GEAS_DISC_RELS boolean [0 / 1] Show discarded buggy Erlang releases ...
GEAS_LOG string Log level list Log informations ...
GEAS_TIPS boolean [0 / 1] Give tips on patches to apply ...

Under compat table output, some informations can be shown depending those environment variables and analyze result. A single capital letter is used as tag for each information.

  • C = Current : Current Erlang major.minor release used (for example 20.2)
  • P = Patches : List of patches detected to be installed on current release, if any (for example 20.2.2)
  • T = Total : All releases inside computed release window GEAS_MY_RELS=""
  • L = Local : All local releases given by user inside computed window GEAS_MY_RELS="18.1 19.0"
  • D = Discarded : Show releases that was automatically discarded GEAS_DISC_RELS=1
  • E = Excluded : User excluded release list GEAS_EXC_RELS="R16B03"
  • R = Recommended : Patches that should be applied, because code is using module impacted by a patch for current version GEAS_TIPS=1

Quick Start

git clone git://github.com/crownedgrouse/geas.git
cd geas
make shell

Contributing

Contributions are welcome. Please use pull-requests.