-
Notifications
You must be signed in to change notification settings - Fork 340
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
Add [email protected] #2523
base: main
Are you sure you want to change the base?
Add [email protected] #2523
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module( | ||
name = "go-duckdb", | ||
version = "1.7.0", | ||
) | ||
|
||
bazel_dep(name = "gazelle", version = "0.36.0") | ||
bazel_dep(name = "rules_go", version = "0.48.0") | ||
|
||
go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps") | ||
go_deps.from_file(go_mod = "//:go.mod") | ||
use_repo( | ||
go_deps, | ||
) |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. did you mean to include this file? there's no There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, it's a transitive dependency of
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, I see. You need to translate this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm out of my depth here. I didn't write the patch, we engaged @pcj to get the fix running internally, and I opened this to try and make it publicly available. I can follow some explicit instructions, but that's about it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @derekperkins You would have to turn github.com/apache/arrow/go/v14 into a Bazel module in the same way as There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll probably just wait for that gazelle support to land. Not sure if you'd prefer that this PR is closed in the meantime, but I'm open to whatever |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- a/arrow/cdata/BUILD.bazel | ||
+++ b/arrow/cdata/BUILD.bazel | ||
@@ -1,4 +1,4 @@ | ||
-load("@io_bazel_rules_go//go:def.bzl", "go_library") | ||
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_source") | ||
|
||
go_library( | ||
name = "cdata", | ||
@@ -8,6 +8,7 @@ go_library( | ||
"exports.go", | ||
"interface.go", | ||
"trampoline.c", | ||
+ ":headers", | ||
], | ||
cgo = True, | ||
importpath = "github.com/apache/arrow/go/v14/arrow/cdata", | ||
@@ -31,3 +32,11 @@ alias( | ||
actual = ":cdata", | ||
visibility = ["//visibility:public"], | ||
) | ||
+ | ||
+go_source( | ||
+ name = "headers", | ||
+ srcs = [ | ||
+ "arrow/c/abi.h", | ||
+ "arrow/c/helpers.h", | ||
+ ], | ||
+) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,166 @@ | ||
diff --git a/BUILD.bazel b/BUILD.bazel | ||
index 8285865..37e192e 100644 | ||
--- a/BUILD.bazel | ||
+++ b/BUILD.bazel | ||
@@ -18,49 +18,83 @@ go_library( | ||
"transaction.go", | ||
"types.go", | ||
], | ||
+ cdeps = select({ | ||
+ "@io_bazel_rules_go//go/platform:android_amd64": [ | ||
+ "//deps/linux_amd64:libduckdb", | ||
+ ], | ||
+ "@io_bazel_rules_go//go/platform:android_arm64": [ | ||
+ "//deps/linux_arm64:libduckdb", | ||
+ ], | ||
+ "@io_bazel_rules_go//go/platform:darwin_386": [ | ||
+ ], | ||
+ "@io_bazel_rules_go//go/platform:darwin_amd64": [ | ||
+ "//deps/darwin_amd64:libduckdb", | ||
+ ], | ||
+ "@io_bazel_rules_go//go/platform:darwin_arm": [ | ||
+ ], | ||
+ "@io_bazel_rules_go//go/platform:darwin_arm64": [ | ||
+ "//deps/darwin_arm64:libduckdb", | ||
+ ], | ||
+ "@io_bazel_rules_go//go/platform:freebsd_amd64": [ | ||
+ "//deps/freebsd_amd64:libduckdb", | ||
+ ], | ||
+ "@io_bazel_rules_go//go/platform:ios_amd64": [ | ||
+ "//deps/darwin_amd64:libduckdb", | ||
+ ], | ||
+ "@io_bazel_rules_go//go/platform:ios_arm64": [ | ||
+ "//deps/darwin_arm64:libduckdb", | ||
+ ], | ||
+ "@io_bazel_rules_go//go/platform:linux_amd64": [ | ||
+ "//deps/linux_amd64:libduckdb", | ||
+ ], | ||
+ "@io_bazel_rules_go//go/platform:linux_arm64": [ | ||
+ "//deps/linux_arm64:libduckdb", | ||
+ ], | ||
+ "//conditions:default": [], | ||
+ }), | ||
cgo = True, | ||
clinkopts = select({ | ||
"@io_bazel_rules_go//go/platform:android_amd64": [ | ||
"-lduckdb", | ||
- "-lstdc++ -lm -ldl -Ldeps/linux_amd64", | ||
+ "-lstdc++ -lm -ldl -Lexternal/com_github_marcboeker_go_duckdb/deps/linux_amd64", | ||
], | ||
"@io_bazel_rules_go//go/platform:android_arm64": [ | ||
"-lduckdb", | ||
- "-lstdc++ -lm -ldl -Ldeps/linux_arm64", | ||
+ "-lstdc++ -lm -ldl -Lexternal/com_github_marcboeker_go_duckdb/deps/linux_arm64", | ||
], | ||
"@io_bazel_rules_go//go/platform:darwin_386": [ | ||
"-lduckdb", | ||
], | ||
"@io_bazel_rules_go//go/platform:darwin_amd64": [ | ||
- "-lc++ -Ldeps/darwin_amd64", | ||
+ "-lc++ -Lexternal/com_github_marcboeker_go_duckdb/deps/darwin_amd64", | ||
"-lduckdb", | ||
], | ||
"@io_bazel_rules_go//go/platform:darwin_arm": [ | ||
"-lduckdb", | ||
], | ||
"@io_bazel_rules_go//go/platform:darwin_arm64": [ | ||
- "-lc++ -Ldeps/darwin_arm64", | ||
+ "-lc++ -Lexternal/com_github_marcboeker_go_duckdb/deps/darwin_arm64", | ||
"-lduckdb", | ||
], | ||
"@io_bazel_rules_go//go/platform:freebsd_amd64": [ | ||
"-lduckdb", | ||
- "-lstdc++ -lm -ldl -Ldeps/freebsd_amd64", | ||
+ "-lstdc++ -lm -ldl -Lexternal/com_github_marcboeker_go_duckdb/deps/freebsd_amd64", | ||
], | ||
"@io_bazel_rules_go//go/platform:ios_amd64": [ | ||
"-lc++ -Ldeps/darwin_amd64", | ||
"-lduckdb", | ||
], | ||
"@io_bazel_rules_go//go/platform:ios_arm64": [ | ||
- "-lc++ -Ldeps/darwin_arm64", | ||
+ "-lc++ -Lexternal/com_github_marcboeker_go_duckdb/deps/darwin_arm64", | ||
"-lduckdb", | ||
], | ||
"@io_bazel_rules_go//go/platform:linux_amd64": [ | ||
"-lduckdb", | ||
- "-lstdc++ -lm -ldl -Ldeps/linux_amd64", | ||
+ "-lstdc++ -lm -ldl -Lexternal/com_github_marcboeker_go_duckdb/deps/linux_amd64", | ||
], | ||
"@io_bazel_rules_go//go/platform:linux_arm64": [ | ||
"-lduckdb", | ||
- "-lstdc++ -lm -ldl -Ldeps/linux_arm64", | ||
+ "-lstdc++ -lm -ldl -Lexternal/com_github_marcboeker_go_duckdb/deps/linux_arm64", | ||
], | ||
"//conditions:default": [], | ||
}), | ||
diff --git a/deps/darwin_amd64/BUILD.bazel b/deps/darwin_amd64/BUILD.bazel | ||
index 471671e..4f508b6 100644 | ||
--- a/deps/darwin_amd64/BUILD.bazel | ||
+++ b/deps/darwin_amd64/BUILD.bazel | ||
@@ -12,3 +12,9 @@ alias( | ||
actual = ":darwin_amd64", | ||
visibility = ["//visibility:public"], | ||
) | ||
+ | ||
+cc_library( | ||
+ name = "libduckdb", | ||
+ srcs = ["libduckdb.a"], | ||
+ visibility = ["//visibility:public"], | ||
+) | ||
diff --git a/deps/darwin_arm64/BUILD.bazel b/deps/darwin_arm64/BUILD.bazel | ||
index edc81b3..848fe8b 100644 | ||
--- a/deps/darwin_arm64/BUILD.bazel | ||
+++ b/deps/darwin_arm64/BUILD.bazel | ||
@@ -12,3 +12,9 @@ alias( | ||
actual = ":darwin_arm64", | ||
visibility = ["//visibility:public"], | ||
) | ||
+ | ||
+cc_library( | ||
+ name = "libduckdb", | ||
+ srcs = ["libduckdb.a"], | ||
+ visibility = ["//visibility:public"], | ||
+) | ||
diff --git a/deps/freebsd_amd64/BUILD.bazel b/deps/freebsd_amd64/BUILD.bazel | ||
index 849a7e3..f347669 100644 | ||
--- a/deps/freebsd_amd64/BUILD.bazel | ||
+++ b/deps/freebsd_amd64/BUILD.bazel | ||
@@ -12,3 +12,9 @@ alias( | ||
actual = ":freebsd_amd64", | ||
visibility = ["//visibility:public"], | ||
) | ||
+ | ||
+cc_library( | ||
+ name = "libduckdb", | ||
+ srcs = ["libduckdb.a"], | ||
+ visibility = ["//visibility:public"], | ||
+) | ||
diff --git a/deps/linux_amd64/BUILD.bazel b/deps/linux_amd64/BUILD.bazel | ||
index 0acbb38..23be608 100644 | ||
--- a/deps/linux_amd64/BUILD.bazel | ||
+++ b/deps/linux_amd64/BUILD.bazel | ||
@@ -12,3 +12,9 @@ alias( | ||
actual = ":linux_amd64", | ||
visibility = ["//visibility:public"], | ||
) | ||
+ | ||
+cc_library( | ||
+ name = "libduckdb", | ||
+ srcs = ["libduckdb.a"], | ||
+ visibility = ["//visibility:public"], | ||
+) | ||
diff --git a/deps/linux_arm64/BUILD.bazel b/deps/linux_arm64/BUILD.bazel | ||
index 64200d5..5c7fba0 100644 | ||
--- a/deps/linux_arm64/BUILD.bazel | ||
+++ b/deps/linux_arm64/BUILD.bazel | ||
@@ -12,3 +12,9 @@ alias( | ||
actual = ":linux_arm64", | ||
visibility = ["//visibility:public"], | ||
) | ||
+ | ||
+cc_library( | ||
+ name = "libduckdb", | ||
+ srcs = ["libduckdb.a"], | ||
+ visibility = ["//visibility:public"], | ||
+) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
matrix: | ||
bazel: | ||
- 7.x | ||
platform: | ||
- centos7 | ||
- debian10 | ||
- ubuntu2004 | ||
- macos | ||
- windows | ||
tasks: | ||
verify_targets: | ||
name: Verify build targets | ||
platform: ${{ platform }} | ||
bazel: ${{ bazel }} | ||
build_targets: | ||
- '@go-duckdb//...' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"url": "https://proxy.golang.org/github.com/marcboeker/go-duckdb/@v/v1.7.0.zip", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Go proxy doesn't promise a stable hash, but neither does GitHub for its There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just copied what was in the circl module. TBH, I didn't even realize the go proxy provided a download option like this |
||
"integrity": "sha256-fo6vo0KV06lzFxoEGR1fN5RBdot9DjiZBuVwrCM4+wI=", | ||
"patches": { | ||
"com_github_apache_arrow_go_v14_arrow_cdata.patch": "sha256-Os1Hr/SizCVduwOmHBjAXh0Zn9ZtmRw1u1fYIE164MY=", | ||
"com_github_marcboeker_go_duckdb.libduckdb.patch": "sha256-0XSMS6xiYibD9lEWui9D5wnYW4G80e0fWfVF5NDNRNk=" | ||
}, | ||
"patch_strip": 1, | ||
"strip_prefix": "github.com/marcboeker/[email protected]" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"homepage": "https://github.com/marcboeker/go-duckdb", | ||
"maintainers": [ | ||
{ | ||
"email": "[email protected]", | ||
"name": "No Maintainer Specified" | ||
} | ||
], | ||
"repository": [], | ||
"versions": [ | ||
"1.7.0" | ||
], | ||
"yanked_versions": {} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a note that this
use_repo
clause is redundant as it's not importing any repos. no need to fix it in this PR but could fix upstream.