I just tried to emulate a monorepo structure with two Phoenix applications and I was expecting the following behaviors:
[ ] When running unused_rs from the root directory, I was expecting to see the results for app1 and app2
[ ] When running unused_rsinside of the app1 directory, I was expecting to see the results for app1, and unused_rs should have ignored the results from other sibling apps.
[ ] When running unused_rsinside of the app2 directory, I was expecting to see the results only for app2, unused_rs should have ignored the results from other sibling apps.
Here is the way I did it in case you want to replicate the issue:
$ mkdir /tmp/demo
$ cd /tmp/demo/
$ mix phx.new app1 --no-ecto
$ cd app1
$ mix phx.server # just to check that the app works
$ cd ..
$ mix phx.new app2 --no-html --no-webpack
$ cd app2
$ mix ecto.create
$ mix phx.server # just to check that the app works
$ cd ..
$ git init
$ git add .
$ git commit -m "initial structure"
$ git ctags
$ ls .git/tags
.git/tags
Then, here are the results:
$ pwd
/tmp/demo
$ ~/Dev/rust/unused_rs/target/debug/unused-rs -l high --format compact
LayoutView app1/lib/app1_web/views/layout_view.ex Only one occurrence exists
LayoutViewTest app1/test/app1_web/views/layout_view_test.exs Only one occurrence exists
PageControllerTest app1/test/app1_web/controllers/page_controller_test.exs Only one occurrence exists
PageView app1/lib/app1_web/views/page_view.ex Only one occurrence exists
PageViewTest app1/test/app1_web/views/page_view_test.exs Only one occurrence exists
error_tag app1/lib/app1_web/views/error_helpers.ex Only one occurrence exists
In the previous command, I just see the results for app1, it should have included the results for app2 too.
$ cd app1/
$ ~/Dev/rust/unused_rs/target/debug/unused-rs -l high --format compact
ErrorViewTest app2/test/app2_web/views/error_view_test.exs Only one occurrence exists
LayoutView app1/lib/app1_web/views/layout_view.ex Only one occurrence exists
LayoutViewTest app1/test/app1_web/views/layout_view_test.exs Only one occurrence exists
MixProject app2/mix.exs Only one occurrence exists
PageControllerTest app1/test/app1_web/controllers/page_controller_test.exs Only one occurrence exists
PageView app1/lib/app1_web/views/page_view.ex Only one occurrence exists
PageViewTest app1/test/app1_web/views/page_view_test.exs Only one occurrence exists
Repo app2/lib/app2/repo.ex Only one occurrence exists
__using__ app1/lib/app1_web.ex Only one occurrence exists
error_tag app1/lib/app1_web/views/error_helpers.ex Only one occurrence exists
template_not_found app2/lib/app2_web/views/error_view.ex Only one occurrence exists
In the previous output, I was expecting only results for the app1, but, as you can see, results for app2 are included.
$ cd ../app2/
$ ~/Dev/rust/unused_rs/target/debug/unused-rs -l high --format compact
ErrorViewTest app2/test/app2_web/views/error_view_test.exs Only one occurrence exists
MixProject app1/mix.exs Only one occurrence exists
__using__ app1/lib/app1_web.ex Only one occurrence exists
template_not_found app1/lib/app1_web/views/error_view.ex Only one occurrence exists
translate_error app2/lib/app2_web/views/error_helpers.ex Only one occurrence exists
In the previous output, I was expecting only results for the app2, but, as you can see, results for app1 are included.
The unused_rs that I'm using was built using cargo build and using the commit 8b4f82220037710bb73c8165efb2444bb15b617a
I just tried to emulate a monorepo structure with two Phoenix applications and I was expecting the following behaviors:
unused_rs
from the root directory, I was expecting to see the results forapp1
andapp2
unused_rs
inside of theapp1
directory, I was expecting to see the results forapp1
, andunused_rs
should have ignored the results from other sibling apps.unused_rs
inside of theapp2
directory, I was expecting to see the results only forapp2
,unused_rs
should have ignored the results from other sibling apps.Here is the way I did it in case you want to replicate the issue:
Then, here are the results:
In the previous command, I just see the results for
app1
, it should have included the results forapp2
too.In the previous output, I was expecting only results for the
app1
, but, as you can see, results forapp2
are included.In the previous output, I was expecting only results for the
app2
, but, as you can see, results forapp1
are included.The
unused_rs
that I'm using was built usingcargo build
and using the commit 8b4f82220037710bb73c8165efb2444bb15b617a