-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GH-44515: [D] Add Initial Support #44536
base: main
Are you sure you want to change the base?
Conversation
Thanks for opening a pull request! If this is not a minor PR. Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose Opening GitHub issues ahead of time contributes to the Openness of the Apache Arrow project. Then could you also rename the pull request title in the following format?
or
In the case of PARQUET issues on JIRA the title also supports:
See also: |
|
Could you remove auto generated files? |
Ok.
It's possible, but is it viable? Note that it is possible to use meson to configure the build of D projects (officially supported). However, it may be interesting to make |
Now, base
Right now, I will review the issue of |
I'm not familiar with D but why do we need to create a D program just build the D bindings? Can we simplify this?
|
Like cargo (Rust), dub only get D files (all *.d in rootpath) by default.
Also is possible add specialized libraries like:
Yeah! |
Can we require users to install Apache Arrow GLib before they install the D bindings? FYI: We have the APT/Yum repositories for Apache Arrow GLib: https://arrow.apache.org/install/
Could you try this approach? |
"preBuildCommands": [
"dub run girtod -- -i Arrow-1.0.gir -o source --use-runtime-linker",
"dub run girtod -- -i ArrowDataset-1.0.gir -o source --use-runtime-linker",
"dub run girtod -- -i ArrowFlight-1.0.gir -o source --use-runtime-linker"
],
"dependencies": {
"glibd": {
"repository": "git+https://github.com/gtkd-developers/GlibD.git", // <= get glibd + gir-to-d, generating gio bindings
"version": "1546823185334c4727d378baf890fa13d9fa4cbd" // latest commit
}
}, Works: bb07030 dub build-ouputdub test -f --root=d
Generating test runner configuration 'arrow-d-test-unittest' for 'unittest' (library).
Pre-gen Running commands for glibd
Existing package girtod found locally
0 packages fetched, 1 already present, 0 failed
Building package girtod in /home/kassane/.dub/packages/girtod/0.23.2/girtod/
Pre-gen Running commands for girtod
Starting Performing "debug" build using /home/kassane/zig/ldc2-master/bin/ldc2 for x86_64.
Building girtod 0.23.2: building configuration [application]
Linking girtod
Running ../../../girtod/0.23.2/girtod/girtod -i src -o generated --use-runtime-linker
copying file [src/gtkd] to [generated/gtkd]
Starting Performing "unittest" build using /home/kassane/zig/ldc2-master/bin/ldc2 for x86_64.
Building glibd 2.4.3+commit.2.g1546823: building configuration [library]
Building arrow-d ~master: building configuration [arrow-d-test-unittest]
Pre-build Running commands
Building package girtod in /home/kassane/.dub/packages/girtod/0.23.2/girtod/
Pre-gen Running commands for girtod
Starting Performing "debug" build using /home/kassane/zig/ldc2-master/bin/ldc2 for x86_64.
Building girtod 0.23.2: building configuration [application]
Linking girtod
Running ../../.dub/packages/girtod/0.23.2/girtod/girtod -i Arrow-1.0.gir -o source --use-runtime-linker
Building package girtod in /home/kassane/.dub/packages/girtod/0.23.2/girtod/
Pre-gen Running commands for girtod
Starting Performing "debug" build using /home/kassane/zig/ldc2-master/bin/ldc2 for x86_64.
Building girtod 0.23.2: building configuration [application]
Linking girtod
Running ../../.dub/packages/girtod/0.23.2/girtod/girtod -i ArrowDataset-1.0.gir -o source --use-runtime-linker
Building package girtod in /home/kassane/.dub/packages/girtod/0.23.2/girtod/
Pre-gen Running commands for girtod
Starting Performing "debug" build using /home/kassane/zig/ldc2-master/bin/ldc2 for x86_64.
Building girtod 0.23.2: building configuration [application]
Linking girtod
Running ../../.dub/packages/girtod/0.23.2/girtod/girtod -i ArrowFlight-1.0.gir -o source --use-runtime-linker |
For manual fix need add |
This comment was marked as resolved.
This comment was marked as resolved.
paths: | ||
- '.dockerignore' | ||
- '.github/workflows/d.yml' | ||
- 'ci/docker/*d*' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All .dockerfile
s are matched...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kou,
I have not listed the d/
files in .dockerignore
.
One question: is docker_ruby already included in c_glib?
Previously the CI/CD section, I just attempted adapting swift-lang recipe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 'ci/docker/*d*' | |
- 'ci/docker/*-d.dockerfile' |
One question: is docker_ruby already included in c_glib?
What is referred by the docker_ruby
? https://github.com/apache/arrow/blob/main/ci/docker/linux-apt-ruby.dockerfile ?
* use `gir-to-d` to generate D bindings (need arrow-c-glib)
paths: | ||
- '.dockerignore' | ||
- '.github/workflows/d.yml' | ||
- 'ci/docker/*d*' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 'ci/docker/*d*' | |
- 'ci/docker/*-d.dockerfile' |
One question: is docker_ruby already included in c_glib?
What is referred by the docker_ruby
? https://github.com/apache/arrow/blob/main/ci/docker/linux-apt-ruby.dockerfile ?
|
||
jobs: | ||
docker: | ||
name: AMD64 Ubuntu ${{ matrix.ubuntu }} Glib & D |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name: AMD64 Ubuntu ${{ matrix.ubuntu }} Glib & D | |
name: AMD64 Ubuntu ${{ matrix.ubuntu }} GLib & D |
UBUNTU: ${{ matrix.ubuntu }} | ||
steps: | ||
- name: Checkout Arrow | ||
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 | |
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you rename this to linux-apt-d.dockerfile
and use ubuntu-c-glib
as the base image like ubuntu-ruby
does?
Lines 853 to 875 in 33e8cbb
ubuntu-ruby: | |
# Usage: | |
# docker compose build ubuntu-cpp | |
# docker compose build ubuntu-c-glib | |
# docker compose build ubuntu-ruby | |
# docker compose run --rm ubuntu-ruby | |
# Parameters: | |
# ARCH: amd64, arm64v8, ... | |
# UBUNTU: 20.04, 22.04 | |
image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-ruby | |
build: | |
context: . | |
dockerfile: ci/docker/linux-apt-ruby.dockerfile | |
cache_from: | |
- ${REPO}:${ARCH}-ubuntu-${UBUNTU}-ruby | |
args: | |
base: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-c-glib | |
shm_size: *shm-size | |
ulimits: *ulimits | |
environment: | |
<<: [*common, *ccache] | |
volumes: *ubuntu-volumes | |
command: *ruby-command |
} | ||
}, | ||
"preBuildCommands": [ | ||
"\"$DUB\" run girtod -- -i source -o source --use-runtime-linker" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use out-of-source build?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't add license header to this file because this is JSON, right?
Could you add this file to https://github.com/apache/arrow/blob/main/dev/release/rat_exclude_files.txt ?
Rationale for this change
Add Dlang support. Initial implementation based on
c_glib
, usinggir-to-d
generator.Tools used
What changes are included in this PR?
Add D implementation only. No modify any other language support.
Are these changes tested?
Unit tests will also be added during development.
Are there any user-facing changes?
It adds a new programming language alternative for attracting more users (the small D community).
References
OutputStream
matches conflicting symbols gtkd-developers/gir-to-d#45C++
C
cc: @kou