Giter Site home page Giter Site logo

Comments (19)

bkonyi avatar bkonyi commented on August 21, 2024 4

I created a virtual D:\ drive on my cloudtop and it looks like I can reproduce:

PS D:\foo> dart pub global run coverage:test_with_coverage --package . --package-name foo
00:00 +0: loading test\foo_test.dart
00:00 +0: test\foo_test.dart: calculate
00:00 +1: All tests passed!

from coverage.

dcharkes avatar dcharkes commented on August 21, 2024

This seems to be an issue with Dart 3.4.0 stable, Dart 3.3.0 stable works fine.

from coverage.

liamappelbe avatar liamappelbe commented on August 21, 2024

Doesn't seem to have anything to do with the github bots. This user is seeing it locally: #489

from coverage.

rainyl avatar rainyl commented on August 21, 2024

It seems no Dart VM service will be started,

output of 3.19.6:

❯ dart pub global run coverage:test_with_coverage --package . --package-name opencv_dart
The Dart VM service is listening on http://127.0.0.1:8181/
The Dart DevTools debugger and profiler is available at: http://127.0.0.1:8181/devtools?uri=ws://127.0.0.1:8181/ws
00:00 +0: loading test\calib3d_test.dart

but with 3.22:

❯ dart pub global run coverage:test_with_coverage --package . --package-name opencv_dart
00:00 +0: loading test\calib3d_test.dart

Maybe that's why the tests are finished but it won't exit.

from coverage.

a-siva avatar a-siva commented on August 21, 2024

//cc @bkonyi , could some of the recent changes about how dds is started from the Dart CLI be contributing these hangs (from the comment above it appears that dds is not starting up.

from coverage.

bkonyi avatar bkonyi commented on August 21, 2024

Seems like I missed the CC for this. I'll take a look tomorrow.

from coverage.

bkonyi avatar bkonyi commented on August 21, 2024

I'm unable to reproduce at HEAD (Dart SDK version: 3.6.0-edge.5e8ee777729a34187815465ad756079dbe6d601a (main) (Tue Jul 9 14:50:59 2024 +0000) on "windows_x64"). Will try an older version to see if I can reproduce on 3.4.

from coverage.

bkonyi avatar bkonyi commented on August 21, 2024

I'm also unable to reproduce on 3.4.0 and 3.4.4.

from coverage.

bkonyi avatar bkonyi commented on August 21, 2024

I'm also unable to reproduce with the Dart SDK from Flutter's stable branch. I'll need more details about the environments we're seeing failures in to be able to make any progress on this.

from coverage.

a-siva avatar a-siva commented on August 21, 2024

I'm also unable to reproduce with the Dart SDK from Flutter's stable branch. I'll need more details about the environments we're seeing failures in to be able to make any progress on this.

Have you tried it on Windows because the original report in #489 indicated they saw it on Windows 10.

from coverage.

dcharkes avatar dcharkes commented on August 21, 2024

Here is a reproduction from GitHub actions, still hanging with the latest stable:

(Feel free to mess around with PRs on that repo adding stuff to .github/workflows/native.yaml.)

I have no clue what the environment is on the GitHub actions.

@rainyl Could you provide more details on what reproduces this locally for you?

Some observations from that report:

  • The dart is from a Flutter SDK
  • The local is zh-CN

from coverage.

dcharkes avatar dcharkes commented on August 21, 2024

Maybe we could try running GitHub actions locally with something like https://github.com/nektos/act.

from coverage.

bkonyi avatar bkonyi commented on August 21, 2024

I'm also unable to reproduce with the Dart SDK from Flutter's stable branch. I'll need more details about the environments we're seeing failures in to be able to make any progress on this.

Have you tried it on Windows because the original report in #489 indicated they saw it on Windows 10.

Yes, I've been running this on a Windows 11 cloudtop.

It looks like there could be two drives involved based on the GitHub action logs. Maybe the fact that the native repo is cloned on D:\ but the SDK is on C:\ is causing issues.

from coverage.

bkonyi avatar bkonyi commented on August 21, 2024

This should have been fixed by dart-lang/sdk@66b9bf5, which was CP'd into beta before the stable release. I'll need to investigate what's going on here...

However, I have confirmed that this is fixed at HEAD since we're using dart development-service to launch DDS rather than manually building a path to dds.dart.snapshot. Maybe it's just worth cherrypicking dart-lang/sdk@e82ff48 if we don't think it's too complicated? WDYT @a-siva?

from coverage.

a-siva avatar a-siva commented on August 21, 2024

However, I have confirmed that this is fixed at HEAD since we're using dart development-service to launch DDS rather than manually building a path to dds.dart.snapshot. Maybe it's just worth cherrypicking dart-lang/sdk@e82ff48 if we don't think it's too complicated? WDYT @a-siva?

The change itself looks very small and I agree it is worth cherry picking into the stable release to fix the issue. Hopefully the change has no other side effect.

from coverage.

bkonyi avatar bkonyi commented on August 21, 2024

So it looks like we might have to CP both dart-lang/sdk@e82ff48 and dart-lang/sdk@c1dc26a for this to be properly resolved.

However, the actual fix is actually fairly simple, and involves updating _getDevToolsAssetPath() in DDS to the following:

Uri _getDevToolsAssetPath() {
  final dartDir = File(Platform.executable).parent.path;
  final fullSdk = dartDir.endsWith('bin');
  return Uri.file(
    fullSdk
        ? path.absolute(
            dartDir,
            'resources',
            'devtools',
          )
        : path.absolute(
            dartDir,
            'devtools',
          ),
  );
}

This replaces the old logic for detecting artifacts in SDK, which was very similar to the logic found in the VM service before dart-lang/sdk@66b9bf5. This also fixes an exception that could be thrown on Windows when trying to call toFilePath() on the returned URI. Would it be possible to land the above change directly to beta/stable without a corresponding change on main to avoid having to CP two changes that introduce new functionality to get the fix?

from coverage.

rainyl avatar rainyl commented on August 21, 2024

@rainyl Could you provide more details on what reproduces this locally for you?

Sorry for the late reply

It looks like there could be two drives involved based on the GitHub action logs. Maybe the fact that the native repo is cloned on D:\ but the SDK is on C:\ is causing issues.

This is it, I developed on a virtual disk mounted as D:\ and the flutter SDK was installed in C:\ just like github actions.

Thanks for your efforts and hope this can be fixed soon so I can upgrade to newer version. ❤️

from coverage.

a-siva avatar a-siva commented on August 21, 2024

@rainyl will you be able to continue development with the work around of not using a different drive until Dart 3.5 beta 2 is released (I believe Jul 10th 2024 is the release date)?
Since the cherry pick into stable is not a direct cherry pick of a change made and tested in the main branch, but a special fix I would prefer if we did not do that.

from coverage.

rainyl avatar rainyl commented on August 21, 2024

@rainyl will you be able to continue development with the work around of not using a different drive until Dart 3.5 beta 2 is released (I believe Jul 10th 2024 is the release date)?
Since the cherry pick into stable is not a direct cherry pick of a change made and tested in the main branch, but a special fix I would prefer if we did not do that.

No problem, thanks~ 😄

from coverage.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.