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

[CLIENT-2322] Add support for Windows #437

Merged
merged 100 commits into from
Feb 7, 2024
Merged

Conversation

juliannguyen4
Copy link
Collaborator

@juliannguyen4 juliannguyen4 commented May 2, 2023

NOTE: wheels are built on Windows 2022, which is not the same as Windows 10.

Build wheels all passes and uploaded to JFrog: https://github.com/aerospike/aerospike-client-python/actions/runs/7674493826/
Valgrind, no memory errors or leaks related to PR: https://github.com/aerospike/aerospike-client-python/actions/runs/7644298063/job/20828308036

@codecov-commenter
Copy link

codecov-commenter commented May 2, 2023

Codecov Report

Attention: 16 lines in your changes are missing coverage. Please review.

Comparison is base (31add98) 81.25% compared to head (32694b7) 81.39%.

❗ Current head 32694b7 differs from pull request most recent head fccfe8e. Consider uploading reports for the commit fccfe8e to get more accurate results

Files Patch % Lines
src/main/client/cdt_list_operate.c 0.00% 8 Missing ⚠️
src/main/client/batch_operate.c 50.00% 2 Missing ⚠️
src/main/client/batch_remove.c 0.00% 2 Missing ⚠️
src/main/convert_expressions.c 99.10% 2 Missing ⚠️
src/main/client/batch_apply.c 80.00% 1 Missing ⚠️
src/main/conversions.c 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            stage     #437      +/-   ##
==========================================
+ Coverage   81.25%   81.39%   +0.13%     
==========================================
  Files          99       98       -1     
  Lines       14897    14894       -3     
==========================================
+ Hits        12105    12123      +18     
+ Misses       2792     2771      -21     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@juliannguyen4 juliannguyen4 force-pushed the CLIENT-2322-windows-support branch 2 times, most recently from 016cf22 to 167c6de Compare May 9, 2023 00:53
@juliannguyen4 juliannguyen4 force-pushed the CLIENT-2322-windows-support branch 2 times, most recently from 0b9846a to c25a487 Compare November 15, 2023 23:44
Copy link
Contributor

@dwelch-spike dwelch-spike left a comment

Choose a reason for hiding this comment

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

Mostly style suggestions. Have a look and let me know what you think.

setup.py Outdated
AEROSPIKE_C_TARGET = AEROSPIKE_C_HOME
libraries.clear()
extra_compile_args.append("-DAS_SHARED_IMPORT")
include_dirs.append(AEROSPIKE_C_TARGET + "/vs/packages/aerospike-client-c-dependencies.1.0.2/build/native/include")
Copy link
Contributor

Choose a reason for hiding this comment

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

Will this path ever change? For example might the 1.0.2 change with an update? If so maybe this path needs to be built dynamically.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

setup.py Outdated
]
else:
include_dirs.append(AEROSPIKE_C_TARGET + '/src/include')
library_dirs.append(AEROSPIKE_C_TARGET + "/vs/packages/aerospike-client-c-dependencies.1.0.2/build/native/lib/x64/Release")
Copy link
Contributor

Choose a reason for hiding this comment

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

Same path question here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

Comment on lines 64 to 65
as_status strArray_to_py_list(as_error *err, int num_elements,
char str_array_ptr[][AS_ROLE_SIZE],
Copy link
Contributor

Choose a reason for hiding this comment

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

Why was this change made? Is this function only ever used for roles? If so I think it should be renamed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

See this comment

src/main/client/type.c Show resolved Hide resolved
Comment on lines 147 to 148
as_status strArray_to_py_list(as_error *err, int num_elements,
char str_array_ptr[][AS_ROLE_SIZE],
Copy link
Contributor

Choose a reason for hiding this comment

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

If this assumes it is working with roles I think it should be renamed so that it doesn't look general purpose.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Got it. If I remember correctly, I made this change because the Visual Studio compiler was complaining about taking in a variable size array.

[NOT] = EXP_SZ(as_exp_not({})),
as_exp_nil(),
as_exp_nil())), // ^ TODO implement a less wastefull solution.
[NE] = EXP_SZ(as_exp_cmp_ne(as_exp_nil(), as_exp_nil())),
Copy link
Contributor

Choose a reason for hiding this comment

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

All the as_exp_nil() calls reduce readability in an already dense file. I think a macro that wraps as_exp_nil would help. Maybe #define NIL as_exp_nil().

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

@juliannguyen4
Copy link
Collaborator Author

Copy link
Contributor

@dwelch-spike dwelch-spike left a comment

Choose a reason for hiding this comment

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

LGTM

@juliannguyen4 juliannguyen4 merged commit 8aa7e68 into stage Feb 7, 2024
56 checks passed
@juliannguyen4 juliannguyen4 deleted the CLIENT-2322-windows-support branch February 7, 2024 23:06
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.

None yet

3 participants