Skip to content

Conversation

@tiziodcaio
Copy link
Contributor

Handle more cases; added to the extension's frontend. Needs testing rn.

Still defaults to `FFOX`
Copy link
Owner

@filips123 filips123 left a comment

Choose a reason for hiding this comment

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

Sorry for not reviewing this earlier. I was quite busy with some other things, and when I had time, I wanted to first address some more important issues.

I think the idea in general is fine. It should be tested more, but I can't currently do much work on the extension because of #747.

One thing that should also be tested is what happens when the runtime is updated to a new Firefox version. Appearently, there can be some problems in the FUSE OverlayFS method for runtime linking that when the user updates the runtime from a web app, it can "desync" from the source/global runtime and break (#715). So, it should be tested what happens here.

Support for BSD likely already works, just compilation checks need to be removed/adjusted. Linked runtime is actually also already used in Termux (#684), although with custom patches, but I plan to upstream them. macOS and Windows probably require more work.

Comment on lines +1106 to +1110
// Listen for use linked Runtime
document.getElementById('settings-use-linked-rt').addEventListener('change', async function () {
config.always_patch = this.checked
await setConfig(config)
})
Copy link
Owner

Choose a reason for hiding this comment

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

It seems handling the runtime path is missing here.

self.uninstall()?;

storage.config.use_linked_runtime = true;
storage.config.linked_runtime_path = FFOX.to_string();
Copy link
Owner

Choose a reason for hiding this comment

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

This probybly shouldn't override the user-configured path.

Comment on lines 281 to +289
/// Experimental: Use a linked runtime instead of downloading from Mozilla
#[cfg(target_os = "linux")]
#[clap(long)]
#[clap(long, short)]
pub link: bool,
/// Experimental: Use a linked runtime instead of downloading from Mozilla.
/// Optional: Path of my firefox runtime
#[cfg(target_os = "linux")]
#[clap(long, value_name = FFOX)]
pub path: String,
Copy link
Owner

Choose a reason for hiding this comment

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

Maybe it would be better if this is a single option/parameter that can optionally take a path. So, when firefoxpwa runtime install --link is ran, the default path is used (depending on the operating system, distribution, etc.), and when the user explicitly specifies firefoxpwa runtime install --link=SOME-PATH, that path is used instead.

This should probably also be reflected in the storage/config. So that the path is only stored when its explicitly set.

Comment on lines +1068 to +1069
document.getElementById('settings-use-linked-rt').checked = config.use_linked_runtime
document.getElementById('settings-settings-linked-rt-path').checked = config.linked_runtime_path
Copy link
Owner

Choose a reason for hiding this comment

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

runtime instead of rt for element IDs seems nicer.

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