Skip to content

Commit

Permalink
Try copying not symlinking
Browse files Browse the repository at this point in the history
  • Loading branch information
illicitonion committed Nov 28, 2024
1 parent cd588c0 commit 30bdc54
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions crate_universe/private/local_crate_mirror.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 30bdc54

Please sign in to comment.