Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unused_deps not detecting unused dependencies at all #441

Closed
haikalpribadi opened this issue Nov 20, 2018 · 3 comments · Fixed by #728
Closed

unused_deps not detecting unused dependencies at all #441

haikalpribadi opened this issue Nov 20, 2018 · 3 comments · Fixed by #728

Comments

@haikalpribadi
Copy link

haikalpribadi commented Nov 20, 2018

Hi everyone,

I'm so sorry for posting this again, right after @pmbethe09 closes issue #396. But I've upgraded unused_deps to the latest release, 0.19.2 today, and unused_deps is still not detecting any unused dependencies.

You can find our code at haikalpribadi/grakn branch unused-deps-not-working, which you can clone and run:

bazel build //client-java:all
bazel run //dependencies/tools:unused-deps -- //client-java

You will find that unused_deps returns: No unused deps found.

Meanwhile, we know for a fact that the following dependencies of //client-java:client-java are no longer needed (and we have confirmed by removing them afterwards).

//dependencies/maven/artifacts/com/codahale/metrics:metrics-core
//dependencies/maven/artifacts/com/github/rholder:guava-retrying
//dependencies/maven/artifacts/com/netflix/hystrix:hystrix-core
//dependencies/maven/artifacts/com/sun/jersey:jersey-client
//dependencies/maven/artifacts/io/reactivex:rxjava
//dependencies/maven/artifacts/javax/ws/rs:jsr311-api
//dependencies/maven/artifacts/org/sharegov:mjson

Can someone help us look into this?

@pmbethe09
Copy link
Member

I can repeat your experience using bazel 0.19.2

Could it be unused_deps not working for java_library that are actually exports of something else?

Will test a simpler example and see.

@vmax
Copy link

vmax commented Oct 4, 2019

Can confirm it doesn't work for bazel 0.29.0 and unused_deps 0.29.0 still

haikalpribadi pushed a commit to typedb/typedb-dependencies that referenced this issue Oct 4, 2019
We don't seem to use those build tools anywhere, so let's not keep them. `unused_deps` does not seem to work properly anyway (see bazelbuild/buildtools#441 for details)
@pmbethe09
Copy link
Member

@vladmos @laurentlb -- if we want to continue to provide unused_deps, probably have to fix it for whatever the latest .jdeps file changes are

aljoscha added a commit to aljoscha/buildtools that referenced this issue Oct 5, 2019
Before, we would only support BUILD files. Now, we check if the BUILD
file exists, if not we add the .bazel extension and return that.

This fixes bazelbuild#204
This fixes bazelbuild#441
vladmos pushed a commit that referenced this issue Oct 9, 2019
Before, we would only support BUILD files. Now, we check if the BUILD
file exists, if not we add the .bazel extension and return that.

This fixes #204
This fixes #441
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants