assignUser commented on code in PR #1220: URL: https://github.com/apache/arrow-adbc/pull/1220#discussion_r1375133595
########## r/adbcsnowflake/src/Makevars.in: ########## @@ -15,8 +15,8 @@ # specific language governing permissions and limitations # under the License. -PKG_CPPFLAGS=-I$(CURDIR)/src -DADBC_EXPORT="" -PKG_LIBS=-L$(CURDIR)/go -ladbc_driver_snowflake -lresolv @libs@ Review Comment: Configure[ adds it](https://github.com/apache/arrow-adbc/pull/1220/files#diff-f38df91821ffbca4a02ed033210d891a0e2dc9e8b3e30e89becad3965cc15365R134) depending on os. ########## r/adbcsnowflake/tools/download-go-vendor-archive.R: ########## @@ -15,20 +15,14 @@ # specific language governing permissions and limitations # under the License. -PKG_CPPFLAGS=-I$(CURDIR) -DADBC_EXPORT="" -PKG_LIBS=-L$(CURDIR)/go -ladbc_driver_snowflake +uri <- Sys.getenv("R_ADBCSNOWFLAKE_VENDORED_DEPENDENCY_URI", "") -CGO_CC = `"${R_HOME}/bin${R_ARCH_BIN}/R.exe" CMD config CC` -CGO_CXX = `"${R_HOME}/bin${R_ARCH_BIN}/R.exe" CMD config CXX` -CGO_CFLAGS = $(ALL_CPPFLAGS) -GO_BIN = $(CURDIR)/go/tmp/go/bin/go.exe +if (identical(uri, "")) { + # When there is a home for this that is not a local file:// URI, + # this is where we would set the default. Review Comment: aka the asf artifactory? Do we need to setup anything for that in the release scripts? ########## r/adbcsnowflake/DESCRIPTION: ########## @@ -17,9 +17,9 @@ Encoding: UTF-8 Roxygen: list(markdown = TRUE) Review Comment: Is this not missing a lower bound when you mention below that this will not compile on <4.2? ```suggestion Depends: R (>= 4.2) Roxygen: list(markdown = TRUE) ``` ########## r/adbcsnowflake/tools/create-go-vendor-archive.R: ########## @@ -0,0 +1,77 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +go_bin <- Sys.getenv("GO_BIN", unname(Sys.which("go"))) + +withr::with_dir("src/go/adbc", { + system(paste(shQuote(go_bin), "mod vendor -v")) + + # go mod vendor for arrow/v13 doesn't include some files needed for go build + tmp_zip <- tempfile() + tmp_extract <- tempfile() + local({ + on.exit({ + unlink(tmp_extract, recursive = TRUE) + unlink(tmp_zip) + }) + + curl::curl_download( + "https://github.com/apache/arrow/archive/refs/tags/go/v13.0.0.zip", + tmp_zip + ) + + unzip(tmp_zip, exdir = tmp_extract) + + src_go_arrow_cdata_arrow_dir <- file.path( + tmp_extract, + "arrow-go-v13.0.0/go/arrow/cdata/arrow" + ) + + dst_go_arrow_cdata_dir <- "vendor/github.com/apache/arrow/go/v13/arrow/cdata/" + stopifnot(file.copy(src_go_arrow_cdata_arrow_dir, dst_go_arrow_cdata_dir, recursive = TRUE)) + }) + + # github.com/zeebo/xxh3/Makefile does not end in LF, giving a check NOTE + write("\n", "vendor/github.com/zeebo/xxh3/Makefile", append = TRUE) + + # pragmas in this file give a NOTE Review Comment: :monocle_face: why? portability? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
