Skip to content

add workflows and examples, fix macos test, make enableVisibility def… #3

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

Merged
merged 9 commits into from
Mar 8, 2025

Conversation

rainyl
Copy link
Owner

@rainyl rainyl commented Feb 25, 2025

  • add workflows and examples
  • fix macos test
  • make enableVisibility defaults to true

@rainyl
Copy link
Owner Author

rainyl commented Mar 6, 2025

It seems cmake will test whether the compiler is usable when generating, and not sure why the native-assets-invoked process cant exit normally.

image

image

image

@rainyl
Copy link
Owner Author

rainyl commented Mar 7, 2025

@dcharkes
would you mind to help and take a look at the failure on windows?

It's strange that running cmake using runProcess (or Process.run, Process.runSync) inside test file is okay, but failing when invoked by dart --enable-experiment=native-assets run on Windows.

steps to reproduce:

  • git clone https://github.com/rainyl/native_toolchain_cmake
  • cd native_toolchain_cmake
  • gh pr checkout 3
  • dart run run_cmake_process.dart // okay
  • cd examples/add
  • dart --enable-experiment=native-assets test test/cmake_builder_test.dart // okay
  • dart --enable-experiment=native-assets run bin/add.dart // stucks

P.S., To show the problem concisely, example/add/hook/build.dart is not a real build script, just run the generating command of cmake.

P.S.1, We can just focus on windows, since the build script is not complete, it fails on other platforms, it's expected.

P.S.2, I have tried both stable (Flutter 3.29.0) and master (Flutter 3.30.0-1.0.pre.485) channels, but without luck. flutter doctor:

[√] Flutter (Channel master, 3.30.0-1.0.pre.485, on Microsoft Windows [Version 10.0.26100.3323], locale zh-CN) [3.1s]
    • Flutter version 3.30.0-1.0.pre.485 on channel master at C:\Users\rainy\scoop\persist\fvm\versions\master
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 78d5a95a52 (16 hours ago), 2025-03-05 21:10:42 -0500
    • Engine revision 78d5a95a52
    • Dart version 3.8.0 (build 3.8.0-149.0.dev)
    • DevTools version 2.43.0

[√] Windows Version (11 家庭中文版 64-bit, 24H2, 2009) [5.7s]

[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.12.4) [100ms]
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.12.35707.178
    • Windows 10 SDK version 10.0.26100.0

@rainyl rainyl mentioned this pull request Mar 7, 2025
@dcharkes
Copy link

dcharkes commented Mar 7, 2025

  • dart --enable-experiment=native-assets test test/cmake_builder_test.dart // okay
  • dart --enable-experiment=native-assets run bin/add.dart // stucks

That's curious. They should use the exact same code-path:

https://github.com/dart-lang/sdk/blob/fb137ff73eb335723144c4de26d5a8bd46198668/pkg/dartdev/lib/src/commands/run.dart#L393-L394

https://github.com/dart-lang/sdk/blob/fb137ff73eb335723144c4de26d5a8bd46198668/pkg/dartdev/lib/src/commands/test.dart#L68-L69

Does this also reproduce on the dart executable from the Dart standalone SDK instead of the Flutter SDK? (Flutter wraps dart.exe in some kind of self-updating-script.)

And if you change the order which one gets stuck?

@rainyl
Copy link
Owner Author

rainyl commented Mar 7, 2025

Thanks for your reply 😄

Does this also reproduce on the dart executable from the Dart standalone SDK instead of the Flutter SDK? (Flutter wraps dart.exe in some kind of self-updating-script.)

I have just tried dart sdk downloaded from https://dart.dev/get-dart/archive#stable-channel but without luck.

image

And if you change the order which one gets stuck?

The order of

  1. dart --enable-experiment=native-assets test test/cmake_builder_test.dart // okay
  2. dart --enable-experiment=native-assets run bin/add.dart // stucks

doesn't matter, option 1 always okay and option 2 always stucks.

I think this problem is same as dart-lang/native#2077 , so let's discuss there.

@rainyl rainyl merged commit d9823d7 into main Mar 8, 2025
11 checks passed
@rainyl rainyl deleted the workflows branch March 17, 2025 11:29
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