-
Notifications
You must be signed in to change notification settings - Fork 3.9k
GH-41681: [GLib] Generate separate version macros for each GLib library #41721
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
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
76c2db5
Add Python script to generate version.h
adamreeve 7df09ef
Generate separate version headers for each GLib project
adamreeve 4671fc5
Use correct version macros in gandiva glib
adamreeve d8220bf
Add built headers to library sources
adamreeve 644220e
Update use of version macros in headers
adamreeve ef49fb9
Add version header includes
adamreeve f08a6c4
Add extra available_in annotations
adamreeve e8f260f
Move and rename header generation script
adamreeve d67ace3
Find python3 for command instead of python script
adamreeve 97b2610
Simplify string replacement in header generation
adamreeve 75b684c
Use configure_file instead of custom_target so headers are used in mk…
adamreeve 239ca7c
Include c_glib in flake8 formatting
adamreeve f32f12e
Include version.h in -glib.h headers
adamreeve 6cb7935
Generate separate version macros for all libraries
adamreeve 609541d
Update versions list in utils-prepare.sh
adamreeve 0d555ca
Add 17.0.0 version
adamreeve d020442
Only add new glib major version if it isn't already present
adamreeve 9d89466
Update bump-versions-test
adamreeve a0e59a6
Tidy ups from code review
adamreeve 09096b2
Keep expected changes sorted by path value
adamreeve f90a0d4
Better fix for only adding new major versions
adamreeve File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,4 +21,6 @@ | |
|
|
||
| #include <arrow-glib/arrow-glib.h> | ||
|
|
||
| #include <arrow-cuda-glib/version.h> | ||
|
|
||
| #include <arrow-cuda-glib/cuda.h> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,157 @@ | ||
| /* | ||
| * Licensed to the Apache Software Foundation (ASF) under one | ||
| * or more contributor license agreements. See the NOTICE file | ||
| * distributed with this work for additional information | ||
| * regarding copyright ownership. The ASF licenses this file | ||
| * to you under the Apache License, Version 2.0 (the | ||
| * "License"); you may not use this file except in compliance | ||
| * with the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, | ||
| * software distributed under the License is distributed on an | ||
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| * KIND, either express or implied. See the License for the | ||
| * specific language governing permissions and limitations | ||
| * under the License. | ||
| */ | ||
|
|
||
| #pragma once | ||
|
|
||
| #include <arrow-glib/version.h> | ||
adamreeve marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| /** | ||
| * SECTION: version | ||
| * @section_id: version-macros | ||
| * @title: Version related macros | ||
| * @include: arrow-cuda-glib/arrow-cuda-glib.h | ||
| * | ||
| * Apache Arrow CUDA GLib provides macros that can be used by C pre-processor. | ||
| * They are useful to check version related things at compile time. | ||
| */ | ||
|
|
||
| /** | ||
| * GARROW_CUDA_VERSION_MAJOR: | ||
| * | ||
| * The major version. | ||
| * | ||
| * Since: 17.0.0 | ||
| */ | ||
| #define GARROW_CUDA_VERSION_MAJOR (@VERSION_MAJOR@) | ||
|
|
||
| /** | ||
| * GARROW_CUDA_VERSION_MINOR: | ||
| * | ||
| * The minor version. | ||
| * | ||
| * Since: 17.0.0 | ||
| */ | ||
| #define GARROW_CUDA_VERSION_MINOR (@VERSION_MINOR@) | ||
|
|
||
| /** | ||
| * GARROW_CUDA_VERSION_MICRO: | ||
| * | ||
| * The micro version. | ||
| * | ||
| * Since: 17.0.0 | ||
| */ | ||
| #define GARROW_CUDA_VERSION_MICRO (@VERSION_MICRO@) | ||
|
|
||
| /** | ||
| * GARROW_CUDA_VERSION_TAG: | ||
| * | ||
| * The version tag. Normally, it's an empty string. It's "SNAPSHOT" | ||
| * for snapshot version. | ||
| * | ||
| * Since: 17.0.0 | ||
| */ | ||
| #define GARROW_CUDA_VERSION_TAG "@VERSION_TAG@" | ||
|
|
||
| /** | ||
| * GARROW_CUDA_VERSION_CHECK: | ||
| * @major: A major version to check for. | ||
| * @minor: A minor version to check for. | ||
| * @micro: A micro version to check for. | ||
| * | ||
| * You can use this macro in C pre-processor. | ||
| * | ||
| * Returns: %TRUE if the compile time Apache Arrow GLib version is the | ||
| * same as or newer than the passed version, %FALSE otherwise. | ||
| * | ||
| * Since: 17.0.0 | ||
| */ | ||
| #define GARROW_CUDA_VERSION_CHECK(major, minor, micro) \ | ||
| (GARROW_CUDA_VERSION_MAJOR > (major) || \ | ||
| (GARROW_CUDA_VERSION_MAJOR == (major) && \ | ||
| GARROW_CUDA_VERSION_MINOR > (minor)) || \ | ||
| (GARROW_CUDA_VERSION_MAJOR == (major) && \ | ||
| GARROW_CUDA_VERSION_MINOR == (minor) && \ | ||
| GARROW_CUDA_VERSION_MICRO >= (micro))) | ||
|
|
||
| /** | ||
| * GARROW_CUDA_DISABLE_DEPRECATION_WARNINGS: | ||
| * | ||
| * If this macro is defined, no deprecated warnings are produced. | ||
| * | ||
| * You must define this macro before including the | ||
| * arrow-glib/arrow-glib.h header. | ||
| * | ||
| * Since: 17.0.0 | ||
| */ | ||
|
|
||
| #ifdef GARROW_CUDA_DISABLE_DEPRECATION_WARNINGS | ||
| # define GARROW_CUDA_DEPRECATED | ||
| # define GARROW_CUDA_DEPRECATED_FOR(function) | ||
| # define GARROW_CUDA_UNAVAILABLE(major, minor) | ||
| #else | ||
| # define GARROW_CUDA_DEPRECATED G_DEPRECATED | ||
| # define GARROW_CUDA_DEPRECATED_FOR(function) G_DEPRECATED_FOR(function) | ||
| # define GARROW_CUDA_UNAVAILABLE(major, minor) G_UNAVAILABLE(major, minor) | ||
| #endif | ||
|
|
||
| @ENCODED_VERSIONS@ | ||
|
|
||
| /** | ||
| * GARROW_CUDA_VERSION_MIN_REQUIRED: | ||
| * | ||
| * You can use this macro for compile time API version check. | ||
| * | ||
| * This macro value must be one of the predefined version macros such | ||
| * as %GARROW_CUDA_VERSION_0_10. | ||
| * | ||
| * If you use any functions that is defined by newer version than | ||
| * %GARROW_CUDA_VERSION_MIN_REQUIRED, deprecated warnings are produced at | ||
| * compile time. | ||
| * | ||
| * You must define this macro before including the | ||
| * arrow-cuda-glib/arrow-cuda-glib.h header. | ||
| * | ||
| * Since: 17.0.0 | ||
| */ | ||
| #ifndef GARROW_CUDA_VERSION_MIN_REQUIRED | ||
| # define GARROW_CUDA_VERSION_MIN_REQUIRED GARROW_VERSION_MIN_REQUIRED | ||
| #endif | ||
|
|
||
| /** | ||
| * GARROW_CUDA_VERSION_MAX_ALLOWED: | ||
| * | ||
| * You can use this macro for compile time API version check. | ||
| * | ||
| * This macro value must be one of the predefined version macros such | ||
| * as %GARROW_CUDA_VERSION_0_10. | ||
| * | ||
| * If you use any functions that is defined by newer version than | ||
| * %GARROW_CUDA_VERSION_MAX_ALLOWED, deprecated warnings are produced at | ||
| * compile time. | ||
| * | ||
| * You must define this macro before including the | ||
| * arrow-cuda-glib/arrow-cuda-glib.h header. | ||
| * | ||
| * Since: 17.0.0 | ||
| */ | ||
| #ifndef GARROW_CUDA_VERSION_MAX_ALLOWED | ||
| # define GARROW_CUDA_VERSION_MAX_ALLOWED GARROW_VERSION_MAX_ALLOWED | ||
| #endif | ||
|
|
||
| @AVAILABILITY_MACROS@ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.