rules_apple icon indicating copy to clipboard operation
rules_apple copied to clipboard

Not a regular file: /private/var/tmp/_bazel_spa/c65d03ad46177b535ec85ff972d3ff8b/external/com_github_protocolbuffers_protobuf/third_party/six.BUILD

Open DanielLiuCD opened this issue 3 years ago • 2 comments

ERROR: An error occurred during the fetch of repository 'six': Traceback (most recent call last): File "/private/var/tmp/_bazel_spa/c65d03ad46177b535ec85ff972d3ff8b/external/bazel_tools/tools/build_defs/repo/http.bzl", line 110, column 28, in _http_archive_impl workspace_and_buildfile(ctx) File "/private/var/tmp/_bazel_spa/c65d03ad46177b535ec85ff972d3ff8b/external/bazel_tools/tools/build_defs/repo/utils.bzl", line 61, column 41, in workspace_and_buildfile ctx.file("BUILD.bazel", ctx.read(ctx.attr.build_file)) Error in read: Not a regular file: /private/var/tmp/_bazel_spa/c65d03ad46177b535ec85ff972d3ff8b/external/com_github_protocolbuffers_protobuf/third_party/six.BUILD ERROR: /Users/spa/projects/swift_projects/bazel_ios/WORKSPACE:28:31: fetching http_archive rule //external:six: Traceback (most recent call last): File "/private/var/tmp/_bazel_spa/c65d03ad46177b535ec85ff972d3ff8b/external/bazel_tools/tools/build_defs/repo/http.bzl", line 110, column 28, in _http_archive_impl workspace_and_buildfile(ctx) File "/private/var/tmp/_bazel_spa/c65d03ad46177b535ec85ff972d3ff8b/external/bazel_tools/tools/build_defs/repo/utils.bzl", line 61, column 41, in workspace_and_buildfile ctx.file("BUILD.bazel", ctx.read(ctx.attr.build_file)) Error in read: Not a regular file: /private/var/tmp/_bazel_spa/c65d03ad46177b535ec85ff972d3ff8b/external/com_github_protocolbuffers_protobuf/third_party/six.BUILD

DanielLiuCD avatar Jun 09 '22 09:06 DanielLiuCD

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive( name = "build_bazel_rules_apple", sha256 = "12865e5944f09d16364aa78050366aca9dc35a32a018fa35f5950238b08bf744", url = "https://github.com/bazelbuild/rules_apple/releases/download/0.34.2/rules_apple.0.34.2.tar.gz", )

load( "@build_bazel_rules_apple//apple:repositories.bzl", "apple_rules_dependencies", )

apple_rules_dependencies()

load( "@build_bazel_rules_swift//swift:repositories.bzl", "swift_rules_dependencies", )

swift_rules_dependencies()

load( "@build_bazel_rules_swift//swift:extras.bzl", "swift_rules_extra_dependencies", )

swift_rules_extra_dependencies()

load( "@build_bazel_apple_support//lib:repositories.bzl", "apple_support_dependencies", )

apple_support_dependencies()

DanielLiuCD avatar Jun 09 '22 09:06 DanielLiuCD

It seems like something must be messed up in your local environment, maybe try a bazel clean --expunge and try again? Otherwise can you provide a repro case?

keith avatar Jun 09 '22 21:06 keith

Fixed by https://github.com/bazelbuild/rules_swift/pull/916, thanks for the report. In my testing I had to do a bazel clean --expunge after this update, but then it worked, i guess the old artifact somehow isn't handled well. Please file an new issue if you still see issues after that update!

keith avatar Oct 10 '22 16:10 keith