Skip to content

External repositories don't regenerate in response to XCode changes #14551

Open
@Silic0nS0ldier

Description

@Silic0nS0ldier

Description of the problem / feature request:

An external repositories which uses host state as an input did not regenerate in response to changes. In this case XCode.

Feature requests: what underlying problem are you trying to solve with this feature?

NA

Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

On a machine without XCode (App Store) installed...

  1. Clone Bazel repo
  2. Run bazel build //src:bazel-dev
  3. Observe build failure (due to missing SDK, I haven't ruled out my device being in a bad state)
  4. Install XCode (App Store)
  5. Run bazel build //src:bazel-dev
  6. Observe build failure due to generated external repositories being out of sync
    ERROR: /private/var/tmp/_bazel_jordan/334f33179bc015d52bb8bdf09a360987/external/com_google_protobuf/BUILD:161:11: Compiling src/google/protobuf/io/zero_copy_stream.cc failed: undeclared inclusion(s) in rule '@com_google_protobuf//:protobuf_lite':
    this rule is missing dependency declarations for the following files included by 'src/google/protobuf/io/zero_copy_stream.cc':
    '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string'
    '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config'
    ...
    
  7. Run bazel clean --expunge (or bazel sync --configure as per External repositories don't regenerate in response to XCode changes #14551 (comment))
  8. Run bazel build //src:bazel-dev
  9. Observe successful build

What operating system are you running Bazel on?

MacOS

What's the output of bazel info release?

release 6.0.0-pre.20211215.3

If bazel info release returns "development version" or "(@Non-Git)", tell us how you built Bazel.

NA

What's the output of git remote get-url origin ; git rev-parse master ; git rev-parse HEAD ?

https://github.com/Silic0nS0ldier/bazel.git
b92d5c3ca209ac3495b72fdf488eb9291455a8e2
26d4aadaf4006efd6ff20004aa1430e97263b30c

Have you found anything relevant by searching the web?

No, I knew what was causing the initial build issues when I saw it. Resolving the missing dependency issues revealed the external repository caching issue.

Any other information, logs, or outputs that you want to share?

Nope

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2We'll consider working on this in future. (Assignee optional)not staleIssues or PRs that are inactive but not considered staleplatform: appleteam-ExternalDepsExternal dependency handling, remote repositiories, WORKSPACE file.type: feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions