Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rebar.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{erl_opts, [debug_info]}.
{deps, [{opencensus, "~> 0.7.0"},
{deps, [{opencensus, ">= 0.7 < 0.9"},
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not supported by rebar3. If this "worked" it means it likely has a bug that results in it ignoring either the 0.7 or the 0.9.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, gotcha. In that case, how could we express this?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can't. rebar3 doesn't try to resolve a version that matches all declared constraints, it takes a match for the first occurrence of the dep it encounters.

So if your project using opencensus_datadog also requests opencensus 0.8.0 it doesn't matter what version the opencensus_datadog dep has for opencensus.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It appears that mix is a bit more strict than rebar3.

Failed to use "opencensus" (version 0.8.0) because
  deps/opencensus_plug/mix.exs requires >= 0.6.0 and <= 0.8.0
  oc_datadog (version 0.2.0) requires ~> 0.7.0
  opencensus_elixir (version 0.2.0) requires ~> 0.8.0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Argh, yea, wasn't thinking about mix. I think you have to use override: true at the top level for now. I think we just have to remove opencensus as a dep from these since it was only needed for being able to declare the behaviour.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tsloughter @sneako I have done such version limitation due to fact that I have proposed a lot of changes to the opencensus itself, and if census-instrumentation/opencensus-erlang#136 land then it will break if someone do not lock on correct versions.

{jsx, "~> 2.9"}]}.

{project_plugins, [rebar3_lint,
Expand Down
4 changes: 2 additions & 2 deletions rebar.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
[{<<"counters">>,{pkg,<<"counters">>,<<"0.2.1">>},1},
{<<"ctx">>,{pkg,<<"ctx">>,<<"0.5.0">>},1},
{<<"jsx">>,{pkg,<<"jsx">>,<<"2.9.0">>},0},
{<<"opencensus">>,{pkg,<<"opencensus">>,<<"0.7.0">>},0},
{<<"opencensus">>,{pkg,<<"opencensus">>,<<"0.8.0">>},0},
{<<"rfc3339">>,{pkg,<<"rfc3339">>,<<"0.9.0">>},2},
{<<"wts">>,{pkg,<<"wts">>,<<"0.3.0">>},1}]}.
[
{pkg_hash,[
{<<"counters">>, <<"AA3D97E88F92573488987193D0F48EFCE0F3B2CD1443BF4EE760BC7F99322F0C">>},
{<<"ctx">>, <<"78E0F16712E12D707A7F34277381B8E193D7C71EAA24D37330DC02477C09EDA5">>},
{<<"jsx">>, <<"D2F6E5F069C00266CAD52FB15D87C428579EA4D7D73A33669E12679E203329DD">>},
{<<"opencensus">>, <<"B4C5F6A96F2BA2154570F24BB08B65D6EE0FF5B61518ACF706CA760B7696A4E1">>},
{<<"opencensus">>, <<"2F16103D1E25DC6AD245F71810D0A80F78D495C06B13224E7A361F327DA16176">>},
{<<"rfc3339">>, <<"2075653DC9407541C84B1E15F8BDA2ABE95FB17C9694025E079583F2D19C1060">>},
{<<"wts">>, <<"5CDF22C775CB1EBAE24C326A5DB6074D753C42F4BD12A9AA47CC62D3E2C71AD1">>}]}
].