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

Change databinding dependent lib artifact to a directory #228

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion rules/data_binding.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def _setup_dependent_lib_artifacts(ctx, output_dir, deps):
path = artifact.short_path
if path.startswith("../"):
path = path[3:]
dep_lib_artifact = ctx.actions.declare_file(
dep_lib_artifact = ctx.actions.declare_directory(
Copy link
Collaborator

Choose a reason for hiding this comment

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

from an internal test, the _utils.copy_file(...) below at 127 fails with:

	File "android_binary_internal.bzl", line 724, column 35, in _impl
		return processing_pipeline.run(ctx, java_package, _PROCESSING_PIPELINE)
	File "rules_android/rules/processing_pipeline.bzl", line 86, column 23, in _run
		info = execute(ctx, **target_ctx)
	File "rules_android/rules/android_binary_internal/impl.bzl", line 200, column 37, in _process_data_binding
		value = data_binding.process(
	File "rules_android/rules/data_binding.bzl", line 272, column 55, in _process
		dep_lib_artifacts = _setup_dependent_lib_artifacts(ctx, output_dir, deps)
	File "rules_android/rules/data_binding.bzl", line 130, column 33, in _setup_dependent_lib_artifacts
		_utils.copy_file(ctx, artifact, dep_lib_artifact)
	File "rules_android/rules/utils.bzl", line 214, column 13, in _copy_file
		fail("Cannot use copy_file with directories")
Error in fail: Cannot use copy_file with directories

did this work in your local testing?

output_dir + "dependent-lib-artifacts/" + path,
)

Expand Down