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

Explicit exports #2118

Merged
merged 2 commits into from
Sep 30, 2023
Merged

Explicit exports #2118

merged 2 commits into from
Sep 30, 2023

Conversation

benjaminwinger
Copy link
Collaborator

@benjaminwinger benjaminwinger commented Sep 29, 2023

This should fix the issue with the windows build failing due to too many symbols.

Instead of exporting all symbols, this only exports those which are explicitly marked as part of the exported API. We probably don't want to enable this except for on Windows for the moment, since the KUZU_API annotations weren't previously strictly enforced and may not be complete. But I've enabled it on linux for testing to try and catch things that should be exported. (Edit: now disabled)

I've included the change from #2107 to help test, as those can link against the shared library, unlike the tests. I think we probably in the long run should rewrite the API tests to link against the shared library so we can make sure all the APIs are accessible, but they currently use helper functions and classes which are private.

In addition to avoiding the error on Windows this will be helpful on all platforms eventually, as it should reduce the size of the shared library and speed up library loading.
On Linux there is a related issue where the dynamic library exports all the symbols from static libraries linked to it. It should be possible to avoid that using linker version files I think, but it's not a priority right now, and this issue doesn't appear to occur on windows.

@codecov
Copy link

codecov bot commented Sep 29, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (bc74559) 0.00% compared to head (e78eff0) 89.78%.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #2118       +/-   ##
===========================================
+ Coverage        0   89.78%   +89.78%     
===========================================
  Files           0      986      +986     
  Lines           0    35559    +35559     
===========================================
+ Hits            0    31928    +31928     
- Misses          0     3631     +3631     
Files Coverage Δ
src/include/common/types/date_t.h 100.00% <ø> (ø)
src/include/common/types/timestamp_t.h 100.00% <ø> (ø)
src/include/common/types/types.h 100.00% <ø> (ø)
src/include/common/types/value/value.h 90.00% <100.00%> (ø)
src/include/main/connection.h 100.00% <100.00%> (ø)
src/include/main/query_result.h 100.00% <ø> (ø)
src/include/processor/result/flat_tuple.h 100.00% <ø> (ø)

... and 979 files with indirect coverage changes

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

@mewim mewim marked this pull request as ready for review September 30, 2023 06:35
@mewim mewim merged commit 9d99a95 into master Sep 30, 2023
10 of 11 checks passed
@mewim mewim deleted the explicit-exports branch September 30, 2023 06:44
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.

3 participants