Skip to content

Commit 26316d6

Browse files
authored
chore: rename repository to rules_swift_package_manager (#328)
Closes #320.
1 parent 4516eec commit 26316d6

File tree

168 files changed

+318
-318
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

168 files changed

+318
-318
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,12 @@ jobs:
104104
- uses: ./.github/actions/set_up_ubuntu
105105
if: ${{ startsWith(matrix.runner, 'ubuntu') }}
106106
with:
107-
repo_name: swift_bazel
107+
repo_name: rules_swift_package_manager
108108
ubuntu_version: "22.04"
109109
- uses: ./.github/actions/set_up_macos
110110
if: ${{ startsWith(matrix.runner, 'macos') }}
111111
with:
112-
repo_name: swift_bazel
112+
repo_name: rules_swift_package_manager
113113
xcode_version: 14.0.1
114114
- uses: ./.github/actions/execute_test
115115
with:
@@ -133,12 +133,12 @@ jobs:
133133
- uses: ./.github/actions/set_up_ubuntu
134134
if: ${{ startsWith(matrix.runner, 'ubuntu') }}
135135
with:
136-
repo_name: swift_bazel
136+
repo_name: rules_swift_package_manager
137137
ubuntu_version: "22.04"
138138
- uses: ./.github/actions/set_up_macos
139139
if: ${{ startsWith(matrix.runner, 'macos') }}
140140
with:
141-
repo_name: swift_bazel
141+
repo_name: rules_swift_package_manager
142142
xcode_version: 14.0.1
143143
- uses: ./.github/actions/configure_bzlmod
144144
with:

BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ gazelle_binary(
6969
],
7070
)
7171

