-
Notifications
You must be signed in to change notification settings - Fork 111
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
Conversation
Codecov ReportAttention:
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. |
016cf22
to
167c6de
Compare
0cceb95
to
ab46d07
Compare
d4f55fd
to
4fcf564
Compare
0b9846a
to
c25a487
Compare
This reverts commit b79c4a9.
cc245df
to
b40eb49
Compare
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.
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") |
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.
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.
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.
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") |
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.
Same path question here.
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.
done
src/include/conversions.h
Outdated
as_status strArray_to_py_list(as_error *err, int num_elements, | ||
char str_array_ptr[][AS_ROLE_SIZE], |
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.
Why was this change made? Is this function only ever used for roles? If so I think it should be renamed.
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.
See this comment
src/main/conversions.c
Outdated
as_status strArray_to_py_list(as_error *err, int num_elements, | ||
char str_array_ptr[][AS_ROLE_SIZE], |
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.
If this assumes it is working with roles I think it should be renamed so that it doesn't look general purpose.
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.
Got it. If I remember correctly, I made this change because the Visual Studio compiler was complaining about taking in a variable size array.
src/main/convert_expressions.c
Outdated
[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())), |
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 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()
.
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.
done
New changes pass testing on Windows: https://github.com/aerospike/aerospike-client-python/actions/runs/7821045905/job/21339450593 |
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.
LGTM
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