Skip to content
Open
Show file tree
Hide file tree
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
43 changes: 1 addition & 42 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,6 @@ x_defaults:
- "//tools/..."

tasks:
macos_7:
name: "Previous LTS with no bzlmod"
bazel: 7.x
build_flags:
- "--noenable_bzlmod"
- "--enable_workspace"
<<: *mac_common

macos_latest:
name: "Current LTS"
bazel: latest
Expand All @@ -71,27 +63,6 @@ tasks:
bazel: last_green
<<: *mac_common

macos_latest_head_deps:
name: "Current LTS with Head Deps"
bazel: latest
shell_commands:
# Update the WORKSPACE to use head versions of some deps to ensure nothing
# has landed on them breaking this project.
- .bazelci/update_workspace_to_deps_heads.sh
<<: *mac_common

ubuntu2204_7:
name: "Previous LTS with no bzlmod"
bazel: 7.x
shell_commands:
- "echo --- Downloading and extracting Swift $SWIFT_VERSION to $SWIFT_HOME"
- "mkdir $SWIFT_HOME"
- "curl https://download.swift.org/swift-${SWIFT_VERSION}-release/ubuntu2204/swift-${SWIFT_VERSION}-RELEASE/swift-${SWIFT_VERSION}-RELEASE-ubuntu22.04.tar.gz | tar xvz --strip-components=1 -C $SWIFT_HOME"
build_flags:
- "--noenable_bzlmod"
- "--enable_workspace"
<<: *linux_common

ubuntu2204_latest:
name: "Current LTS"
bazel: latest
Expand Down Expand Up @@ -119,18 +90,6 @@ tasks:
- "curl https://download.swift.org/swift-${SWIFT_VERSION}-release/ubuntu2204/swift-${SWIFT_VERSION}-RELEASE/swift-${SWIFT_VERSION}-RELEASE-ubuntu22.04.tar.gz | tar xvz --strip-components=1 -C $SWIFT_HOME"
<<: *linux_common

ubuntu2204_latest_head_deps:
name: "Current LTS with Head Deps"
bazel: latest
shell_commands:
- "echo --- Downloading and extracting Swift $SWIFT_VERSION to $SWIFT_HOME"
- "mkdir $SWIFT_HOME"
- "curl https://download.swift.org/swift-${SWIFT_VERSION}-release/ubuntu2204/swift-${SWIFT_VERSION}-RELEASE/swift-${SWIFT_VERSION}-RELEASE-ubuntu22.04.tar.gz | tar xvz --strip-components=1 -C $SWIFT_HOME"
# Update the WORKSPACE to use head versions of some deps to ensure nothing
# has landed on them breaking this project.
- .bazelci/update_workspace_to_deps_heads.sh
<<: *linux_common

# TODO: re-enable when Windows in Bazel CI is properly configured for Swift.
# windows_last_green:
# name: "Last Green Bazel"
Expand All @@ -146,6 +105,6 @@ tasks:
- "mkdir $SWIFT_HOME"
- "curl https://download.swift.org/swift-${SWIFT_VERSION}-release/ubuntu2204/swift-${SWIFT_VERSION}-RELEASE/swift-${SWIFT_VERSION}-RELEASE-ubuntu22.04.tar.gz | tar xvz --strip-components=1 -C $SWIFT_HOME"
test_targets:
- "doc/..."
- "doc/..."

buildifier: 8.2.1
45 changes: 0 additions & 45 deletions .bazelci/update_workspace_to_deps_heads.sh

This file was deleted.

29 changes: 0 additions & 29 deletions .github/generate-notes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
set -euo pipefail

readonly new_version=$1
readonly release_archive="rules_swift.$new_version.tar.gz"

sha=$(shasum -a 256 "$release_archive" | cut -d " " -f1)