72-
# gazelle:prefix github.com/cgrindel/swift_bazel
72+
# gazelle:prefix github.com/cgrindel/rules_swift_package_manager
7373
# gazelle:go_naming_convention import
7474
gazelle(
7575
name = "update_build_files",

MODULE.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module(
2-
name = "cgrindel_swift_bazel",
2+
name = "rules_swift_package_manager",
33
version = "0.0.0",
44
)
55

@@ -16,7 +16,7 @@ bazel_dep(name = "rules_cc", version = "0.0.6")
1616
bazel_dep(name = "platforms", version = "0.0.6")
1717

1818
# With bzlmod enabled, any dependencies for repositories generated by
19-
# swift_bazel _must_ be a runtime dependency of swift_bazel.
19+
# rules_swift_package_manager _must_ be a runtime dependency of rules_swift_package_manager.
2020
bazel_dep(
2121
name = "rules_swift",
2222
version = "1.6.0",

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Gazelle Plugin for Swift and Swift Package Rules for Bazel
22

3-
[![Build](https://github.com/cgrindel/swift_bazel/actions/workflows/ci.yml/badge.svg?event=schedule)](https://github.com/cgrindel/swift_bazel/actions/workflows/ci.yml)
3+
[![Build](https://github.com/cgrindel/rules_swift_package_manager/actions/workflows/ci.yml/badge.svg?event=schedule)](https://github.com/cgrindel/rules_swift_package_manager/actions/workflows/ci.yml)
44

55
This repository contains a [Gazelle plugin] and Bazel repository rules that can be used to download,
66
build, and consume Swift packages. The rules in this repository build the external Swift packages
@@ -18,7 +18,7 @@ development inside a Bazel workspace.
1818
* [Mac OS](#mac-os)
1919
* [Linux](#linux)
2020
* [Quickstart](#quickstart)
21-
* [1\. Configure your workspace to use <a href="https://github\.com/cgrindel/swift\_bazel">swift\_bazel</a>\.](#1-configure-your-workspace-to-use-swift_bazel)
21+
* [1\. Configure your workspace to use <a href="https://github\.com/cgrindel/rules\_swift\_package\_manager">rules\_swift\_package\_manager</a>\.](#1-configure-your-workspace-to-use-rules_swift_package_manager)
2222
* [2\. Create a minimal Package\.swift file\.](#2-create-a-minimal-packageswift-file)
2323
* [3\. Add Gazelle targets to BUILD\.bazel at the root of your workspace\.](#3-add-gazelle-targets-to-buildbazel-at-the-root-of-your-workspace)
2424
* [4\. Resolve the external dependencies for your project\.](#4-resolve-the-external-dependencies-for-your-project)
@@ -50,7 +50,7 @@ Don't forget that `rules_swift` [expects the use of
5050
`clang`](https://github.com/bazelbuild/rules_swift#3-additional-configuration-linux-only). Hence,
5151
you will need to specify `CC=clang` before running Bazel.
5252

53-
Finally, help [rules_swift] and [swift_bazel] find the Swift toolchain by ensuring that a `PATH`
53+
Finally, help [rules_swift] and [rules_swift_package_manager] find the Swift toolchain by ensuring that a `PATH`
5454
that includes the Swift binary is available in the Bazel actions.
5555

5656
```sh
@@ -68,23 +68,23 @@ actions. See the [CI GitHub workflow] for more details.
6868
The following provides a quick introduction on how to set up and use the features in this
6969
repository. Also, check out the [examples] for more information.
7070

71-
### 1. Configure your workspace to use [swift_bazel].
71+
### 1. Configure your workspace to use [rules_swift_package_manager].
7272

73-
Update the `WORKSPACE` file to load the dependencies for [swift_bazel], [rules_swift] and [Gazelle].
73+
Update the `WORKSPACE` file to load the dependencies for [rules_swift_package_manager], [rules_swift] and [Gazelle].
7474

7575
<!-- BEGIN WORKSPACE SNIPPET -->
7676
```python
7777
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
7878

7979
http_archive(
80-
name = "cgrindel_swift_bazel",
80+
name = "rules_swift_package_manager",
8181
sha256 = "40bf17727804121e54e470e464fb9fd85d6cd3d71007139c33bf1f37675b7fad",
8282
urls = [
83-
"https://github.com/cgrindel/swift_bazel/releases/download/v0.3.3/swift_bazel.v0.3.3.tar.gz",
83+
"https://github.com/cgrindel/rules_swift_package_manager/releases/download/v0.3.3/rules_swift_package_manager.v0.3.3.tar.gz",
8484
],
8585
)
8686

87-
load("@cgrindel_swift_bazel//:deps.bzl", "swift_bazel_dependencies")
87+
load("@rules_swift_package_manager//:deps.bzl", "swift_bazel_dependencies")
8888

8989
swift_bazel_dependencies()
9090

@@ -97,7 +97,7 @@ bazel_starlib_dependencies()
9797
# gazelle:repo bazel_gazelle
9898

9999
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")
100-
load("@cgrindel_swift_bazel//:go_deps.bzl", "swift_bazel_go_dependencies")
100+
load("@rules_swift_package_manager//:go_deps.bzl", "swift_bazel_go_dependencies")
101101
load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")
102102

103103
# Declare Go dependencies before calling go_rules_dependencies.
@@ -167,7 +167,7 @@ let package = Package(
167167
```
168168

169169
The name of the package can be whatever you like. It is required for the manifest, but it is not
170-
used by [swift_bazel]. If your proejct is published and consumed as a Swift package, feel free to
170+
used by [rules_swift_package_manager]. If your proejct is published and consumed as a Swift package, feel free to
171171
populate the rest of the manifest so that your package works properly by Swift package manager. Just
172172
note that the Swift Gazelle plugin does not use the manifest to generate Bazel build files, at this
173173
time.
@@ -178,7 +178,7 @@ Add the following to the `BUILD.bazel` file at the root of your workspace.
178178

179179
```python
180180
load("@bazel_gazelle//:def.bzl", "gazelle", "gazelle_binary")
181-
load("@cgrindel_swift_bazel//swiftpkg:defs.bzl", "swift_update_packages")
181+
load("@rules_swift_package_manager//swiftpkg:defs.bzl", "swift_update_packages")
182182

183183
# Ignore the `.build` folder that is created by running Swift package manager
184184
# commands. The Swift Gazelle plugin executes some Swift package manager
@@ -191,11 +191,11 @@ load("@cgrindel_swift_bazel//swiftpkg:defs.bzl", "swift_update_packages")
191191

192192
# This declaration builds a Gazelle binary that incorporates all of the Gazelle
193193
# plugins for the languages that you use in your workspace. In this example, we
194-
# are only listing the Gazelle plugin for Swift from cgrindel_swift_bazel.
194+
# are only listing the Gazelle plugin for Swift from rules_swift_package_manager.
195195
gazelle_binary(
196196
name = "gazelle_bin",
197197
languages = [
198-
"@cgrindel_swift_bazel//gazelle",
198+
"@rules_swift_package_manager//gazelle",
199199
],
200200
)
201201

@@ -295,5 +295,5 @@ The following are a few tips to consider as you work with your repository:
295295
[examples]: examples/
296296
[rules_spm]: https://github.com/cgrindel/rules_spm
297297
[rules_swift]: https://github.com/bazelbuild/rules_swift
298-
[swift_bazel]: https://github.com/cgrindel/swift_bazel
298+
[rules_swift_package_manager]: https://github.com/cgrindel/rules_swift_package_manager
299299
[tidy]: https://github.com/cgrindel/bazel-starlib/blob/main/doc/bzltidy/rules_and_macros_overview.md#tidy

WORKSPACE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
workspace(name = "cgrindel_swift_bazel")
1+
workspace(name = "rules_swift_package_manager")
22

33
load("//:deps.bzl", "swift_bazel_dependencies")
44

bzlmod/workspace/BUILD.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ load("@bazel_gazelle//:def.bzl", "gazelle", "gazelle_binary")
22
load("@cgrindel_bazel_starlib//bzlformat:defs.bzl", "bzlformat_pkg")
33
load("@cgrindel_bazel_starlib//bzltidy:defs.bzl", "tidy")
44
load("@cgrindel_bazel_starlib//updatesrc:defs.bzl", "updatesrc_update_all")
5-
load("@cgrindel_swift_bazel//swiftpkg:defs.bzl", "swift_update_packages")
5+
load("@rules_swift_package_manager//swiftpkg:defs.bzl", "swift_update_packages")
66

77
# MARK: - Tidy / Update Source Files
88

@@ -26,7 +26,7 @@ gazelle_binary(
2626
name = "gazelle_bin",
2727
languages = [
2828
"@bazel_skylib_gazelle_plugin//bzl",
29-
"@cgrindel_swift_bazel//gazelle",
29+
"@rules_swift_package_manager//gazelle",
3030
],
3131
)
3232

bzlmod/workspace/MODULE.bazel

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
bazel_dep(
2-
name = "cgrindel_swift_bazel",
2+
name = "rules_swift_package_manager",
33
version = "0.0.0",
44
)
55
local_path_override(
6-
module_name = "cgrindel_swift_bazel",
6+
module_name = "rules_swift_package_manager",
77
path = "../..",
88
)
99

@@ -29,7 +29,7 @@ bazel_dep(
2929

3030
# swift_deps START
3131
swift_deps = use_extension(
32-
"@cgrindel_swift_bazel//:extensions.bzl",
32+
"@rules_swift_package_manager//:extensions.bzl",
3333
"swift_deps",
3434
)
3535
swift_deps.from_file(

config_settings/spm/configuration/configurations.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def _label(name):
99
Returns:
1010
The condition label as a `string`.
1111
"""
12-
return "@cgrindel_swift_bazel//config_settings/spm/configuration:{}".format(name)
12+
return "@rules_swift_package_manager//config_settings/spm/configuration:{}".format(name)
1313

1414
# Derived from BuildConfiguration values
1515
# https://github.com/apple/swift-package-manager/blob/main/Sources/PackageDescription/BuildSettings.swift

config_settings/spm/platform/platforms.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def _label(name):
6464
"""
6565
if name == "maccatalyst":
6666
name = "macos"
67-
return "@cgrindel_swift_bazel//config_settings/spm/platform:{}".format(name)
67+
return "@rules_swift_package_manager//config_settings/spm/platform:{}".format(name)
6868

6969
platforms = struct(
7070
macos = "macos",

config_settings/spm/platform_configuration/platform_configurations.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def _label(platform, configuration):
2727
"""
2828
name = _new_name(platform, configuration)
2929
return """\
30-
@cgrindel_swift_bazel//config_settings/spm/platform_configuration:{}\
30+
@rules_swift_package_manager//config_settings/spm/platform_configuration:{}\
3131
""".format(name)
3232

3333
_ALL_VALUES = [

0 commit comments

Comments
 (0)