Skip to content

Commit

Permalink
Support for 23.1
Browse files Browse the repository at this point in the history
  • Loading branch information
aronisstav committed Oct 17, 2020
1 parent ae0b1ed commit 7503a75
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 233 deletions.
6 changes: 2 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
os: linux

# without a dist: line, default in travis is xenial (Ubuntu 16.04)
dist: xenial

language: erlang
Expand Down Expand Up @@ -32,7 +31,7 @@ jobs:
# See the warning printed by the script to understand why this test
# has a separate otp_release specification.
- env: TEST=".travis/travis_has_latest_otp_version"
otp_release: 23.0.2
otp_release: 23.1
stage: basic

# Check dialyzer
Expand Down Expand Up @@ -78,14 +77,13 @@ otp_release:
# README.md and the argument given to generate_version_hrl in
# rebar.config

- 23.0.2
- 23.0

# Last minor version of older OTP releases

- 22.3
- 21.3
- 20.3
- 19.3


# Travis build steps configuration
Expand Down
2 changes: 1 addition & 1 deletion .travis/travis_has_latest_otp_version
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ DIR=$(dirname $(readlink -f $0))

curl -sO https://raw.githubusercontent.com/kerl/kerl/master/kerl
chmod a+x kerl
LATEST=`./kerl update releases | tr ' ' '\n' | tail -n1`
LATEST=`./kerl update releases | grep "^..\..$" | tail -n1`
rm ./kerl

set +x
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Added
- bash_completion (#308)
- log_all option (#320)
- support for OTP 23.0 (#311)

### Removed
- support for OTP 16, OTP 17, OTP 18, and OTP 19

### Changed
- handling of demonitors (#281)
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
[![Travis][travis badge]][travis]
[![Codecov][codecov badge]][codecov]
[![Erlang Versions][erlang versions badge]][travis]

# Concuerror

Concuerror is a stateless model checking tool for Erlang programs. It can be used to systematically test programs for concurrency errors, detect and report errors that only occur on few, specific schedulings or **verify** their absence.

[Visit the website][website] for documentation, examples, tutorials, publications, and many more!

## Supported OTP Releases

[![Erlang Versions][erlang versions badge]][travis]

## How to build

* Compile : `make`
Expand Down Expand Up @@ -54,5 +57,5 @@ Details can be found in the [LICENSE][license] file.

<!-- Badges -->
[codecov badge]: https://codecov.io/gh/parapluu/Concuerror/branch/master/graph/badge.svg
[erlang versions badge]: https://img.shields.io/badge/erlang-19.0to%2023.0-blue.svg
[erlang versions badge]: https://img.shields.io/badge/erlang-20.3to%2023.0-blue.svg
[travis badge]: https://travis-ci.org/parapluu/Concuerror.svg?branch=master
16 changes: 7 additions & 9 deletions docs/download.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,17 @@ The preferred way to start concuerror is via the `bin/concuerror` escript.

Concuerror is also available via [Hex.pm](https://hex.pm/packages/concuerror).

This means that you can include it in your project using any of the
This enables you to include it in your project using any of the
building tools that support Hex.pm dependencies.

### Supported OTP Releases

Concuerror's developers are always working with the latest otp/master branch
available on Github. Concuerror is also expected to work on all OTP releases
starting from and including **R17**[^1]. We use
[Travis](https://travis-ci.org/parapluu/Concuerror) to test:
See [Supported OTP
Releases](https://github.com/parapluu/Concuerror#supported-otp-releases).
We use [Travis](https://travis-ci.org/parapluu/Concuerror) to test:

* The *two last* minor versions of the 'current' major Erlang/OTP release
* The *last* minor version of older major releases
* The *last* minor version of recent older major releases

You can also find an older version of Concuerror [here](https://github.com/mariachris/Concuerror.git).

[^1]: R16 is also tested for minimal functionality.
You can also find older versions of Concuerror
[here](https://github.com/mariachris/Concuerror.git).
2 changes: 2 additions & 0 deletions rebar.config
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{minimum_otp_vsn, "20.0"}.

{erl_opts,
[ debug_info
, warn_export_vars
Expand Down
9 changes: 0 additions & 9 deletions src/concuerror_callback.erl
Original file line number Diff line number Diff line change
Expand Up @@ -2007,18 +2007,9 @@ link_monitor_handlers(Handler, LinksOrMonitors) ->

%%------------------------------------------------------------------------------

-ifdef(BEFORE_OTP_20).

is_valid_ets_id(NameOrTid) ->
is_atom(NameOrTid) orelse is_integer(NameOrTid).

-else.

is_valid_ets_id(NameOrTid) ->
is_atom(NameOrTid) orelse is_reference(NameOrTid).

-endif.

-ifdef(BEFORE_OTP_21).

ets_system_name_to_tid(Name) ->
Expand Down
156 changes: 0 additions & 156 deletions src/concuerror_instrumenter_old.erl

This file was deleted.

43 changes: 0 additions & 43 deletions src/concuerror_loader.erl
Original file line number Diff line number Diff line change
Expand Up @@ -147,47 +147,6 @@ check_shadow(File, Module) ->
[io_lib:format("File ~s shadows ~s (found in path)", [File, Default])]
end.

-ifdef(BEFORE_OTP_23).

load_binary(Module, Filename, Beam, Instrumented) ->
Core = get_core(Beam),
{InstrumentedCore, Warnings} =
case ets:lookup(Instrumented, Module) =:= [] of
true ->
ets:insert(Instrumented, {Module, concuerror_instrumented}),
concuerror_instrumenter_old:instrument(Module, Core, Instrumented);
false ->
{Core, []}
end,
{ok, _, NewBinary} =
compile:forms(InstrumentedCore, [from_core, report_errors, binary]),
{module, Module} = code:load_binary(Module, Filename, NewBinary),
{ok, Warnings}.

get_core(Beam) ->
{ok, {Module, [{abstract_code, ChunkInfo}]}} =
beam_lib:chunks(Beam, [abstract_code]),
case ChunkInfo of
{_, Chunk} ->
{ok, Module, Core} = compile:forms(Chunk, [binary, to_core0]),
Core;
no_abstract_code ->
{ok, {Module, [{compile_info, CompileInfo}]}} =
beam_lib:chunks(Beam, [compile_info]),
{source, File} = proplists:lookup(source, CompileInfo),
{options, CompileOptions} = proplists:lookup(options, CompileInfo),
Filter =
fun(Option) ->
lists:member(element(1, Option), [d, i, parse_transform])
end,
CleanOptions = lists:filter(Filter, CompileOptions),
Options = [debug_info, report_errors, binary, to_core0|CleanOptions],
{ok, Module, Core} = compile:file(File, Options),
Core
end.

-else.

load_binary(Module, Filename, Beam, Instrumented) ->
Abstract = get_abstract(Beam),
{InstrumentedAbstract, Warnings} =
Expand Down Expand Up @@ -226,5 +185,3 @@ get_abstract(Beam) ->
{ok, _, Abstract} = compile:file(File, Options),
Abstract
end.

-endif.
9 changes: 0 additions & 9 deletions src/concuerror_options.erl
Original file line number Diff line number Diff line change
Expand Up @@ -2003,18 +2003,9 @@ get_logs() ->
Whats -> lists:reverse(Whats)
end.

-ifdef(BEFORE_OTP_20).

lowercase(String) ->
string:to_lower(String).

-else.

lowercase(String) ->
string:lowercase(String).

-endif.

to_stderr(Format) ->
to_stderr(Format, []).

Expand Down

0 comments on commit 7503a75

Please sign in to comment.