Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Regenerate FlatBuffers Swift sources automatically on Dependabot updates

Open
#204 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
52/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
github-actions, swift

Research direction

Read Package.swift and gen-flatbuffers.sh to see how the FlatBuffers runtime version and generated Swift sources are currently handled; the script’s paths and pinned Apache Arrow format revision need attention. Then map the requested shell and gh workflow to Dependabot pull requests and inspect how CI builds and tests the package. Done means qualifying version bumps regenerate Sources/Arrow/*_generated.swift, update the PR branch when needed, and run build and tests.

Written by the indexing model from the issue text.

Description

Describe the enhancement requested

We commit the FlatBuffers generated Swift sources (Sources/Arrow/*_generated.swift). They must be regenerated with the flatc version that matches the FlatBuffers Swift runtime version in Package.swift.

Dependabot only updates Package.swift/Package.resolved. So a Dependabot PR that bumps FlatBuffers can't pass CI by itself, and someone has to regenerate the sources manually. For example, #160 (25.2.10 -> 25.12.19) fails CI.

How about adding a GitHub Actions workflow that regenerates the sources on Dependabot PRs? It would:

  1. Run on Dependabot PRs that change the FlatBuffers version in Package.swift
  2. Download the flatc binary for that version from the google/flatbuffers releases
  3. Fetch format/*.fbs from apache/arrow at a pinned revision
  4. Run gen-flatbuffers.sh and push the regenerated sources to the PR branch if there are any changes

Notes:

  • This only automates regeneration. If the runtime API changes, we still need to update the hand-written code manually in the PR.
  • gen-flatbuffers.sh uses paths for the old repository layout. We need to fix them as part of this. We should also record the pinned apache/arrow revision for format/*.fbs in the script.
  • Workflows triggered by Dependabot get a read-only GITHUB_TOKEN by default, so the workflow needs permissions: contents: write.
  • Commits pushed with GITHUB_TOKEN don't trigger other workflows. So the workflow should also build and run the tests after regeneration, or we need to re-run CI manually.
  • We should use only shell and gh (no third-party actions) to comply with the ASF GitHub Actions policy.

We can apply the same approach to the Protocol Buffers/gRPC generated sources in Sources/ArrowFlight/ later.

Dominant language
Swift
Stars
33
Forks
20
Avg merge
1h 38m
Merged PRs (30d)
4

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.