CDataWGo Swift package can't build: it depends on the removed Arrow/ directory

Open Beginner friendly
#209 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
c, go, swift
Domain
build-system

Research direction

The broken reference is in CDataWGo/Package.swift, where the .package(path: "../Arrow") dependency should point at the root manifest instead. Run swift build inside CDataWGo/ to reproduce the error, then fix the dependency declaration so the product name matches the identity of the root package. Done when swift build succeeds in CDataWGo/; the issue also suggests removing the harness if it is no longer maintained.

Written by the indexing model from the issue text.

Description

Describe the bug

swift build in CDataWGo/ fails, because CDataWGo/Package.swift still declares a local dependency on ../Arrow:

.package(path: "../Arrow")  // 👈  Reference to a Local Package

That directory no longer exists. The package was consolidated into a single manifest at the repository root in #109 (d24935c, "Move ArrowTests to standard layout"), but the CDataWGo manifest was not updated at the time.

Error on main (f02f9d0), macOS 27.0, Swift 6.4.2:

$ cd CDataWGo && swift build
error: the package at '.../arrow-swift/Arrow' cannot be accessed
(.../arrow-swift/Arrow doesn't exist in file system)

Changing only the path to .. is not enough, because SwiftPM derives a path dependency's identity from its directory name. The existing product reference then fails:

error: 'cdatawgo': unknown package 'Arrow' in dependencies of target 'go-swift';
valid packages are: 'arrow-swift' (at '.../arrow-swift')

Expected behavior

swift build in CDataWGo/ should succeed, so the Go ↔ Swift C data interface harness can be built, or the harness should be removed if it is no longer maintained.

I verified that this manifest change builds successfully:

.package(name: "Arrow", path: "..")

It works both against the current root manifest (swift-tools-version: 5.10) and against the swift-tools-version: 6.1 root from #202.

Additional context

  • Nothing in CI builds CDataWGo/, which is why this went unnoticed: ci/scripts/{build,test}.sh only build the root package. The Swift side is also excluded from SwiftLint (.swiftlint.yml), and Dependabot only tracks the Go module there.
  • The harness builds the static go-swift library from CDataWGo/Sources/go-swift/CDataTest.swift, which CDataWGo/main.go links with cgo to exercise the C data interface against arrow-go in both directions.
  • The same layout migration left stale /Arrow/ and /ArrowFlight/ entries in .github/dependabot.yml; those are cleaned up separately in #208.
Dominant language
Swift
Stars
33
Forks
20
Avg merge
10h 47m
Merged PRs (30d)
5

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/arrow-swift

All issues in apache/arrow-swift

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.