Targets all, compile, clean, and test seem to work
This commit is contained in:
parent
2371c40815
commit
12d2411dfc
6 changed files with 61 additions and 2 deletions
|
@ -10,4 +10,11 @@ as I continue work in early March 2015.
|
|||
Meanwhile, see the wiki for this repo for helpful hints, as time
|
||||
permits.
|
||||
|
||||
## Initial re-porting on 'prototype' directory
|
||||
|
||||
* `chain-manager`: not started
|
||||
* `corfurl`: in progress
|
||||
* `demo-day-hack`: not started
|
||||
* `tango`: not started
|
||||
|
||||
-Scott and the Machi team
|
||||
|
|
32
prototype/README.md
Normal file
32
prototype/README.md
Normal file
|
@ -0,0 +1,32 @@
|
|||
# Prototype directory
|
||||
|
||||
The contents of the `prototype` directory is the result of
|
||||
consolidating several small & independent repos. Originally, each
|
||||
small was a separate prototype/quick hack for experimentation
|
||||
purposes. The code is preserved here for use as:
|
||||
|
||||
* Examples of what not to do ... the code **is** a bit ugly, after
|
||||
all. <tt>^_^</tt>
|
||||
* Some examples of what to do when prototyping in Erlang. For
|
||||
example, "Let it crash" style coding is so nice to hack on quickly.
|
||||
* Some code might actually be reusable, as-is or after some
|
||||
refactoring.
|
||||
|
||||
## The chain-manager prototype
|
||||
|
||||
TODO
|
||||
|
||||
## The corfurl prototype
|
||||
|
||||
The `corfurl` code is a mostly-complete complete implementation of the
|
||||
CORFU server & client specification. More details on the papers about
|
||||
CORFU are mentioned in the `corfurl/docs/corfurl.md` file.
|
||||
|
||||
## The demo-day-hack prototype
|
||||
|
||||
TODO
|
||||
|
||||
## The tango prototype
|
||||
|
||||
TODO
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
REBAR_BIN := $(shell which rebar)
|
||||
ifeq ($(REBAR_BIN),)
|
||||
REBAR_BIN = ./rebar
|
||||
REBAR_BIN = /local/path/to/rebar
|
||||
endif
|
||||
|
||||
.PHONY: rel deps package pkgclean
|
||||
|
@ -15,6 +15,7 @@ deps:
|
|||
|
||||
clean:
|
||||
$(REBAR_BIN) clean
|
||||
-for dir in deps/*; do (cd $$dir ; $(REBAR_BIN) clean); done
|
||||
|
||||
test: deps compile eunit
|
||||
|
||||
|
|
6
prototype/corfurl/rebar.config
Normal file
6
prototype/corfurl/rebar.config
Normal file
|
@ -0,0 +1,6 @@
|
|||
%%% {erl_opts, [warnings_as_errors, {parse_transform, lager_transform}, debug_info]}.
|
||||
{erl_opts, [{parse_transform, lager_transform}, debug_info]}.
|
||||
{deps, [
|
||||
{lager, "2.0.1", {git, "git://github.com/basho/lager.git", {tag, "2.0.1"}}}
|
||||
]}.
|
||||
|
10
prototype/corfurl/src/corfurl.app.src
Normal file
10
prototype/corfurl/src/corfurl.app.src
Normal file
|
@ -0,0 +1,10 @@
|
|||
{application, corfurl, [
|
||||
{description, "Quick prototype of CORFU in Erlang."},
|
||||
{vsn, "0.0.0"},
|
||||
{applications, [kernel, stdlib, lager]},
|
||||
{mod,{corfurl_unfinished_app,[]}},
|
||||
{registered, []},
|
||||
{env, [
|
||||
{ring_size, 32}
|
||||
]}
|
||||
]}.
|
|
@ -213,7 +213,10 @@ handle_call({{fill, ClientEpoch, _LogicalPN}, LC1}, _From,
|
|||
{reply, {error_badepoch, LC2}, State};
|
||||
handle_call({{fill, _ClientEpoch, LogicalPN}, LC1}, _From, State) ->
|
||||
LC2 = lclock_update(LC1),
|
||||
io:format(user, "~s.erl line ~w: TODO: this 'fill or trim' logic is probably stupid, due to mis-remembering the CORFU paper, sorry! Commenting out this warning line is OK, if you wish to proceed with testing Corfurl. This code can change a fill into a trim. Those things are supposed to be separate, silly me, a fill should never automagically change to a trim.\n", [?MODULE, ?LINE]),
|
||||
case application:get_env(corfurl, todo_warning_flu) of
|
||||
undefined -> io:format(user, "~s.erl line ~w: TODO: this 'fill or trim' logic is probably stupid, due to mis-remembering the CORFU paper, sorry! Commenting out this warning line is OK, if you wish to proceed with testing Corfurl. This code can change a fill into a trim. Those things are supposed to be separate, silly me, a fill should never automagically change to a trim.\n", [?MODULE, ?LINE]), application:set_env(corfurl, todo_warning_flu, true);
|
||||
_ -> ok
|
||||
end,
|
||||
{Reply, NewState} = do_trim_or_fill(fill, LogicalPN, State),
|
||||
?EVENT_LOG({flu, fill, self(), LogicalPN, Reply}),
|
||||
{reply, {Reply, LC2}, NewState};
|
||||
|
|
Loading…
Reference in a new issue