在 chicaogboss 中编译 bson 时出现语法错误
Syntax error while compiling bson in chicaogboss
我们升级了具有 'bson' 依赖项的 chicagoboss。当我们使用 ./rebar update-deps compile
编译 chicagoboss 时。编译 chicagoboss 时抛出语法错误。
但基本上我们从 'HEAD' 中提取它。不过我不确定这是否是个好主意。
Pulling bson from {git,"git://github.com/mongodb/bson-erlang","HEAD"}
Cloning into 'bson'...
这里是编译错误:
$./rebar update-deps compile
...
...
...
==> erlando (compile)
Compiled src/cut.erl
Compiled src/do.erl
Compiled src/monad.erl
Compiled src/monad_plus.erl
Compiled src/identity_m.erl
Compiled src/test.erl
Compiled src/error_m.erl
Compiled src/error_t.erl
Compiled src/list_m.erl
Compiled src/maybe_m.erl
Compiled src/import_as.erl
Compiled src/omega_m.erl
Compiled src/state_t.erl
==> aleppo (compile)
src/aleppo_parser.yrl: Warning: conflicts: 1 shift/reduce, 0 reduce/reduce
workspace/ChicagoBoss/deps/aleppo/src/aleppo_parser.yrl:none: Warning: conflicts: 1 shift/reduce, 0 reduce/reduce
Compiled src/aleppo_parser.yrl
Compiled src/aleppo_parser.erl
Compiled src/aleppo.erl
==> medici (compile)
Compiled src/medici.erl
Compiled src/medici_port_srv.erl
Compiled src/principe_table.erl
Compiled src/medici_native_conn.erl
Compiled src/medici_native_controller.erl
Compiled src/medici_conn_sup.erl
Compiled src/medici_sup.erl
Compiled src/medici_conn.erl
Compiled src/medici_port_sup.erl
Compiled src/medici_app.erl
Compiled src/medici_controller.erl
Compiled src/principe.erl
==> bson (compile)
Compiling workspace/ChicagoBoss/deps/bson/src/bson_binary.erl failed:
workspace/ChicagoBoss/deps/bson/src/bson_binary.erl:40: syntax error before: '{'
workspace/ChicagoBoss/deps/bson/src/bson_binary.erl:55: syntax error before: '{'
workspace/ChicagoBoss/deps/bson/src/bson_binary.erl:4: function get_map/1 undefined
workspace/ChicagoBoss/deps/bson/src/bson_binary.erl:33: function get_fields/2 undefined
workspace/ChicagoBoss/deps/bson/src/bson_binary.erl:36: spec for undefined function bson_binary:get_map/1
workspace/ChicagoBoss/deps/bson/src/bson_binary.erl:36: type map() undefined
workspace/ChicagoBoss/deps/bson/src/bson_binary.erl:78: illegal guard expression
workspace/ChicagoBoss/deps/bson/src/bson_binary.erl:92: function get_map/1 undefined
workspace/ChicagoBoss/deps/bson/src/bson_binary.erl:86: function get_field/4 is unused
workspace/ChicagoBoss/deps/bson/src/bson_binary.erl:142: function get_field/2 is unused
workspace/ChicagoBoss/deps/bson/src/bson_binary.erl:153: function get_string/1 is unused
workspace/ChicagoBoss/deps/bson/src/bson_binary.erl:172: function get_array/2 is unused
workspace/ChicagoBoss/deps/bson/src/bson_binary.erl:179: function get_values/3 is unused
workspace/ChicagoBoss/deps/bson/src/bson_binary.erl:194: function get_binary/1 is unused
workspace/ChicagoBoss/deps/bson/src/bson_binary.erl:207: function get_closure/1 is unused
workspace/ChicagoBoss/deps/bson/src/bson_binary.erl:219: function get_unixtime/1 is unused
workspace/ChicagoBoss/deps/bson/src/bson_binary.erl:228: function get_oid/1 is unused
ERROR: compile failed while processing workspace/ChicagoBoss/deps/bson: rebar_abort
make: *** [all] Error 1
Build step 'Execute shell' marked build as failure
Finished: FAILURE
谁能提出解决方案?
问题的根源是来自 BossDB v0.8.15
(当前的 ChickagoBoss)的 mongodb-erlang
ce9bf77902
使用 bson
的 HEAD
版本,它与 Erlang/OTP < 17 现在。
您可以在 boss_db
依赖项之前的 rebar.config 中指定 bson
的工作版本。如我所见,标签 v0.2
可以用于 R16B03-1
。
我们升级了具有 'bson' 依赖项的 chicagoboss。当我们使用 ./rebar update-deps compile
编译 chicagoboss 时。编译 chicagoboss 时抛出语法错误。
但基本上我们从 'HEAD' 中提取它。不过我不确定这是否是个好主意。
Pulling bson from {git,"git://github.com/mongodb/bson-erlang","HEAD"}
Cloning into 'bson'...
这里是编译错误:
$./rebar update-deps compile
...
...
...
==> erlando (compile)
Compiled src/cut.erl
Compiled src/do.erl
Compiled src/monad.erl
Compiled src/monad_plus.erl
Compiled src/identity_m.erl
Compiled src/test.erl
Compiled src/error_m.erl
Compiled src/error_t.erl
Compiled src/list_m.erl
Compiled src/maybe_m.erl
Compiled src/import_as.erl
Compiled src/omega_m.erl
Compiled src/state_t.erl
==> aleppo (compile)
src/aleppo_parser.yrl: Warning: conflicts: 1 shift/reduce, 0 reduce/reduce
workspace/ChicagoBoss/deps/aleppo/src/aleppo_parser.yrl:none: Warning: conflicts: 1 shift/reduce, 0 reduce/reduce
Compiled src/aleppo_parser.yrl
Compiled src/aleppo_parser.erl
Compiled src/aleppo.erl
==> medici (compile)
Compiled src/medici.erl
Compiled src/medici_port_srv.erl
Compiled src/principe_table.erl
Compiled src/medici_native_conn.erl
Compiled src/medici_native_controller.erl
Compiled src/medici_conn_sup.erl
Compiled src/medici_sup.erl
Compiled src/medici_conn.erl
Compiled src/medici_port_sup.erl
Compiled src/medici_app.erl
Compiled src/medici_controller.erl
Compiled src/principe.erl
==> bson (compile)
Compiling workspace/ChicagoBoss/deps/bson/src/bson_binary.erl failed:
workspace/ChicagoBoss/deps/bson/src/bson_binary.erl:40: syntax error before: '{'
workspace/ChicagoBoss/deps/bson/src/bson_binary.erl:55: syntax error before: '{'
workspace/ChicagoBoss/deps/bson/src/bson_binary.erl:4: function get_map/1 undefined
workspace/ChicagoBoss/deps/bson/src/bson_binary.erl:33: function get_fields/2 undefined
workspace/ChicagoBoss/deps/bson/src/bson_binary.erl:36: spec for undefined function bson_binary:get_map/1
workspace/ChicagoBoss/deps/bson/src/bson_binary.erl:36: type map() undefined
workspace/ChicagoBoss/deps/bson/src/bson_binary.erl:78: illegal guard expression
workspace/ChicagoBoss/deps/bson/src/bson_binary.erl:92: function get_map/1 undefined
workspace/ChicagoBoss/deps/bson/src/bson_binary.erl:86: function get_field/4 is unused
workspace/ChicagoBoss/deps/bson/src/bson_binary.erl:142: function get_field/2 is unused
workspace/ChicagoBoss/deps/bson/src/bson_binary.erl:153: function get_string/1 is unused
workspace/ChicagoBoss/deps/bson/src/bson_binary.erl:172: function get_array/2 is unused
workspace/ChicagoBoss/deps/bson/src/bson_binary.erl:179: function get_values/3 is unused
workspace/ChicagoBoss/deps/bson/src/bson_binary.erl:194: function get_binary/1 is unused
workspace/ChicagoBoss/deps/bson/src/bson_binary.erl:207: function get_closure/1 is unused
workspace/ChicagoBoss/deps/bson/src/bson_binary.erl:219: function get_unixtime/1 is unused
workspace/ChicagoBoss/deps/bson/src/bson_binary.erl:228: function get_oid/1 is unused
ERROR: compile failed while processing workspace/ChicagoBoss/deps/bson: rebar_abort
make: *** [all] Error 1
Build step 'Execute shell' marked build as failure
Finished: FAILURE
谁能提出解决方案?
问题的根源是来自 BossDB v0.8.15
(当前的 ChickagoBoss)的 mongodb-erlang
ce9bf77902
使用 bson
的 HEAD
版本,它与 Erlang/OTP < 17 现在。
您可以在 boss_db
依赖项之前的 rebar.config 中指定 bson
的工作版本。如我所见,标签 v0.2
可以用于 R16B03-1
。