-
-
Notifications
You must be signed in to change notification settings - Fork 9.9k
refactor: modify plugin class loading order to follow parent delegation mechanism #7258
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
refactor: modify plugin class loading order to follow parent delegation mechanism #7258
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7258 +/- ##
============================================
+ Coverage 56.99% 57.15% +0.16%
- Complexity 3999 4049 +50
============================================
Files 714 720 +6
Lines 24110 24429 +319
Branches 1585 1605 +20
============================================
+ Hits 13742 13963 +221
- Misses 9756 9846 +90
- Partials 612 620 +8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
尽管插件在没有排除已存在的依赖的情况下也能正常运行,不过仍然建议插件主动排除已存在的依赖,这样做可以有效兼容之前的 Halo 版本和减少产物体积。
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JohnNiang The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…delegation mechanism (halo-dev#7258)" This reverts commit 1d8a25c.
…delegation mechanism (#7258)" (#7290) #### What type of PR is this? /kind cleanup #### What this PR does / why we need it: 撤回对插件类加载顺序的改动这可能导致破坏性更新 同时,不在考虑修改加载顺序问题,由于社区版和专业版引入的依赖不同插件无法以社区版为依赖基准保证功能在专业版也可用,举个例子: 1. 插件引入了 okhttp4 作为依赖,这可能是插件引入的依赖所附带的 2. 在社区版没有问题,插件开发者也是这么测试的 3. 但是在专业版中引入了 okhttp3 作为依赖,此时插件在专业版就不可用了因为插件依赖了 okhttp4 的功能 通过上述问题就导致了不可预知的问题 #### Does this PR introduce a user-facing change? ```release-note 撤回对插件类加载顺序的改动这可能导致破坏性更新 ```
What type of PR is this?
/kind improvement
/area core
/milestone 2.20.x
What this PR does / why we need it:
修改插件类加载顺序遵循双亲委派机制,以避免插件需要手动排除冲突类的问题
此 PR 的动力是:
resources 下的资源文件加载顺序还是插件优先,避免与 halo 同名文件不加载的问题
进过测试,插件依赖功能以及其他插件的功能不受影响,建议 Reviewer 再测试一遍
Does this PR introduce a user-facing change?