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

[email protected] #1640

Merged
merged 1 commit into from
Apr 5, 2024
Merged
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
73 changes: 73 additions & 0 deletions modules/flatbuffers/24.3.7/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
module(
name = "flatbuffers",
version = "24.3.7",
compatibility_level = 1,
repo_name = "com_github_google_flatbuffers",
)

bazel_dep(
name = "aspect_bazel_lib",
version = "1.40.0",
)
bazel_dep(
name = "aspect_rules_esbuild",
version = "0.15.0",
)
bazel_dep(
name = "aspect_rules_js",
version = "1.34.1",
)
bazel_dep(
name = "aspect_rules_ts",
version = "1.4.5",
)
bazel_dep(
name = "grpc",
version = "1.48.1",
repo_name = "com_github_grpc_grpc",
)
bazel_dep(
name = "platforms",
version = "0.0.7",
)
bazel_dep(
name = "rules_cc",
version = "0.0.9",
)
bazel_dep(
name = "rules_go",
version = "0.41.0",
repo_name = "io_bazel_rules_go",
)
bazel_dep(
name = "rules_nodejs",
version = "5.8.3",
)
bazel_dep(
name = "rules_swift",
version = "1.2.0",
repo_name = "build_bazel_rules_swift",
)
# -- bazel_dep definitions -- #

npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm")
npm.npm_translate_lock(
name = "npm",
npmrc = "//:.npmrc",
pnpm_lock = "//:pnpm-lock.yaml",
verify_node_modules_ignored = "//:.bazelignore",
)
use_repo(npm, "npm")

node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node")
use_repo(node, "nodejs_linux_amd64")

rules_ts_ext = use_extension("@aspect_rules_ts//ts:extensions.bzl", "ext", dev_dependency = True)
rules_ts_ext.deps()
use_repo(rules_ts_ext, "npm_typescript")

