bazelbuild/rules_cc

There should be periodic named releases.

aiuto opened this issue · 17 comments

aiuto commented

If there is no guidance about what commits are considered "good" (for various values of good), people will just use head. If people do that, debugging version skew problems is infeasible.

olekw commented

I'll also need an actual release to package properly for Debian. Is that feasible in the near-term? cc:@meteorcloudy

/cc @oquenchil Can we make a release for rules_cc?

aiuto commented

FWIW: After bazelbuild/bazel#12743 is merged, you should be able to update bazel to the new rules_cc with a 3 line change, single file change.

@aiuto That's not what we are looking for. We want to package rules_cc into Debian, so that Bazel doesn't have to download it from internet at all. To do that, we need a release for this project.

aiuto commented

@oquenchil @philwo

Ah.... I see a terminology difference. When we (Bazel) says release, we mean a versioned distribution archive that could be hosted on github. To you, that means a .deb package.

My concern was only about getting named versions to replace github hashes.
Getting from that to a .deb file in the right place will require answering some questions. Between us, I think we can come up with the answers. What we do for this will set a pattern/expectation for other rule sets to follow, so @philwo may want to chime in.

Questions and thoughts:

  • rules_pkg has .deb file building tools. We can add to that as needed.
  • Should the distribution be just source (essentially, all the files)?
  • Should we also have a binary distribution that excludes examples and tests?
  • Users will often need two versions installed at the same time when they are transitioning bazel versions.
    • install to /usr/share/bazelbuild/rules_cc/VERSION/...
    • in WORKSPACE
    local_repository(name="rules_cc", path="/usr/share/bazelbuild/rules_cc/VERSION/")
    
  • How do we get from bazel build //distro:rules_cc.deb to the Debian repository?
    • Should rules_pkg have scripts which aid in this?
    • Do we have to sign them? will someone need a secure pipeline for signing them?
    • Is it sufficient for the Bazel team to create the .deb file at the same time they do the versioned .tar file?

Ah.... I see a terminology difference. When we (Bazel) says release, we mean a versioned distribution archive that could be hosted on github. To you, that means a .deb package.

No, what we want are the same, we also just need a versioned distribution archive, which is not available right now. @olekw will kindly help us create the deb package and get it into the Debian distribution.

The deb package will essentially only contains Bazel files. It would great if we can exclude unnecessary file in the release archive.

I will create the release for rules_cc on GitHub, I was a bit hesitant because we deem rules_cc a mistake and we shouldn't have created it before finishing starlarkifying the rules. We don't plan on deleting the repository now because that would be a lot of hard work but we hope to spend as little time on the repo as possible in the short term.

I will document that the release is not part of an official process, there is no guaranteed release cycle and it just exists to support Debian packaging. I will name the first release 0.1.

olekw commented

@oquenchil That would be great! Any progress on that?

olekw commented

To clarify, we don't need a "binary" release to package this in Debian. We just need a source release since we build everything from source anyway. So just a "0.1.0" release tag would suffice for our purposes.

olekw commented

On a loosely-related question, what's the long-term plan, @oquenchil? Are you planning to refactor the code for rules_cc or just integrate that functionality directly into core Bazel?

I was a bit hesitant because we deem rules_cc a mistake and we shouldn't have created it before finishing starlarkifying the rules.

Do you know when the new starlark rules will be released? And will they replace the contents of this repository, or be uploaded elsewhere?

I'd recommend to just start doing releases here as @oquenchil said with 0.x - this tells the user that there's no promise of any compatibility between the versions.

I will take care of it next week.

@philwo could it be possible to have https://github.com/bazelbuild/rules_cc/releases/download/0.0.1/rules_cc-0.0.1.tar.gz also in the bazel mirror? Thanks

@limdor Uploaded!

Looks like this issue can be closed, thanks for the effort!