Comments (19)
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.
This seems to be an issue with Dart 3.4.0 stable, Dart 3.3.0 stable works fine.
from coverage.
Doesn't seem to have anything to do with the github bots. This user is seeing it locally: #489
from coverage.
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.
//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.
Seems like I missed the CC for this. I'll take a look tomorrow.
from coverage.
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.
I'm also unable to reproduce on 3.4.0
and 3.4.4
.
from coverage.
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.
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.
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.
Maybe we could try running GitHub actions locally with something like https://github.com/nektos/act.
from coverage.
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.
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.
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 todds.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.
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 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.
@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 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)
- incorrect branch and line coverage with const values HOT 1
- Add `--fail-under` option
- LCOV relative paths HOT 1
- No Coverage Generated
- Fix BRDA syntax in lcov files HOT 3
- Enable firehose for publishing from GitHub actions
- Clean up old SDK/VmService checks
- Tests with `Isolate.run` pause indefinitely. HOT 6
- Ignore like `// coverage:ignore-start` does not work HOT 1
- bug: `format_coverage` does now work when invoked with `dart pub global run`
- cover code for kIsWeb condition true and false both cases
- Test coverage doesn't work when using pattern matching to destructure a record HOT 1
- How to run coverage for multiple packages in a mono_repo HOT 1
- Coverage not reported correctly for too many line hits HOT 1
- test_with_coverage won't exit on flutter 3.22.0
- Add a tool to find uncovered files
- --scope-output does not work HOT 2
- Remove old `_versionCheck`s HOT 1
- Allow specifying coverage flags via a yaml file
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coverage.