This is an automated email from the ASF dual-hosted git repository.
lidavidm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-adbc.git
The following commit(s) were added to refs/heads/main by this push:
new 2abd7b0f7 chore(go/adbc): allow symbol table and debug info to be
included in go libraries (#4752)
2abd7b0f7 is described below
commit 2abd7b0f7ee3cb022d6d5a4c578652b6539b407a
Author: Bruce Irschick <[email protected]>
AuthorDate: Wed Sep 2 18:20:58 2026 -0700
chore(go/adbc): allow symbol table and debug info to be included in go
libraries (#4752)
This pull request makes improvements to the build process for the
FlightSQL driver, particularly around error handling, working directory
management, and build flags. The most important changes are as follows:
**PowerShell Script Improvements:**
* Added a `try/finally` block in `Build-FlightSqlDriver.ps1` to ensure
the working directory is restored after building, improving reliability
and preventing side effects if the script fails.
* Refactored and cleaned up conditional statements for better
readability and maintainability in `Build-FlightSqlDriver.ps1`.
**Go Build Process:**
* Removed the `-s -w` linker flags from the Go build command in
`Makefile` to simplify the build and potentially improve debugging.
---------
Co-authored-by: Bruce Irschick (Bit Quill Technologies Inc)
<[email protected]>
---
.../Interop/FlightSql/Build-FlightSqlDriver.ps1 | 35 ++++++++++++----------
go/adbc/pkg/Makefile | 2 +-
2 files changed, 20 insertions(+), 17 deletions(-)
diff --git a/csharp/src/Drivers/Interop/FlightSql/Build-FlightSqlDriver.ps1
b/csharp/src/Drivers/Interop/FlightSql/Build-FlightSqlDriver.ps1
index fd7dee069..67b92d22e 100644
--- a/csharp/src/Drivers/Interop/FlightSql/Build-FlightSqlDriver.ps1
+++ b/csharp/src/Drivers/Interop/FlightSql/Build-FlightSqlDriver.ps1
@@ -35,29 +35,32 @@ $location = Get-Location
$file = "libadbc_driver_flightsql.dll"
-if(Test-Path $file)
-{
+if (Test-Path $file) {
exit
}
-cd ..\..\..\..\..\go\adbc\pkg
+try {
+ Set-Location ..\..\..\..\..\go\adbc\pkg
-make $file
+ make $file
-if(Test-Path $file)
-{
- $processes = Get-Process | Where-Object { $_.Modules.ModuleName -contains
$file }
+ if (Test-Path $file) {
+ $processes = Get-Process | Where-Object { $_.Modules.ModuleName
-contains $file }
- if ($processes.Count -eq 0) {
- try {
- # File is not being used, copy it to the destination
- Copy-Item -Path $file -Destination $location
- Write-Host "File copied successfully."
+ if ($processes.Count -eq 0) {
+ try {
+ # File is not being used, copy it to the destination
+ Copy-Item -Path $file -Destination $location
+ Write-Host "File copied successfully."
+ }
+ catch {
+ Write-Host "Caught error: $_"
+ }
}
- catch {
- Write-Host "Caught error: $_"
+ else {
+ Write-Host "File is being used by another process. Cannot copy."
}
- } else {
- Write-Host "File is being used by another process. Cannot copy."
}
+} finally {
+ Set-Location $location
}
diff --git a/go/adbc/pkg/Makefile b/go/adbc/pkg/Makefile
index 4f834ab73..fc31007aa 100644
--- a/go/adbc/pkg/Makefile
+++ b/go/adbc/pkg/Makefile
@@ -48,7 +48,7 @@ DRIVERS := $(addsuffix .$(SUFFIX),$(addprefix
libadbc_driver_,$(MANAGERS)))
all: $(DRIVERS)
libadbc_driver_%.$(SUFFIX): % ../driver/% ../go.mod ../go.sum
- $(GO_BUILD) -buildvcs=true -tags driverlib -o $@ -buildmode=c-shared
-ldflags "-s -w -X
github.com/apache/arrow-adbc/go/adbc/driver/internal/driverbase.infoDriverVersion=$(VERSION)"
./$*
+ $(GO_BUILD) -buildvcs=true -tags driverlib -o $@ -buildmode=c-shared
-ldflags "-X
github.com/apache/arrow-adbc/go/adbc/driver/internal/driverbase.infoDriverVersion=$(VERSION)"
./$*
$(RM) $(basename $@).h
regenerate: