Compilation 在chicaogboss中编译bson时出现语法错误

Compilation 在chicaogboss中编译bson时出现语法错误,compilation,erlang,chicagoboss,Compilation,Erlang,Chicagoboss,我们升级了chicagoboss,它依赖于“bson”。当我们使用/rebar update deps compile编译chicagoboss时。编译chicagoboss时会抛出语法错误。 但基本上我们是从“头”上取的。我不确定这是不是个好主意 Pulling bson from {git,"git://github.com/mongodb/bson-erlang","HEAD"} Cloning into 'bson'... 以下是编译错误: $./rebar update-deps c

我们升级了chicagoboss,它依赖于“bson”。当我们使用
/rebar update deps compile
编译chicagoboss时。编译chicagoboss时会抛出语法错误。 但基本上我们是从“头”上取的。我不确定这是不是个好主意

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的
mongodb erlang
ce9bf77902
(当前的ChickegoBoss)使用了
HEAD
版本的
bson
,该版本现在与erlang/OTP<17不兼容


boss\u db
依赖项之前,可以在rebar.config中指定
bson
的工作版本。正如我所看到的,标签
v0.2
对于
R16B03-1
是可以的

看起来您正试图在使用旧erlang的机器上编译带有映射的新bson。你有哪个版本?@P_A-好的,我使用的是
Erlang R16B01(erts-5.10.2)
。但是现在我们不能升级它。获取旧版本的
erlang bson
的方法是什么?您可以在
rebar.config
中的
bson
依赖项之前指定
bson的工作版本。正如我所看到的,tag
v0.2
是可以的。@P_A-是的,谢谢你的努力。我从一个旧的提交中提取了它。像这样:{git,“git://github.com/mongodb/bson-erlang“,“旧提交哈希”}`。你可以评论你的建议作为回答。我会接受的。@Vetal4eg-是的,请看一下上面的评论`{git,”git://github.com/mongodb/bson-erlang“,“旧提交哈希”}