cat <<EOF
## What's Changed
Expand All @@ -19,30 +16,4 @@ This release is compatible with: TODO
\`\`\`bzl
bazel_dep(name = "rules_swift", version = "$new_version", repo_name = "build_bazel_rules_swift")
\`\`\`

## Workspace Snippet

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

http_archive(
name = "build_bazel_rules_swift",
sha256 = "$sha",
url = "https://github.com/bazelbuild/rules_swift/releases/download/$new_version/rules_swift.$new_version.tar.gz",
)

load(
"@build_bazel_rules_swift//swift:repositories.bzl",
"swift_rules_dependencies",
)

swift_rules_dependencies()

load(
"@build_bazel_rules_swift//swift:extras.bzl",
"swift_rules_extra_dependencies",
)

swift_rules_extra_dependencies()
\`\`\`
EOF
1 change: 0 additions & 1 deletion BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ filegroup(
name = "for_bazel_tests",
testonly = True,
srcs = [
"WORKSPACE",
"//swift:for_bazel_tests",
"//third_party:for_bazel_tests",
"//tools:for_bazel_tests",
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ also ensure that the Swift compiler is available on your system path.

### 2. Configure your workspace

Copy the `WORKSPACE` snippet from [the releases
page](https://github.com/bazelbuild/rules_swift/releases).
Copy the `MODULE.bazel` snippet from [the releases page](https://github.com/bazelbuild/rules_swift/releases).

### 3. Additional configuration (Linux only)

Expand Down
95 changes: 0 additions & 95 deletions WORKSPACE

This file was deleted.

Empty file removed WORKSPACE.bzlmod
Empty file.
23 changes: 3 additions & 20 deletions doc/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,6 @@ write_file(
],
)

write_file(
name = "setup_header",
out = "setup_header.vm",
content = [
"<!-- Generated with Stardoc, Do Not Edit! -->",
"# Workspace Setup",
],
)

[
stardoc(
name = file + "_doc",
Expand All @@ -116,14 +107,6 @@ write_file(
] in _DOC_SRCS.items()
]

stardoc(
name = "setup_doc",
out = "setup.md_",
header_template = "setup_header.vm",
input = "//swift:repositories.bzl",
deps = ["//swift:repositories"],
)

# To make these tests pass, run
# bazel run //doc:update
[
Expand All @@ -132,7 +115,7 @@ stardoc(
file1 = file + ".md_",
file2 = file + ".md",
)
for file in _DOC_SRCS.keys() + ["setup"]
for file in _DOC_SRCS.keys()
]

write_file(
Expand All @@ -145,14 +128,14 @@ write_file(
"cp -fv bazel-bin/doc/{0}.md_ doc/{0}.md".format(
file,
)
for file in _DOC_SRCS.keys() + ["setup"]
for file in _DOC_SRCS.keys()
],
)

sh_binary(
name = "update",
srcs = ["update.sh"],
data = [file + ".md_" for file in _DOC_SRCS.keys() + ["setup"]],
data = [file + ".md_" for file in _DOC_SRCS.keys()],
)

gazelle(
Expand Down
1 change: 0 additions & 1 deletion doc/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Documentation

* [WORKSPACE setup](setup.md#swift_rules_dependencies)
* [Rules](rules.md)
* [Providers](providers.md)
* [API](api.md)
25 changes: 0 additions & 25 deletions doc/setup.md

This file was deleted.

9 changes: 0 additions & 9 deletions swift/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,6 @@ bzl_library(
deps = [":repositories"],
)

bzl_library(
name = "extras",
srcs = ["extras.bzl"],
deps = [
"@bazel_features//:deps",
"@build_bazel_apple_support//lib:repositories",
],
)

bzl_library(
name = "repositories",
srcs = ["repositories.bzl"],
Expand Down
4 changes: 2 additions & 2 deletions swift/extensions.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
"""Definitions for bzlmod module extensions."""

load("@bazel_features//:features.bzl", "bazel_features")
load("//swift:repositories.bzl", "swift_rules_dependencies")
load("//swift/internal:repositories.bzl", "swift_rules_dependencies")

def _non_module_deps_impl(module_ctx):
swift_rules_dependencies(include_bzlmod_ready_dependencies = False)
swift_rules_dependencies()

metadata_kwargs = {}
if bazel_features.external_deps.extension_metadata_has_reproducible:
Expand Down
Loading