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

Support --nolegacy_external_runfiles #72

Merged
Merged
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
7 changes: 6 additions & 1 deletion perl/perl.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,12 @@ def transitive_deps(ctx, extra_files = [], extra_deps = []):

def _include_paths(ctx):
"""Calculate the PERL5LIB paths for a perl_library rule's includes."""
package_root = (ctx.label.workspace_root + "/" + ctx.label.package).strip("/") or "."
workspace_name = ctx.label.workspace_name
if workspace_name:
workspace_root = "../" + workspace_name
else:
workspace_root = ""
package_root = (workspace_root + "/" + ctx.label.package).strip("/") or "."
include_paths = [package_root] if "." in ctx.attr.includes else []
include_paths.extend([package_root + "/" + include for include in ctx.attr.includes if include != "."])
for dep in ctx.attr.deps:
Expand Down