From 30bdc54280203c90943972a6a5f302bd8300b99f Mon Sep 17 00:00:00 2001 From: Daniel Wagner-Hall Date: Thu, 28 Nov 2024 00:56:06 +0000 Subject: [PATCH] Try copying not symlinking --- crate_universe/private/local_crate_mirror.bzl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/crate_universe/private/local_crate_mirror.bzl b/crate_universe/private/local_crate_mirror.bzl index 346101da6a..c50e1ef5b5 100644 --- a/crate_universe/private/local_crate_mirror.bzl +++ b/crate_universe/private/local_crate_mirror.bzl @@ -17,14 +17,16 @@ def _local_crate_mirror_impl(repository_ctx): generator, _generator_sha256 = get_generator(repository_ctx, host_triple.str) + execute(repository_ctx, ["bash", "-c", "-cp -r {}/* {}/".format(path, repository_ctx.path("."))]) + execute(repository_ctx, [generator, "render", "--options-json", repository_ctx.attr.options_json, "--output-path", repository_ctx.path("BUILD.bazel")]) repository_ctx.file("WORKSPACE", "") # TODO: Watch this directory so that we get invalidated on changes and will re-symlink. - for child_abs in path.readdir(): - if child_abs.basename in ["WORKSPACE", "BUILD", "BUILD.bazel"]: - continue - repository_ctx.symlink(child_abs, child_abs.basename) + # for child_abs in path.readdir(): + # if child_abs.basename in ["WORKSPACE", "BUILD", "BUILD.bazel"]: + # continue + # repository_ctx.symlink(child_abs, child_abs.basename) local_crate_mirror = repository_rule(