Skip to content

feature: Bump native assets cli and fix bug #26

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

shigomany
Copy link

Hello @knopp!

In this PR I upgraded dependencies for native_assets_cli: ^0.11.0 and fixed breaking changes.

Also I fixed build for macos how you did #17

@shigomany
Copy link
Author

@knopp Hello, can you look this PR?

@knopp
Copy link
Contributor

knopp commented Feb 26, 2025

Hi,

apologize for the delay. Any chance you can upgrade the android project so that we can get the CI to pass?

@shigomany
Copy link
Author

I will try

@knopp
Copy link
Contributor

knopp commented Feb 27, 2025

The windows/android build fails with

note: LINK : fatal error LNK1104: cannot open file 'C:\Users\runneradmin\AppData\Local\Temp\buildTest7b4e55e7\example\.dart_tool\native_assets_builder\flutter_package\b103937344817a215e0bf659ea2693d1\out\native_toolchain_rust\release\build\crossbeam-utils-f1a05392829293ae\build_script_build-f1a05392829293ae.exe'

I'm guessing it's because the path has 261 characters, which requires windows long path support? But I thought it is enabled in the runner images.

@knopp
Copy link
Contributor

knopp commented Feb 27, 2025

Does visual studio linker still not support long paths?

logger: logger,
);
}
// final effectiveBuildMode = release ? BuildMode.release : BuildMode.debug;
Copy link
Contributor

Choose a reason for hiding this comment

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

If this is not needed it should be removed.

Copy link
Contributor

@knopp knopp left a comment

Choose a reason for hiding this comment

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

Couple of nits. Once addressed I think I'll merge this and then figure out how to shorten the build paths so that the build passes on windows.

@@ -135,7 +133,10 @@ class RustBuilder {
final String cratePath;

/// Build config provided to the build callback from `native_assets_cli`.
final BuildConfig buildConfig;

// final BuildOutputBuilder outputBuilder;
Copy link
Contributor

Choose a reason for hiding this comment

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

Same thing. If not needed should be removed.

@shigomany
Copy link
Author

Couple of nits. Once addressed I think I'll merge this and then figure out how to shorten the build paths so that the build passes on windows.

I found general issue about it in Cargo rust-lang/cargo#9770

I also found interesting topic about it here rust-lang/cargo#7986 (comment)

I tried reproduce it in my package with your package, but I got error compilation via rustup. Maybe you can do it. I'll try this later.

@shigomany
Copy link
Author

shigomany commented Mar 9, 2025

You right it's issue related with linker MSVC.

I don't know how to resolve it in CI because I didn't work with CI GItlab.

I mistakenly thought it was related to rustup.

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