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

Remove duplicates from classpath #100

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
60 changes: 0 additions & 60 deletions bazel_rules/private/bsp_workspace_deps.bzl

This file was deleted.

2 changes: 2 additions & 0 deletions bazel_rules/private/bsp_workspace_info.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ def _bsp_workspace_info_impl(ctx):
for deps in find_deps_info_on(ctx, "@io_bazel_rules_scala//scala:toolchain_type", "scala_compile_classpath").deps
for file in deps[JavaInfo].compile_jars.to_list()
]
# Dedup classpath
compile_classpath = list({item.path: item for item in compile_classpath}.values())
Copy link
Collaborator

Choose a reason for hiding this comment

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

you might want to sort this to make it deterministic. Dict is not deterministic (I don't think). And if you have classes duplicated across jars a different order will sometimes give you different results.


# Why not use the class_jar in SemanticdbInfo? Because it's a string, not a File, so we can't pass
# pass it to outputs.
Expand Down