Skip to content

Conversation

@davidhcoe
Copy link
Contributor

When running from the PowerShell script as part of an ADO pipeline, the line

GIT_VERSION=$(shell git tag ...

was generating the error:

EXEC : error : malformed object name '--sort=-v:refname' [C:\__w\1\s\arrow-adbc\csharp\src\Drivers\Interop\FlightSql\Apache.Arrow.Adbc.Drivers.Interop.FlightSql.csproj]

This change swaps some of the commands but also has a separate PowerShell command for the Windows OS instead of the shell command.

@davidhcoe davidhcoe requested a review from zeroshade as a code owner July 9, 2025 20:57
@github-actions github-actions bot added this to the ADBC Libraries 20 milestone Jul 9, 2025
@davidhcoe
Copy link
Contributor Author

@zeroshade - we verified this against the ADO pipeline. Can you verify it doesn't mess up anything with the versioning that you did for the Go drivers?

RM=del
GIT_VERSION=$(shell powershell -Command "git tag --sort=-v:refname --points-at $(git rev-list --tags --max-count=1) | Select-Object -First 1")
else
SUFFIX=dylib
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this omit macOS? Maybe there should be a separate ifeq windows [powershell] else [git]?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch. fixed.

Copy link
Member

@zeroshade zeroshade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@davidhcoe as long as that powershell command returns the same "go/adbc/v#.#.#" string that we get from on Linux/unix then it shouldn't cause any issues with the version embedding.

I'm not familiar with the ?= syntax in makefiles, but I assume it's essentially that it assigns iff it's currently empty/unset, right? If so, all should be good.

@davidhcoe
Copy link
Contributor Author

I need to run 1 more pipeline test to verify again after my recent push.

@davidhcoe
Copy link
Contributor Author

ok, all set. The PowerShell output looks like:

PS C:\[...]\pkg> make libadbc_driver_snowflake.dll
go build -buildvcs=true -tags driverlib -o libadbc_driver_snowflake.dll -buildmode=c-shared -ldflags "-s -w -X github.com/apache/arrow-adbc/go/adbc/driver/internal/driverbase.infoDriverVersion=v1.7.0" ./snowflake

@zeroshade
Copy link
Member

Looks good!

@lidavidm lidavidm merged commit 50addb4 into apache:main Jul 10, 2025
42 checks passed
@davidhcoe davidhcoe deleted the dev/github-pipeline-issue branch October 24, 2025 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants