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

Set webapp roles that are max 12 characters long. #30

Open
wants to merge 1 commit into
base: @6.agl.icefish
Choose a base branch
from

Conversation

jaragunde
Copy link

This is a workaround for SPEC-3127. To prevent repeated roles as much as possible, I'm using the appid as a basis instead of "Webapp-" + host + port, which has many chances to be redundant in the first 12 chars.

Bug-AGL: SPEC-3127

This is a workaround for SPEC-3127. To prevent repeated roles as much
as possible, I'm using the appid as a basis instead of "Webapp-" +
host + port, which has many chances to be redundant in the first 12
chars.

Bug-AGL: SPEC-3127
@@ -265,6 +258,9 @@ bool WebAppLauncherRuntime::init() {
m_role = "homescreen";
else if (m_id.rfind("webapps-homescreen", 0) == 0)
m_role = "homescreen";
else {
m_role = m_id.substr(0,12);
Copy link
Contributor

Choose a reason for hiding this comment

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

Application ID is a bad idea for this purpose, as with the typical naming it is still easy to see duplicates. I.e. com.webos.app. will alll have the same role.

I think we can take a different solution, that is just applying a hash algorithm. I.e. wapp-XXXXXXX (where XXXXXXX is calculated from the application ID, that is expected to be unique).

Another possibility is requiring apps to expose their roles somehow in config.xml.

And another possibility is fixing the platform to not fail with a role that is bigger than 12 characters. Do we know where this limit comes from?

Copy link
Author

Choose a reason for hiding this comment

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

...
I think we can take a different solution, that is just applying a hash algorithm. I.e. wapp-XXXXXXX (where XXXXXXX is calculated from the application ID, that is expected to be unique).

Thanks, will try this.

Another possibility is requiring apps to expose their roles somehow in config.xml.

In further versions of AGL, a new Wayland compositor will be used that replaces current homescreen and windowmanager APIs. Role names as they are now are expected to disappear, so it's not worth proposing changes in the application manifest, IMHO.

And another possibility is fixing the platform to not fail with a role that is bigger than 12 characters. Do we know where this limit comes from?

This patch is intended as a workaround while the actual problem is not fixed, to reach the release date.

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