Skip to content
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

Expose setup.py flag to enable deprecations #2025

Merged
merged 2 commits into from
Aug 1, 2024

Conversation

kounelisagis
Copy link
Member

@kounelisagis kounelisagis commented Jul 31, 2024

In #2023, TILEDB_REMOVE_DEPRECATIONS macro was defined.
It would be good to also have this functionality in setup.py.

Right now, the default behavior is to remove deprecations when build TileDB-Py. In core, the default is to enable them.
Should we keep the logic, or follow the core's?

@kounelisagis kounelisagis changed the title Remove TILEDB_REMOVE_DEPRECATIONS Expose setup.py flag to enable deprecations Aug 1, 2024
Copy link
Collaborator

@dudoslav dudoslav left a comment

Choose a reason for hiding this comment

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

I believe that you also need to call:

parser.add_argument("--enable_deprecations", action="store_true")

Also try this command out, by for example adding

message(FATAL_ERROR "I AM HERE")

into CMake's IF condition checking TILEDB_REMOVE_DEPRECATIONS and if it fails it means that you set the variable correctly

@kounelisagis
Copy link
Member Author

kounelisagis commented Aug 1, 2024

I believe that you also need to call:

parser.add_argument("--enable_deprecations", action="store_true")

Also try this command out, by for example adding

message(FATAL_ERROR "I AM HERE")

into CMake's IF condition checking TILEDB_REMOVE_DEPRECATIONS and if it fails it means that you set the variable correctly

@dudoslav you are right, thanks!

Tested with the following seems to work as expected:

if (TILEDB_REMOVE_DEPRECATIONS)
    message(FATAL_ERROR "DEPRECATIONS REMOVED")
    target_compile_definitions(
        cc
        PRIVATE
        TILEDB_REMOVE_DEPRECATIONS
    )
else()
    message(FATAL_ERROR "DEPRECATIONS NOT REMOVED")
endif()

Copy link
Collaborator

@dudoslav dudoslav left a comment

Choose a reason for hiding this comment

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

Looks good, thanks @kounelisagis

@kounelisagis kounelisagis merged commit b5f6e76 into dev Aug 1, 2024
33 checks passed
@kounelisagis kounelisagis deleted the agis/fix-deprecations-issue branch August 1, 2024 18:12
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.

2 participants