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

[Regression] Immutable runtime fails to build #647

Closed
pwall2222 opened this issue Feb 13, 2025 · 2 comments
Closed

[Regression] Immutable runtime fails to build #647

pwall2222 opened this issue Feb 13, 2025 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@pwall2222
Copy link

Description

Commit 192a7b4 introduces a regression on immutable-runtime,

Inside components/runtime.rs, the link method got changed from a feature to a requirement on linux, so if you try to build immutable-runtime, it will error out, because the method was not intended for that feature.

#[cfg(platform_linux)]
pub fn link(&self) -> Result<()> {
use std::fs::{copy, create_dir_all};
use std::os::unix::fs::symlink;
use crate::storage::Storage;
let dirs = ProjectDirs::new()?;
let mut storage = Storage::load(&dirs)?;
self.uninstall()?;

Because obviously, immutable-runtime has no uninstall attribute.

#[cfg(not(feature = "immutable-runtime"))]
pub fn uninstall(&self) -> Result<()> {

Steps to Reproduce

Build with immutable-runtime.

Suggestion

Add immutable-runtime to Github action tests.

Additional Information

Cargo logs:

 > error[E0599]: no method named `uninstall` found for reference `&Runtime` in the current scope
 >    --> src/components/runtime.rs:365:14
 >     |
 > 365 |         self.uninstall()?;
 >     |              ^^^^^^^^^ method not found in `&Runtime`
@pwall2222 pwall2222 added the bug Something isn't working label Feb 13, 2025
@filips123
Copy link
Owner

I've already wanted to add this to GitHub Actions tests for some time, but couldn't really decide what's the best way of doing it. I guess it's now time...

Currently, linked runtime won't work on Nix because it relies on a specific hardcoded path to Firefox, but once it is improved to support arbitrary paths, it should be allowed together with immutable runtime to allow users to use a different Firefox version/fork as a runtime, right?

@filips123 filips123 moved this to To Do in PWAsForFirefox Feb 13, 2025
@filips123 filips123 added this to the 2.14.1 milestone Feb 13, 2025
@filips123 filips123 moved this from To Do to In Progress in PWAsForFirefox Feb 15, 2025
@github-project-automation github-project-automation bot moved this from In Progress to Done in PWAsForFirefox Feb 15, 2025
@filips123
Copy link
Owner

For now, I've disabled linked runtime when immutable runtime is enabled, so it should now build properly. I still haven't added immutable runtime to GitHub Actions though, as I want to have this version released soon, as it contains some other important fixes. But I plan to add it in the future, and also make immutable and linked runtime work together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

2 participants