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

Fix recursive copy while bundling #2419

Merged
merged 2 commits into from
Jun 7, 2024

Conversation

ealmloff
Copy link
Member

This PR changes dx bundle to copy individual assets instead of the whole dist directory to avoid recursively copying into itself

Fixes #2239

@ealmloff ealmloff added bug Something isn't working cli Related to the dioxus-cli program labels May 16, 2024
@SadCl0wn
Copy link

I tested this PR, and it does resolve the infinite copy.
But I now get this error tauri-apps/tauri#8929 when building the appimage
and I need to manually delete the folder dist/bundle between tries as the script get:

thread 'main' panicked at packages/cli/src/cli/bundle.rs:218:13:
Failed to bundle project: IoError(
    Os {
        code: 13,
        kind: PermissionDenied,
        message: "Permission denied",
    },
)

even thought the permission looked alright drwxr-xr-x@ - sadclown 21 mai 09:35 bundle (and the subfolders are the same).
I think the issue is that the bundle is in out_dir and there is no filter at packages/cli/src/cli/bundle.rs:163:31
tauri would delete the bundle folder content if it weren't in the bundle_settings.resources_map.
I got stuck on this when I tried to fix this issue myself ^^', that is why I didn't open a PR.

@jkelleyrtp jkelleyrtp added the backport PRs that should be back ported to the last release label Jun 7, 2024
@jkelleyrtp
Copy link
Member

I tested this PR, and it does resolve the infinite copy. But I now get this error tauri-apps/tauri#8929 when building the appimage and I need to manually delete the folder dist/bundle between tries as the script get:

thread 'main' panicked at packages/cli/src/cli/bundle.rs:218:13:
Failed to bundle project: IoError(
    Os {
        code: 13,
        kind: PermissionDenied,
        message: "Permission denied",
    },
)

even thought the permission looked alright drwxr-xr-x@ - sadclown 21 mai 09:35 bundle (and the subfolders are the same). I think the issue is that the bundle is in out_dir and there is no filter at packages/cli/src/cli/bundle.rs:163:31 tauri would delete the bundle folder content if it weren't in the bundle_settings.resources_map. I got stuck on this when I tried to fix this issue myself ^^', that is why I didn't open a PR.

I'm going to merge this PR and then open this as an issue - it could be an issue with the app image bundler that we need to do some upgrades to fix.

@jkelleyrtp jkelleyrtp merged commit 7efe4d0 into DioxusLabs:main Jun 7, 2024
9 checks passed
@ealmloff ealmloff deleted the fix-recursive-copy branch June 7, 2024 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport PRs that should be back ported to the last release bug Something isn't working cli Related to the dioxus-cli program
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bundle error on Linux: dx bundle copy the dist/bundle into itself endlessly
3 participants