Coder Social home page Coder Social logo

bazel-repro's Introduction

repro

Minimal example of an issue where a local_repository that is used as a CROSSTOOL seemingly does not execute the WORKSPACE of the repo.

A Vagrantfile is included for a nice hermetic testbed. The two "repos" are synced into /$REPO_DIR_NAME/{proj,bazel_clang}.

NOTE: yes, there are bugs/issues in the wrappers -- should not have any effect here. currently under development.

Expectation

When running:

$ cd proj
$ bazel build -s --config=clang //...

the clang archive is downloaded, extracted, and used as a CROSSTOOL as defined in the included bazel_clang "repo".

Findings

Instead, the archive (@ubuntu_archive) is not downloaded, and the references to the workspace that are in the BUILD come up as errors (because it does not exist).

Furthermore, it seems the bazel_clang/WORKSPACE file is never even parsed. Typing random garbage (syntax error) does not trigger a new error, just the missing workspace error.

Reproduction

This is agnostic to OS (just have to change URL and SHA hash). Tested on Ubuntu and MacOS.

# cd into the dependent project

$ cd $REPO_DIR/proj

# build with the default toolchain to confirm
# a working setup and baseline

$ bazel build -s //...

# clean and rebuild with `clang` config
# -- THIS SHOULD ERROR --

$ bazel clean --expunge
$ bazel build -s --config=clang //...

But... when we build the "fake" project I've copied into the crosstool's repo, everything works. This uses the same bazel.rc and everything, but works fine.

Archive is downloaded and the build uses the wrappers.

# cd to the crosstool dir/repo

$ cd $REPO_DIR/bazel_clang

# build with default to re-confirm

$ bazel build -s /...

# now try with clang
# -- THIS SHOULD SUCCEED --

$ bazel clean --expunge
$ bazel build -s --config=clang //...

bazel-repro's People

Contributors

zmarcantel avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.