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

Major CodeQA - 20250119 #673

Merged
merged 48 commits into from
Jan 26, 2025
Merged

Major CodeQA - 20250119 #673

merged 48 commits into from
Jan 26, 2025

Conversation

neon-nyan
Copy link
Member

@neon-nyan neon-nyan commented Jan 20, 2025

Main Goal

This PR contains huge CodeQA and some code refactoring for some functionalities, which hopefully improve the maintainability of the codebase further.

What's changed?

  • [Imp] CodeQA based on Qodana and ReSharper suggestions
  • [New] Introducing Hash extension for hashing FileStream, string, Span<T> and FileInfo with both synchronous and asynchronous version of the methods. The methods uses generic type of any member of HashAlgorithm (Such as: MD5, SHA*, HMACSHA*, etc.) and NonCryptographicHashAlgorithm (Such as: Crc32, XxHash*, etc.) to specify which kind of hash to be used.
  • [Imp] Separating InternalAppJSONContext members into its own JsonContextes.
  • [Imp] Update H.NotifyIcon to work with CsWin32 v0.3.162.
  • [Imp] Update NuGet packages.
  • [Imp] Recompile and Update StaticLibs for NativeAOT libraries link.
    • Update Rust compiler for csharp_bindings to rustc 1.84.0 (9fc6b4312 2025-01-07) (Stable)
    • Remove dependency to MSVCRT library (Manual VC++ 2019/2022 Redist installation should no longer be needed) and fully utilize UCRT as its runtime library.
    • Update libwebp libraries to: https://github.com/webmproject/libwebp/tree/f8f241071001e1a3807f34a26a03a742ea843458
    • Favor speed + inline optimizaton build (/O2 + /Ob2 + /Oi + /Ot)
    • Recompile all static libraries using Microsoft Visual C++ 2022 (19.43.34618) compiler.
    • Optimize Rust library, csharp_bindings to use full LTO.
  • [Imp] Update Hi3Helper.Sophon submodule.

PR Status :

  • Overall Status : Done
  • Commits : Done
  • Synced to base (Collapse:main) : Not yet
  • Build status : OK
  • Crashing : No
  • Bug found caused by PR : {int}

Templates

Changelog Prefixes
  **[New]**
  **[Imp]**
  **[Fix]**
  **[Loc]**
  **[Doc]**

+ Update Rust compiler for csharp_bindings to rustc 1.84.0 (9fc6b4312 2025-01-07) (Stable)
  + Remove dependency to MSVCRT library (Manual VC++ 2019/2022 Redist installation should no longer be needed)
+ Update libwebp libraries to: https://github.com/webmproject/libwebp/tree/f8f241071001e1a3807f34a26a03a742ea843458
+ Favor size build
+ Recompile using MSVC 2022 (19.43.34618)
Fix MD5 instance not disposed after use
@neon-nyan neon-nyan self-assigned this Jan 20, 2025
Copy link
Member

@bagusnl bagusnl left a comment

Choose a reason for hiding this comment

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

some comments and concerns
part 1 before this chromebook explodes

edit: totally unintended
image

also pls fix build failure

neon-nyan and others added 11 commits January 21, 2025 12:17
Force update submodules to the merge-base repo via bootstrap
+ Pack the libraries and extract it only if AOT compilation is used
+ Ensure to use Link Target Optimization (LTO) on linker
+ (Hopefully) Fix some missing symbols at MachineIndependent.lib
+ Downgrade the Windows SDK to 10.0.22621.0 while compiling static libs. This fixed inconsistency and "missing symbol" error at some libraries.
+ Change to compile all libraries to use /MT (libucrt.lib). This hopefully remove the dependency for the users to install Visual C++ Redist 2022.
+ Use full LTO for Rust library, csharp_bindings.
+ Prefer to use speed + inline optimization (/O2
+ /Ob2 + /Ot + /Oi) instead of size (/O1 + /Ob1 + /Os)
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
2 Security Hotspots
E Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

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

@neon-nyan neon-nyan requested a review from bagusnl January 26, 2025 14:05
Copy link
Member

@bagusnl bagusnl left a comment

Choose a reason for hiding this comment

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

Checked locally and i approb

image

@neon-nyan
Copy link
Member Author

Checked locally and i approb

image

Tanks!

Sidenote: Add "Wi" after "Joko" name and we are good to go
*Bakso vendor chime incoming

@neon-nyan neon-nyan merged commit 1b2d110 into main Jan 26, 2025
5 of 7 checks passed
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.

2 participants