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

Code Quality: Improve the way packages are managed in the codebase #16430

Open
Lamparter opened this issue Nov 3, 2024 · 2 comments · May be fixed by #16432
Open

Code Quality: Improve the way packages are managed in the codebase #16430

Lamparter opened this issue Nov 3, 2024 · 2 comments · May be fixed by #16432

Comments

@Lamparter
Copy link
Contributor

Lamparter commented Nov 3, 2024

Description

Currently, local NuGet Packages, Link Libraries and Windows Metadata files are managed in a very messy way:

  • They are stored in src/Files.App/nupkgs which is not a PascalCase folder like others

Preferably, they should be stored in a place like pkgs/* or src/Packages/* etc.

  • App extension files (link libraries) are stored in the root src/Files.App directory.

src/Files.App/*.dll

This is a bad idea as it clutters the codebase when they could more neatly be organised in the same directory as the NuGet package store, or inside another folder altogether.

  • The NuGet Gallery server entry is duplicated in the NuGet package manager

NuGet packages for Solution...

This is because the NuGet Gallery endpoint is also listed inside Files's nuget.config file which it should not as this entry is already provided automatically by Visual Studio.

Concerned code

  • <add key="NuGet official package source" value="https://api.nuget.org/v3/index.json" />
  • <add key="Local Packages" value="src/Files.App/nupkgs/" />
  • src/Files.App/*.dll
  • src/Files.App/nupkgs/

Gains

  • Better codebase structure
  • Less confusion when choosing a package source
  • Central store for NuGet Packages, Link Libraries and Windows Metadata files

Requirements

This should be removed.

-         <add key="NuGet official package source" value="https://api.nuget.org/v3/index.json" />

This should be changed to a different pattern that matches with the rest of the codebase.

-         <add key="Local Packages" value="src/Files.App/nupkgs" />
+         <add key="Local Packages" value="src/Files.App/Packages" />
-         <add key="Local Packages" value="src/Files.App/nupkgs" />
+         <add key="Local Packages" value="src/Packages" />
-         <add key="Local Packages" value="src/Files.App/nupkgs" />
+         <add key="Local Packages" value="nupkgs" />
-         <add key="Local Packages" value="src/Files.App/nupkgs" />
+         <add key="Local Packages" value="pkgs" />

The dll files should also be migrated to the same or a similar store.

Comments

N/A

@Lamparter Lamparter changed the title Code Quality: Improve the way offline packages are managed in the codebase Code Quality: Improve the way packages are managed in the codebase Nov 3, 2024
@yaira2
Copy link
Member

yaira2 commented Nov 3, 2024

@Lamparter pending approval, would you like to work on this?

@0x5bfa
Copy link
Member

0x5bfa commented Nov 3, 2024

I don't like these but if you move MainWindow to Views folder and adjust the namespace, I'd be happier (of course if its ok to Yair tho)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

Successfully merging a pull request may close this issue.

3 participants