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

Added support for bazel generated embeded jar resources. #187

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

Added support for bazel generated embeded jar resources. #187

wants to merge 1 commit into from

Conversation

igorgatis
Copy link

Before this change, generated files could not be located when placed as resources attribute. Current code uses .short_path which works fine for regular files. Howver, generated files are placed under bazel-out/k8-fastbuild/genfiles which is not in the source tree. This change adds bazel-out/k8-fastbuild/genfiles to the list of _CONVENTIONAL_RESOURCE_PATHS thus this prefix is removed before adding the resource into the jar file.

@igorgatis igorgatis requested a review from thomaswk as a code owner May 20, 2019 15:45
@igorgatis
Copy link
Author

@hsyed could you pls take a look?

@igorgatis
Copy link
Author

@jin Does this PR make sense to you?

@cgruber
Copy link
Collaborator

cgruber commented Jun 12, 2019

As I understand it, this repo won't be taking more patches until the internal google rules are pushed out. I'm bringing my repo http://github.com/cgruber/rules_kotlin more up to date, if you want to contribute there, and we can chat with the google team once they're in a position to take patches on what parts of that fork to bring in.

@@ -52,6 +52,8 @@ def _fold_jars_action(ctx, rule_kind, output_jar, input_jars):
_CONVENTIONAL_RESOURCE_PATHS = [
"src/main/resources",
"src/test/resources",
"bazel-out/k8-fastbuild/genfiles",
Copy link
Member

Choose a reason for hiding this comment

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

This seems odd. We shouldn't depend on bazel-* paths, especially if they have configuration parameters in them, like k8.

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