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

Add external library-based module loading feature. #15885

Closed
hyzx86 opened this issue Apr 26, 2024 · 4 comments
Closed

Add external library-based module loading feature. #15885

hyzx86 opened this issue Apr 26, 2024 · 4 comments

Comments

@hyzx86
Copy link
Contributor

hyzx86 commented Apr 26, 2024

Is your feature request related to a problem? Please describe.

Sometimes, we encounter issues that require using the source code debugging capabilities of OrchardCore, but most business modules are stored in their own repositories, making it difficult to quickly switch to the preview branch through the debugging features to locate issues.

Remember that we mentioned about the development of dynamic loading external libraries, but at that time our purpose was just to dynamically load. However, we discovered that if you load after that, you may not be able to completely uninstall already loaded into memory library classes.

Describe the solution you'd like

  1. This feature should only be managed in the Default tenant.
  2. When the Default tenant enables a specified external class library after that, it should be able to function like an internal module. The Subtenants can choose to enable it.
  3. In appsettings.json, add corresponding configuration items for external class library saving location. It might be an array, just like NuGet.Config. We may need to search from multiple paths to find the package.
  4. Advanced version, it might be in the future that we provide or directly use NuGet.org provides service to load class library from network just like GitExtensions does

image

Describe alternatives you've considered

No

@Piedone
Copy link
Member

Piedone commented Apr 26, 2024

I'm not sure I completely understand. Are you looking for a way to be able to swap out the Orchard Core package that module projects used by your application depend on? E.g., the module A depends on OC v.1.8.0, but you want it to use 1.9.0-preview-18189 quickly? Can you provide examples?

A few notes about the topic that may help you and solve this without anything required in Orchard Core:

@hyzx86
Copy link
Contributor Author

hyzx86 commented Apr 26, 2024

Hi @Piedone , Thank you for sharing!

Our repositry is https://github.com/EasyOC/EasyOC

We reference of OC‘s architecture , it also can quickly adjust package version of OC, and implemented similar OrchardCore.Application.Cms.Targets.csproj structure of the project.

So far these business modules are relatively stable, but in turn we have to update common modules frequently, such as components that are re-implemented in a way that overwrites the OC's original interface.
Now we plan to separate these business modules.

We currently use git submodules integration method to integrate these business modules into our project.


Thanks for the reply, it occurred to me while writing the reply that we should really put our generic modules on the package management server and then create separate solutions for different businesses

The repository has not been updated for a long time because it currently includes some business modules 😅

@hyzx86 hyzx86 closed this as completed Apr 26, 2024
@Piedone
Copy link
Member

Piedone commented Apr 26, 2024

OK then! BTW we use submodules in a similar way in this solution too: https://github.com/Lombiq/Open-Source-Orchard-Core-Extensions.

@hyzx86
Copy link
Contributor Author

hyzx86 commented Apr 27, 2024

Yeah, I've seen this project, too 🤣

Mention this, because accessing github from China is a bit of a hassle, I made an OC mirror repository here

https://gitee.com/orchardcore

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

No branches or pull requests

2 participants