sasa1977 / boundary

Manage and restrain cross-module dependencies in Elixir projects
MIT License
824 stars 22 forks source link

Compilation error when upgrading from 0.9.2 to later versions on umbrella application #66

Open 75pollet opened 2 months ago

75pollet commented 2 months ago

The application is an umbrella application with multiple apps but we only have boundaries on 3 apps because we only need boundaries for the 3 apps. I have tried upgrading from 0.9.2 to each of the later versions but i keep getting the same error;

==> release_manager
** (ArgumentError) errors were found at the given arguments:

  * 1st argument: the table identifier does not refer to an existing ETS table

    (stdlib 3.17.2) :ets.insert_new(:"Elixir.Boundary.Mix.CompilerState.release_manager.Seen", {ReleaseManager.UpdateCountries})
    (boundary 0.10.3) lib/boundary/mix/compiler_state.ex:31: Boundary.Mix.CompilerState.initialize_module/1
    (boundary 0.10.3) lib/boundary/mix/tasks/compile/boundary.ex:136: Mix.Tasks.Compile.Boundary.record/5
    (elixir 1.14.3) src/elixir_env.erl:30: :elixir_env."-trace/2-lc$^0/1-0-"/3
    (elixir 1.14.3) src/elixir_env.erl:30: :elixir_env.trace/2
    (elixir 1.14.3) src/elixir_dispatch.erl:185: :elixir_dispatch.do_expand_import/7
    (elixir 1.14.3) src/elixir_dispatch.erl:119: :elixir_dispatch.dispatch_import/6

The error is only happening on apps where we do not have boundaries configured and i'm not sure why.

sasa1977 commented 2 months ago

I have just tried this on a small sample project with two umbrellas defined, where one uses boundary, and another doesn't, and I couldn't reproduce it. I tried with in-app deps (both ways), and without. Could you create a simple project which reproduces the issue? Another thing you could try is to rebuild all (e.g. mix compile --force).

75pollet commented 2 months ago

alright, i'll create a project and try to reproduce it