remove @bazel_skylib dependency (again)
This was accidentally included in d61aab183e434d48783dbaa2fdb9e39714217637
This commit is contained in:
parent
0e12e84103
commit
92067b5d85
|
@ -1,8 +1,6 @@
|
|||
# Copyright 2023 Uber Technologies, Inc.
|
||||
# Licensed under the MIT License
|
||||
|
||||
load("@bazel_skylib//lib:paths.bzl", "paths")
|
||||
|
||||
def _platform_transition_impl(settings, attr):
|
||||
_ignore = settings
|
||||
return {
|
||||
|
@ -19,7 +17,11 @@ _platform_transition = transition(
|
|||
|
||||
def _platform_binary_impl(ctx):
|
||||
platform_sanitized = ctx.attr.platform.replace("/", "_").replace(":", "_")
|
||||
dst = ctx.actions.declare_file("{}-{}".format(paths.basename(ctx.file.src.path), platform_sanitized))
|
||||
dstname = "{}-{}".format(
|
||||
_paths_basename(ctx.file.src.path),
|
||||
platform_sanitized,
|
||||
)
|
||||
dst = ctx.actions.declare_file(dstname)
|
||||
src = ctx.file.src
|
||||
ctx.actions.run(
|
||||
outputs = [dst],
|
||||
|
@ -61,3 +63,7 @@ platform_test = rule(
|
|||
attrs = _attrs,
|
||||
test = True,
|
||||
)
|
||||
|
||||
## Copied from https://github.com/bazelbuild/bazel-skylib/blob/1.4.1/lib/paths.bzl#L22
|
||||
def _paths_basename(p):
|
||||
return p.rpartition("/")[-1]
|
||||
|
|
|
@ -218,7 +218,7 @@ def _zig_repository_impl(repository_ctx):
|
|||
print("Launcher compilation failed. Clearing %s/{%s} and retrying" %
|
||||
(cache_prefix, ",".join(zig_cache_dirs)))
|
||||
for d in zig_cache_dirs:
|
||||
repository_ctx.delete(paths.join(cache_prefix, d))
|
||||
repository_ctx.delete(_paths_join(cache_prefix, d))
|
||||
|
||||
ret = repository_ctx.execute(
|
||||
compile_cmd,
|
||||
|
|
Loading…
Reference in New Issue