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

Update README.md for Bzlmod instructions #818

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,22 @@ Run `swift build` in the root directory of this project.

### Bazel

Add the following to your `WORKSPACE` file:
If you are using Bzlmod with Bazel 6 or later, add the following to your `MODULE.bazel` file:

```python
SOURCEKITTEN_VERSION = "SOME_VERSION"
SOURCEKITTEN_SHA = "SOME_SHA"
bazel_dep(name = "sourcekitten", version = "0.36.0")
```

Otherwise, add the following to your `WORKSPACE` file:

```python
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "com_github_jpsim_sourcekitten",
url = "https://github.com/jpsim/SourceKitten/archive/refs/tags/%s.tar.gz" % (SOURCEKITTEN_VERSION),
sha256 = SOURCEKITTEN_SHA,
strip_prefix = "SourceKitten-%s" % SOURCEKITTEN_VERSION
sha256 = "932e05ee380d801189511aedd606e9c153e76d7774ab34185cc046c217ed5fc3",
strip_prefix = "SourceKitten-0.36.0",
url = "https://github.com/jpsim/SourceKitten/releases/download/0.36.0/SourceKitten-0.36.0.tar.gz",
)
```

Expand Down