Skip to content

Instantly share code, notes, and snippets.

@sivsushruth
Last active March 12, 2016 15:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sivsushruth/3fcf1ca5970a7b662fa9 to your computer and use it in GitHub Desktop.
Save sivsushruth/3fcf1ca5970a7b662fa9 to your computer and use it in GitHub Desktop.
sivsushruth@fafa-server:~/gsoc/barrel-platform$ sudo ./_build/default/rel/barrel/bin/barrel-1.14.1 console
Exec: /usr/lib/erlang/erts-7.2/bin/erlexec -boot /home/sivsushruth/gsoc/barrel-platform/_build/default/rel/barrel/releases/1.14.1/barrel -boot_var ERTS_LIB_DIR /usr/lib/erlang/erts-7.2/../lib -config /home/sivsushruth/gsoc/barrel-platform/_build/default/rel/barrel/releases/1.14.1/sys.config -args_file /home/sivsushruth/gsoc/barrel-platform/_build/default/rel/barrel/releases/1.14.1/vm.args -- console
Root: /home/sivsushruth/gsoc/barrel-platform/_build/default/rel/barrel
/home/sivsushruth/gsoc/barrel-platform/_build/default/rel/barrel
Erlang/OTP 18 [erts-7.2] [source] [64-bit] [async-threads:64] [hipe] [kernel-poll:true]
[<0.7.0>] [info] Application lager started on node 'barrel@127.0.0.1'
[<0.7.0>] [info] Application ssl started on node 'barrel@127.0.0.1'
[<0.7.0>] [info] Application barrel started on node 'barrel@127.0.0.1'
couch 1.9.0 is starting.
[<0.113.0>] [notice] Changed loglevel of ./log/couch.log to info
[<0.7.0>] [info] Application couch started on node 'barrel@127.0.0.1'
[<0.181.0>] [info] HTTP API started on "http://0.0.0.0:5984/"
[<0.7.0>] [info] Application couch_httpd started on node 'barrel@127.0.0.1'
[<0.7.0>] [info] Application couch_index started on node 'barrel@127.0.0.1'
[<0.7.0>] [info] Application couch_changes started on node 'barrel@127.0.0.1'
[<0.7.0>] [info] Application runtime_tools started on node 'barrel@127.0.0.1'
[<0.7.0>] [info] Application hackney started on node 'barrel@127.0.0.1'
[<0.7.0>] [info] Application couch_mrview started on node 'barrel@127.0.0.1'
[<0.7.0>] [info] Application couch_replicator started on node 'barrel@127.0.0.1'
[<0.7.0>] [info] Application couch_randomdoc started on node 'barrel@127.0.0.1'
[<0.7.0>] [info] Application couch_dbupdates started on node 'barrel@127.0.0.1'
[<0.7.0>] [info] Application geocouch started on node 'barrel@127.0.0.1'
Eshell V7.2 (abort with ^G)
defmodule CouchElixirUtils do
def to_erlang(source) do
{module, bytecode} = Code.compile_string(source)
{:ok, ts, _} = :erl_scan.string(bytecode)
{:ok, ast} = :erl_parse.parse_exprs(ts)
ast
end
end
Converted = 'Elixir.CouchElixirUtils':to_erlang(Source),
io:format("\n Makefun Source: ~p \n", [Converted]),
[<0.354.0>] [error] gen_server <0.354.0> terminated with reason: {'module could not be loaded',[{'Elixir.Code',compile_string,[<<"fn Doc -> IO.puts
\"test puts\" end">>],[]},{'Elixir.CouchElixirUtils',to_erlang,1,[{file,"apps/couch/src/couch_elixir_utils.ex"},{line,4}]},{couch_elixir_process,makefun,2,[{file,"/home/sivsushruth/gsoc/barrel-platform/_build/default/lib/couch/src/couch_elixir_process.erl"},{line,326}]},{couch_elixir_process,run,2,[{file,"/home/sivsushruth/gsoc/barrel-platform/_build/default/lib/couch/src/couch_elixir_process.erl"},{line,143}]},...]}
[<0.354.0>] [error] CRASH REPORT Process <0.354.0> with 4 neighbours exited with reason: call to undefined function 'Elixir.Code':compile_string(<<"fn Doc -> IO.puts \"test puts\" end">>) in gen_server:terminate/7 line 826
[<0.184.0>] [error] CRASH REPORT Process <0.184.0> with 0 neighbours crashed with reason: bad argument in call to erlang:list_to_binary([{'Elixir.Code',compile_string,[<<"fn Doc -> IO.puts \"test puts\" end">>],[]},{'Elixir.CouchElixirUtils',...},...]) in couch_httpd:error_info/1 line 760
@sivsushruth
Copy link
Author

(barrel@127.0.0.1)1>  [<0.16444.1>] [info] Starting index update for db: cms idx: 213d66524d13d67e9a5f99a7a569c00d
[<0.21354.1>] [error] gen_server <0.21354.1> terminated with reason: bad argument in call to ets:lookup(elixir_config, compiler_options) in elixir_config:get/1 line 22
[<0.21354.1>] [error] CRASH REPORT Process <0.21354.1> with 4 neighbours exited with reason: bad argument in call to ets:lookup(elixir_config, compiler_options) in elixir_config:get/1 line 22
[<0.21247.1>] [error] CRASH REPORT Process <0.21247.1> with 0 neighbours crashed with reason: bad argument in call to erlang:list_to_binary([{ets,lookup,[elixir_config,compiler_options],[]},{elixir_config,get,1,[{file,"src/elixir_confi..."},...]},...]) in couch_httpd:error_info/1 line 760

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment