Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency on rules_cc requires a git_archive which is difficulty with Bazel offline #2397

Closed
mescanne opened this issue Mar 9, 2020 · 3 comments

Comments

@mescanne
Copy link

mescanne commented Mar 9, 2020

Overview

In a controlled (to the internet) environment using distdir and http_archive is important to be able to cache locally all dependencies. git_archive is incompatible with this.

Due to rules_cc not having any official releases yet, there are no archives to download. There is no easy mitigation to this in the enterprise (controlled) context.

What version of rules_go are you using?

0.22.1

What version of gazelle are you using?

Not relevant

What version of Bazel are you using?

2.2.0

Does this issue reproduce with the latest releases of all the above?

It applies only to the later releases which started using rules_cc.

What operating system and processor architecture are you using?

Not relevant.

What did you expect to see?

Ability to package an archive into distdir for offline use.

What did you see instead?

No easy solution to enable a single WORKSPACE for the casual (internet-connected) developer and the build environment that is tightly controlled. I will be able to find one, but it will be a terrible hack that should not be needed.

@jayconrod
Copy link
Contributor

This isn't actionable at the moment because there's no rules_cc release. Maybe file an issue with the rules_cc project?

rules_cc is a hard requirement. The native cc_library and cc_binary rules are being deprecated. rules_go will fail tests in Bazel CI if we use those instead of rules_cc (#2318).

As a workaround, you can declare your own version of the rules_cc repository before calling go_rules_dependencies. See Overriding dependencies.

@mescanne
Copy link
Author

If rules_cc is a hard requirement, then there needs to be a release of rules_cc.

I did do an override, but that means either I need to create my own archived copy and host it somewhere or mirror my own tree of rules_cc. Neither one is appealing when we're not doing this for anything else and it's just a temporary measure.

I'll file an issue with rules_cc.

@mescanne
Copy link
Author

FYI - bazelbuild/rules_cc#68

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants