fix(core.runtime):修复容器 authority 和插件 authority 相同时返回错误 Uri 的问题#1429
Open
yanglw wants to merge 1 commit intoTencent:masterfrom
Open
fix(core.runtime):修复容器 authority 和插件 authority 相同时返回错误 Uri 的问题#1429yanglw wants to merge 1 commit intoTencent:masterfrom
yanglw wants to merge 1 commit intoTencent:masterfrom
Conversation
Member
|
|
Collaborator
|
这个代码时间久了点,我印象不太准了。这里的容器authority不是shadow框架写的固定的吗?或者是宿主中注册的固定的吧?是不是应该会固定成容器含义的字符串,为什么插件的authority会跟容器的相同呢? |
Contributor
Author
|
在已有现网版本且未使用 Shadow 的应用中存在一个 Content Provider 。这个 Content Provider
应用内部在用,同时也对外部应用提供数据服务。
当这个应用想要使用 Shadow 时,对外(容器 authority), Content Provider Uri
不能变,因为牵扯到三分应用改动以及版本适配问题;对内(插件 authority),Content Provider Uri
也不能变,因为这将导致插件版本和非插件版本 Uri 不一致。
shifujun ***@***.***> 于 2026年3月21日周六 23:07写道:
… *shifujun* left a comment (Tencent/Shadow#1429)
<#1429 (comment)>
这个代码时间久了点,我印象不太准了。这里的容器authority不是shadow框架写的固定的吗?或者是宿主中注册的固定的吧?是不是应该会固定成容器含义的字符串,为什么插件的authority会跟容器的相同呢?
—
Reply to this email directly, view it on GitHub
<#1429?email_source=notifications&email_token=ABDLZN7KPTWJQZACWARNQMT4R2V3JA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIMJQGM2TEOBWHE42M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#issuecomment-4103528699>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABDLZN463IEP42OOCYZ2O634R2V3JAVCNFSM6AAAAACW2CWMZSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DCMBTGUZDQNRZHE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Collaborator
|
建议修改2点:
|
Contributor
Author
|
好的。
shifujun ***@***.***> 于 2026年3月21日周六 23:34写道:
… *shifujun* left a comment (Tencent/Shadow#1429)
<#1429 (comment)>
建议修改2点:
1. 提交记录标题的fix(core.runtime)改为fix(core.loader)
2. 能否仿照projects/sdk/core/loader/src/test/kotlin/com/tencent/shadow/core/loader/classloaders/PluginClassLoaderTest.kt
给这个convert2PluginUri方法写一个单元测试?这个正则表达式还是很难用人眼看出问题的。
—
Reply to this email directly, view it on GitHub
<#1429?email_source=notifications&email_token=ABDLZN6EG7XOMI4VSBRZVGT4R2ZA3A5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIMJQGM2TONRUGY42M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#issuecomment-4103576469>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABDLZN4UATMV6GTYHGMCFR34R2ZA3AVCNFSM6AAAAACW2CWMZSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DCMBTGU3TMNBWHE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
当容器 authority 和插件 authority 相同,通过 uriString.replace 转换 Uri 时,会将宿主和插件的 authority 都进行删除,导致返回的 Uri 错误,无法匹配真正的插件 Content Provider 。