sourcegraph / src-cli

Sourcegraph CLI
https://sourcegraph.com
Apache License 2.0
267 stars 57 forks source link

chore: remove bazel #1042

Open jhchabran opened 9 months ago

jhchabran commented 9 months ago

Bazel was initially added here as a convenience for using this from the monorepo, but ultimately, we don't use it at all. And as this repo is merely a simple Go codebase with nothing fancy or slow tests, it's not that a good case for Bazel. Finally, we're not using it in CI either, it's GHA, so it has a tendency to drift.

Fixes https://github.com/sourcegraph/devx-support/issues/228

Test plan

CI

jhchabran commented 9 months ago

@keegancsmith I'm having second thoughts when I read this. It's tempting me to switch this to use oci_rules and to have a repo that we can build and test like everything else.

CleanShot 2023-10-06 at 14 51 53@2x
keegancsmith commented 9 months ago

Those instructions are kinda weird TBH. I don't know much about how this repo works, but I do know that bazel is broken in it and that creating go binaries that work in scratch is easy.

jhchabran commented 9 months ago

Those instructions are kinda weird TBH. I don't know much about how this repo works, but I do know that Bazel is broken in it and that creating go binaries that work in scratch is easy.

It depends on what we're trying to do, if we don't care about the docker images, it's sensible to not bother with Bazel for the reasons you mentioned. But if we do, I'd instead build them with Bazel and be able to test those locally rather than do convoluted things as we do here.

I'll dig around and if we want to go for this, I'll fix the Bazel builds and make it work in CI as intended. Might be a good opportunity to get rid of goreleaser as well.

@eseliger any thoughts here?