non_module_dependencies = use_extension("//:extensions.bzl", "non_module_dependencies", dev_dependency = True)
use_repo(
non_module_dependencies,
mmorel-35 marked this conversation as resolved.
Show resolved Hide resolved
"bazel_linux_x86_64",
)
22 changes: 22 additions & 0 deletions modules/flatbuffers/24.3.7/patches/extensions_dot_bzl.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/extensions.bzl b/extensions.bzl
new file mode 100644
index 00000000..6805b9d8
--- /dev/null
+++ b/extensions.bzl
@@ -0,0 +1,16 @@
+load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")
+
+def _non_module_dependencies_impl(_ctx):
+ http_file(
+ name = "bazel_linux_x86_64",
+ downloaded_file_path = "bazel",
+ executable = True,
+ sha256 = "e78fc3394deae5408d6f49a15c7b1e615901969ecf6e50d55ef899996b0b8458",
+ urls = [
+ "https://github.com/bazelbuild/bazel/releases/download/6.3.2/bazel-6.3.2-linux-x86_64",
+ ],
+ )
+
+non_module_dependencies = module_extension(
+ implementation = _non_module_dependencies_impl,
+)
76 changes: 76 additions & 0 deletions modules/flatbuffers/24.3.7/patches/module_dot_bazel.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
--- a/MODULE.bazel
+++ a/MODULE.bazel
@@ -0,0 +1,73 @@
+module(
+ name = "flatbuffers",
+ version = "24.3.7",
+ compatibility_level = 1,
+ repo_name = "com_github_google_flatbuffers",
+)
+
+bazel_dep(
+ name = "aspect_bazel_lib",
+ version = "1.40.0",
+)
+bazel_dep(
+ name = "aspect_rules_esbuild",
+ version = "0.15.0",
+)
+bazel_dep(
+ name = "aspect_rules_js",
+ version = "1.34.1",
+)
+bazel_dep(
+ name = "aspect_rules_ts",
+ version = "1.4.5",
+)
+bazel_dep(
+ name = "grpc",
+ version = "1.48.1",
+ repo_name = "com_github_grpc_grpc",
+)
+bazel_dep(
+ name = "platforms",
+ version = "0.0.7",
+)
+bazel_dep(
+ name = "rules_cc",
+ version = "0.0.9",
+)
+bazel_dep(
+ name = "rules_go",
+ version = "0.41.0",
+ repo_name = "io_bazel_rules_go",
+)
+bazel_dep(
+ name = "rules_nodejs",
+ version = "5.8.3",
+)
+bazel_dep(
+ name = "rules_swift",
+ version = "1.2.0",
+ repo_name = "build_bazel_rules_swift",
+)
+# -- bazel_dep definitions -- #
+
+npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm")
+npm.npm_translate_lock(
+ name = "npm",
+ npmrc = "//:.npmrc",
+ pnpm_lock = "//:pnpm-lock.yaml",
+ verify_node_modules_ignored = "//:.bazelignore",
+)
+use_repo(npm, "npm")
+
+node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node")
+use_repo(node, "nodejs_linux_amd64")
+
+rules_ts_ext = use_extension("@aspect_rules_ts//ts:extensions.bzl", "ext", dev_dependency = True)
+rules_ts_ext.deps()
+use_repo(rules_ts_ext, "npm_typescript")
+
+non_module_dependencies = use_extension("//:extensions.bzl", "non_module_dependencies", dev_dependency = True)
+use_repo(
+ non_module_dependencies,
+ "bazel_linux_x86_64",
+)
39 changes: 39 additions & 0 deletions modules/flatbuffers/24.3.7/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
matrix:
bazel:
- 6.x
- 7.x
tasks:
ubuntu1804_test:
bazel: ${{ bazel }}
platform: ubuntu1804
environment:
CC: clang
SWIFT_VERSION: "5.5.3"
SWIFT_HOME: "$HOME/swift-$SWIFT_VERSION"
PATH: "$PATH:$SWIFT_HOME/usr/bin"
shell_commands:
- "echo --- Downloading and extracting Swift $SWIFT_VERSION to $SWIFT_HOME"
- "mkdir $SWIFT_HOME"
- "curl https://download.swift.org/swift-${SWIFT_VERSION}-release/ubuntu1804/swift-${SWIFT_VERSION}-RELEASE/swift-${SWIFT_VERSION}-RELEASE-ubuntu18.04.tar.gz | tar xvz --strip-components=1 -C $SWIFT_HOME"
build_targets:
- "@flatbuffers//:*"
ubuntu2004_test:
bazel: ${{ bazel }}
platform: ubuntu2004
environment:
CC: clang
SWIFT_VERSION: "5.5.3"
SWIFT_HOME: "$HOME/swift-$SWIFT_VERSION"
PATH: "$PATH:$SWIFT_HOME/usr/bin"
shell_commands:
- "echo --- Downloading and extracting Swift $SWIFT_VERSION to $SWIFT_HOME"
- "mkdir $SWIFT_HOME"
- "curl https://download.swift.org/swift-${SWIFT_VERSION}-release/ubuntu2004/swift-${SWIFT_VERSION}-RELEASE/swift-${SWIFT_VERSION}-RELEASE-ubuntu20.04.tar.gz | tar xvz --strip-components=1 -C $SWIFT_HOME"
build_targets:
- "@flatbuffers//:*"
macos_test:
bazel: ${{ bazel }}
platform: macos
build_targets:
- "@flatbuffers//:*"
10 changes: 10 additions & 0 deletions modules/flatbuffers/24.3.7/source.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"url": "https://github.com/google/flatbuffers/archive/refs/tags/v24.3.7.tar.gz",
"integrity": "sha256-v/+dIVD8/4j4ROjGCLArKg6UySrqObBMBiR4NGQwR4Q=",
"strip_prefix": "flatbuffers-24.3.7",
"patches": {
"extensions_dot_bzl.patch": "sha256-JwLc+G7gQu2A+xJVjxwCDX8BwJdyspLLeVpnoklWYdM=",
"module_dot_bazel.patch": "sha256-VSnh2bAiXZYOqQ+QLXePEL85j0S9Lmm6kWxuq+uYOSI="
},
"patch_strip": 1
}
16 changes: 16 additions & 0 deletions modules/flatbuffers/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"homepage": "https://github.com/google/flatbuffers",
"maintainers": [
{
"email": "[email protected]",
"name": "No Maintainer Specified"
}
],
"repository": [
"github:google/flatbuffers"
],
"versions": [
"24.3.7"
],
"yanked_versions": {}
}
Loading