Skip to content

Commit 5f13986

Browse files
authored
V0.9 (#5)
* add Erlang 21 to supported versions, drop old ones * update build flow * support rebar3 * add license
1 parent 124c75f commit 5f13986

File tree

7 files changed

+85
-38
lines changed

7 files changed

+85
-38
lines changed

.gitignore

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
1-
ebin/
2-
*~
3-
/.project
4-
/.settings/
1+
erl_crash.dump
2+
/.settings
3+
/.rebar/
4+
.settings
5+
rebar3.crashdump
6+
/_build
7+
/deps
8+
.eunit
9+
/ebin
10+
/doc
11+
rebar.lock
12+
.project
13+
.idea

.travis.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
language: erlang
22
sudo: false
33
otp_release:
4-
# Test on all supported releases
4+
# Test on all supported releases & some more
5+
- 21.1
56
- 21.0
67
- 20.3
78
- 19.3
@@ -10,8 +11,8 @@ otp_release:
1011

1112
script:
1213
- make
13-
- rebar eunit -v skip_deps=true
14-
- make plt
14+
- make test
1515
- make dialyze
16+
1617
notifications:
1718
email: false

LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
MIT License
2+
3+
Copyright (c) 2010-2014 Evan Miller
4+
Copyright (c) 2014-2018 ChicagoBoss Team and contributors
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy
7+
of this software and associated documentation files (the "Software"), to deal
8+
in the Software without restriction, including without limitation the rights
9+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the Software is
11+
furnished to do so, subject to the following conditions:
12+
13+
The above copyright notice and this permission notice shall be included in all
14+
copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
SOFTWARE.

Makefile

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,35 @@
1-
ERL=erl
2-
REBAR=./rebar
1+
ERL = erl
32
GIT = git
4-
REBAR_VER = 2.6.0
5-
6-
.PHONY: get-deps
3+
REBAR = rebar3
4+
REBAR_VER = 3.6.2
75

86
all: compile
97

108
compile:
11-
@$(REBAR) get-deps
129
@$(REBAR) compile
1310

1411
rebar_src:
1512
@rm -rf $(PWD)/rebar_src
16-
@$(GIT) clone git://github.com/rebar/rebar.git rebar_src
13+
@$(GIT) clone https://github.com/erlang/rebar3.git rebar_src
1714
@$(GIT) -C rebar_src checkout tags/$(REBAR_VER)
1815
@cd $(PWD)/rebar_src/; ./bootstrap
19-
@cp $(PWD)/rebar_src/rebar $(PWD)
16+
@cp $(PWD)/rebar_src/rebar3 $(PWD)
2017
@rm -rf $(PWD)/rebar_src
2118

2219
get-deps:
23-
@$(REBAR) get-deps
20+
@$(REBAR) upgrade
2421

25-
## dialyzer
26-
PLT_FILE = ~/tiny_pq.plt
27-
PLT_APPS ?= kernel stdlib erts compiler
28-
DIALYZER_OPTS ?= -Werror_handling -Wrace_conditions -Wunmatched_returns \
29-
-Wunderspecs --verbose --fullpath -n
22+
deps:
23+
@$(REBAR) compile
3024

3125
.PHONY: dialyze
32-
dialyze: all
33-
@[ -f $(PLT_FILE) ] || $(MAKE) plt
34-
@dialyzer --plt $(PLT_FILE) $(DIALYZER_OPTS) ebin || [ $$? -eq 2 ];
35-
36-
## In case you are missing a plt file for dialyzer,
37-
## you can run/adapt this command
38-
.PHONY: plt
39-
plt:
40-
@echo "Building PLT, may take a few minutes"
41-
@dialyzer --build_plt --output_plt $(PLT_FILE) --apps \
42-
$(PLT_APPS) || [ $$? -eq 2 ];
26+
dialyze:
27+
@$(REBAR) dialyzer || [ $$? -eq 1 ];
4328

4429
clean:
4530
@$(REBAR) clean
4631
rm -fv erl_crash.dump
47-
rm -f $(PLT_FILE)
4832

33+
.PHONY: test
34+
test:
35+
@$(REBAR) eunit

rebar

-203 KB
Binary file not shown.

rebar.config

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1-
{erl_opts, [debug_info]}.
2-
{deps, [
3-
]}.
1+
{erl_opts, [
2+
debug_info,
3+
warn_unused_vars,
4+
warn_unused_import,
5+
warn_exported_vars
6+
]}.
7+
8+
{deps, []}.
9+
10+
%% == Dialyzer ==
11+
{dialyzer, [
12+
{warnings, [error_handling, race_conditions, unmatched_returns, underspecs]},
13+
{get_warnings, false},
14+
{plt_apps, top_level_deps}, % top_level_deps | all_deps
15+
{plt_extra_apps, []},
16+
{plt_location, local}, % local | "/my/file/name"
17+
{plt_prefix, "tiny_pq"},
18+
{base_plt_apps, [stdlib, kernel, erts]},
19+
{base_plt_location, global}, % global | "/my/file/name"
20+
{base_plt_prefix, "rebar3"}
21+
]}.
22+
23+
{cover_enabled, true}.
24+
25+
{plugins, []}.
26+

src/tiny_pq.app.src

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
{application, tiny_pq, [
22
{description, "TinyPQ: A simple priority queue based on gb_trees"},
3-
{vsn, "0.8.17"},
3+
{vsn, "0.9.0"},
44
{registered, []},
55
{modules, []},
66
{applications, [
77
kernel,
88
stdlib
99
]},
10-
{env, []}
10+
{env, []},
11+
{maintainers, ["ChicagoBoss Team"]},
12+
{licenses, ["MIT/X11"]},
13+
{links, [
14+
{"Github", "https://github.com/ChicagoBoss/tiny_pq"}
15+
]}
1116
]}.

0 commit comments

Comments
 (0)