Skip to content

Conversation

@vinnybod
Copy link
Contributor

@vinnybod vinnybod commented Dec 2, 2025

Description

I have a scala_library with some java files where I would like to override the class for a particular dependency (i.e. something from @maven//).

This is a common idiom for monkey patching some functionality.

In order for this to work, the Java file needs to be first on the classpath.
@rules_scala seems to be placing the generated java_library at the end of the CLASSPATH.

This change makes it so that it's first.

This is a copy of #1752 but with a test added

Copy link
Collaborator

@WojciechMazur WojciechMazur left a comment

Choose a reason for hiding this comment

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

Thank you for these changes, looks good. I've left some 2 comments regarding only minor improvements

@WojciechMazur WojciechMazur merged commit 65e56c4 into bazel-contrib:master Dec 11, 2025
1 check passed
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 this pull request may close these issues.

2 participants