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

Separate GUI sources from core sources #9701

Merged
merged 1 commit into from
Jun 29, 2024

Conversation

louib
Copy link
Member

@louib louib commented Aug 6, 2023

This PR splits the GUI source files from the core source files. The immediate goal is to allow the CLI to require only a minimum number of dynamic libraries. The long term goal is to create an architectural boundary around the core module, in preparation of libkdbx.

The only real challenge in this PR was to deal with the network related modules. I ended up creating a networking directory and moving all the network related modules from core/ in there.

In the future, I think we could move all the core code directly into the core/ folder, and create a CMakeLists.txt specifically for that folder.

I tested mainly with WITH_XC_ALL=ON to make sure most of the cmake code was triggered.

Before the changes:

ldd src/keepassxc | wc -l
58
ldd src/cli/keepassxc-cli | wc -l
60

Basically, the CLI was using exactly the same dynamic libraries as the GUI, plus libncursesw and libreadline.

After the changes:

ldd src/keepassxc | wc -l
58
ldd src/cli/keepassxc-cli | wc -l
42

There's still a bunch of libraries that the CLI is linking against for reasons that I don't understand, like libQt5Gui. This might be included in Qt5::Core, but I'm not sure.

Testing strategy

unit tests and launched the GUI and CLI apps as a smoke test.

Type of change

  • ✅ Refactor (significant modification to existing code)

@louib louib changed the title Fork keepassx core part 1 refactor: Separate GUI sources from core sources Aug 6, 2023
@louib louib force-pushed the fork_keepassx_core_part_1 branch from 0bce987 to 1379cbf Compare August 6, 2023 14:50
@droidmonkey
Copy link
Member

This should be merged next after the 2.7.6 PR's

@codecov
Copy link

codecov bot commented Aug 6, 2023

Codecov Report

Attention: Patch coverage is 95.83333% with 1 line in your changes missing coverage. Please review.

Project coverage is 63.74%. Comparing base (a02ddc7) to head (f64a4b1).

Files Patch % Lines
src/format/KdbxXmlWriter.cpp 80.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #9701      +/-   ##
===========================================
- Coverage    63.74%   63.74%   -0.00%     
===========================================
  Files          362      362              
  Lines        44733    44753      +20     
===========================================
+ Hits         28515    28526      +11     
- Misses       16218    16227       +9     

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

@louib louib marked this pull request as ready for review August 6, 2023 16:42
@droidmonkey droidmonkey self-requested a review August 6, 2023 19:28
@droidmonkey droidmonkey changed the title refactor: Separate GUI sources from core sources Separate GUI sources from core sources Aug 6, 2023
@droidmonkey droidmonkey added this to the v2.8.0 milestone Aug 6, 2023
@louib louib force-pushed the fork_keepassx_core_part_1 branch from 1379cbf to 8de273a Compare August 6, 2023 20:42
@droidmonkey droidmonkey force-pushed the fork_keepassx_core_part_1 branch 5 times, most recently from a2989e5 to bf1cd35 Compare June 23, 2024 13:26
This PR splits the GUI source files from the core source files. The immediate goal is to allow the CLI to require only a minimum number of dynamic libraries. The long term goal is to create an architectural boundary around the core module, in preparation of libkdbx.
@droidmonkey droidmonkey merged commit 166a371 into develop Jun 29, 2024
11 checks passed
@droidmonkey droidmonkey deleted the fork_keepassx_core_part_1 branch June 29, 2024 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants