Sunshine icon indicating copy to clipboard operation
Sunshine copied to clipboard

refactor: split server and inputs into their own groups

Open Hazer opened this issue 1 year ago • 6 comments

Description

Breaking the project in smaller pieces will make the project easier to contribute and maintain in the future, it's not a major rewrite, just moving files or splitting a single file into many without major refactors.

Moves the following files to the server folder:

confighttp.cpp
confighttp.h
crypto.cpp
crypto.h
httpcommon.cpp
httpcommon.h
network.cpp
network.h
nvhttp.cpp
nvhttp.h
rtsp.cpp
rtsp.h
upnp.cpp
upnp.h

Moves the following input to the input folder and split it into:

common.cpp
common.h
gamepad.cpp
gamepad.h
init.h
keyboard.cpp
keyboard.h
mouse.cpp
mouse.h
pen.cpp
pen.h
processor.cpp
processor.h
touch.cpp
touch.h

Screenshot

Issues Fixed or Closed

Type of Change

  • [x] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] Dependency update (updates to dependencies)
  • [x] Documentation update (changes to documentation)
  • [ ] Repository update (changes to repository files, e.g. .github/...)

Checklist

  • [x] My code follows the style guidelines of this project
  • [x] I have performed a self-review of my own code
  • [ ] I have commented my code, particularly in hard-to-understand areas
  • [ ] I have added or updated the in code docstring/documentation-blocks for new or existing methods/components

Branch Updates

LizardByte requires that branches be up-to-date before merging. This means that after any PR is merged, this branch must be updated before it can be merged. You must also Allow edits from maintainers.

  • [x] I want maintainers to keep my branch updated

Hazer avatar May 27 '24 18:05 Hazer

Codecov Report

:x: Patch coverage is 1.48402% with 863 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 10.70%. Comparing base (f9c885a) to head (49aa9d7). :warning: Report is 509 commits behind head on master.

Files with missing lines Patch % Lines
src/input/gamepad.cpp 0.42% 213 Missing and 21 partials :warning:
src/input/processor.cpp 0.00% 160 Missing and 5 partials :warning:
src/input/mouse.cpp 1.40% 127 Missing and 13 partials :warning:
src/input/keyboard.cpp 0.77% 122 Missing and 6 partials :warning:
src/input/touch.cpp 2.56% 72 Missing and 4 partials :warning:
src/input/pen.cpp 3.12% 58 Missing and 4 partials :warning:
src/input/common.cpp 0.00% 15 Missing :warning:
src/input/processor.h 0.00% 12 Missing :warning:
src/server/confighttp.cpp 8.33% 0 Missing and 11 partials :warning:
src/input/gamepad.h 0.00% 7 Missing :warning:
... and 3 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2594      +/-   ##
==========================================
+ Coverage    9.69%   10.70%   +1.00%     
==========================================
  Files          97       87      -10     
  Lines       17524    12765    -4759     
  Branches     8204     6180    -2024     
==========================================
- Hits         1699     1366     -333     
+ Misses      13050    10328    -2722     
+ Partials     2775     1071    -1704     
Flag Coverage Δ
Linux 7.21% <0.51%> (+<0.01%) :arrow_up:
Windows ?
macOS-12 10.38% <1.37%> (+0.02%) :arrow_up:
macOS-13 10.29% <1.37%> (+0.02%) :arrow_up:
macOS-14 10.61% <1.37%> (+0.02%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/audio.h 0.00% <ø> (ø)
src/config.cpp 5.13% <ø> (+0.24%) :arrow_up:
src/entry_handler.cpp 8.57% <ø> (+6.09%) :arrow_up:
src/platform/linux/publish.cpp 0.00% <ø> (ø)
src/platform/macos/input.cpp 36.57% <ø> (ø)
src/platform/macos/publish.cpp 5.12% <ø> (-2.57%) :arrow_down:
src/process.cpp 1.67% <ø> (+0.03%) :arrow_up:
src/process.h 12.50% <ø> (+1.38%) :arrow_up:
src/server/crypto.h 0.00% <ø> (ø)
src/server/httpcommon.cpp 23.88% <ø> (ø)
... and 24 more

... and 37 files with indirect coverage changes

codecov[bot] avatar May 27 '24 20:05 codecov[bot]

Since this is touching every source file in the project, maybe it's a good opportunity to take care of this as well? #2186

@ReenigneArcher I was trying to avoid as much conflict as possible, but can be done, or in a future PR too. Can we force the rules to be different only for /input and /server subfolders? This way I could start migrating piece by piece

Hazer avatar May 31 '24 21:05 Hazer

Due to recent changes to the docs, all the doc changes can be dropped from this PR.

ReenigneArcher avatar Jun 25 '24 15:06 ReenigneArcher

Quality Gate Failed Quality Gate failed

Failed conditions
10 Security Hotspots
D Security Rating on New Code (required ≥ A)
D Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

sonarqubecloud[bot] avatar Aug 11 '24 23:08 sonarqubecloud[bot]

It looks like this PR has been idle for 90 days. If it's still something you're working on or would like to pursue, please leave a comment or update your branch. Otherwise, we'll be closing this PR in 10 days to reduce our backlog. Thanks!

LizardByte-bot avatar Jan 03 '25 10:01 LizardByte-bot

It looks like this PR has been idle for 90 days. If it's still something you're working on or would like to pursue, please leave a comment or update your branch. Otherwise, we'll be closing this PR in 10 days to reduce our backlog. Thanks!

LizardByte-bot avatar Apr 08 '25 10:04 LizardByte-bot

Closing as stale

ReenigneArcher avatar Oct 27 '25 17:10 ReenigneArcher