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

Allow users to configure buildijar value when building a scala library #1582

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ladinu
Copy link

@ladinu ladinu commented May 20, 2024

Description

Allow users to configure buildijar value when building a library

Motivation

I'm generating some Scala code and compiling them as a library. But IntelliJ is failing to detect the sources of the library. When I turn off build_ijar, I'm able to view sources.

@ladinu ladinu changed the title Allow users to configure value when building a scala library Allow users to configure ijar value when building a scala library May 21, 2024
@ladinu ladinu changed the title Allow users to configure ijar value when building a scala library Allow users to configure buildijar value when building a scala library May 21, 2024
@crt-31
Copy link
Contributor

crt-31 commented May 25, 2024

I'm not opposed to the setting necessarily, but for the use case the OP describes:
My understanding is that IntelliJ is using bazel-bsp to incorperate bazel into their IDE. I would think it would be more proper for bazel-bsp to be the ones that do the source-jar / ijar mapping, they should have or be able to get the information. If you do it in scala_library, you would lose some of the benefits of the ijar.

@ladinu
Copy link
Author

ladinu commented May 25, 2024

@crt-31 I agree that it makes more sense for bazel-bsp to handle ijar -> source-jar mapping. I don't know what it would take to get it working there though. Since I'm only enabling this for generated scala code, I don't think I'll miss out on any of the benefits provided by the ijar.

But I think having this setting is reasonable. It should ultimately be up to the user as to how they want to configure their scala library.

@ladinu
Copy link
Author

ladinu commented Jun 9, 2024

@liucijus @simuons Any opposition to this change?

@liucijus
Copy link
Collaborator

@ladinu It was fixed on intellij plugin. Are you referring to this plugin, or something else?

@ladinu
Copy link
Author

ladinu commented Jun 10, 2024

@liucijus I'm referring to this PR where users can choose to set build_ijar = True for scala library (default is False)

@liucijus
Copy link
Collaborator

I'm generating some Scala code and compiling them as a library. But IntelliJ is failing to detect the sources of the library.

@ladinu would you be able to make a small repro repository for me to debug it? I think it needs to be fixed on the Intellij plugin side.

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.

3 participants