Skip to content

--experimental-faster-testing doesn't sanitize paths #161083

Closed

Description

@PiotrRogulski

Steps to reproduce

  1. Create a Flutter project with some tests
  2. Place it on a path that uses hyphens (for example, in a Git repository with a hyphenated name)
  3. Run flutter test --experimental-faster-testing

Expected results

Tests compile and run correctly.

Actual results

Files generated with the --experimental-faster-testing flag include invalid library names – those are based on the test files' paths. Paths can include characters that are invalid identifier characters, like hyphens.

Code sample

Example project for reference: https://github.com/PiotrRogulski/experimental-testing-app

Screenshots or Video

Screenshots / Video demonstration

(None)

Logs

Logs
$ flutter test --experimental-faster-testing --verbose
[   +2 ms] Could not interpret results of "git describe": 3.28.0-2.0.pre.38596
[  +14 ms] executing: sysctl hw.optional.arm64
[   +3 ms] Exit code 0 from: sysctl hw.optional.arm64
[        ] hw.optional.arm64: 1
[  +26 ms] executing: sw_vers -productName
[  +10 ms] Exit code 0 from: sw_vers -productName
[        ] macOS
[        ] executing: sw_vers -productVersion
[  +10 ms] Exit code 0 from: sw_vers -productVersion
[        ] 15.3
[        ] executing: sw_vers -buildVersion
[  +10 ms] Exit code 0 from: sw_vers -buildVersion
[        ] 24D5034f
[        ] executing: uname -m
[   +3 ms] Exit code 0 from: uname -m
[        ] arm64
[  +15 ms] Found 2 files which will be executed as Widget Tests.
[   +2 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ] Artifact Instance of 'LegacyCanvasKitRemover' is not required, skipping update.
[   +1 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +20 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.
[        ] Artifact Instance of 'GradleWrapper' is not required, skipping update.
[        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ] Artifact Instance of 'LegacyCanvasKitRemover' is not required, skipping update.
[        ] Artifact Instance of 'FlutterSdk' is not required, skipping update.
[        ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'PubDependencies' is not required, skipping update.
[  +32 ms] Skipping pub get: version match.
[  +84 ms] No packages with native assets. Skipping native assets compilation.
[        ] Writing native assets json to file:///Users/piotrrogulski/repos/experimental-testing-app/build/native_assets/macos/native_assets.json.
[   +1 ms] Writing /Users/piotrrogulski/repos/experimental-testing-app/build/native_assets/macos/native_assets.json done.
[  +66 ms] Stopping scan for flutter_test_config.dart; found project root at /Users/piotrrogulski/repos/experimental-testing-app
[        ] Stopping scan for flutter_test_config.dart; found project root at /Users/piotrrogulski/repos/experimental-testing-app
[        ] Compiling file:///Users/piotrrogulski/repos/experimental-testing-app/build/isolate_spawning_tester/child_test_isolate_spawner.dart
[   +3 ms] /Users/piotrrogulski/fvm/versions/master/bin/cache/dart-sdk/bin/dartaotruntime /Users/piotrrogulski/fvm/versions/master/bin/cache/dart-sdk/bin/snapshots/frontend_server_aot.dart.snapshot --sdk-root /Users/piotrrogulski/fvm/versions/master/bin/cache/artifacts/engine/common/flutter_patched_sdk/ --incremental --no-print-incremental-dependencies --target=flutter --experimental-emit-debug-metadata --output-dill /Users/piotrrogulski/repos/experimental-testing-app/build/isolate_spawning_tester/child_test_isolate_spawner.dill --packages /Users/piotrrogulski/repos/experimental-testing-app/build/isolate_spawning_tester/.dart_tool/package_config.json -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts --track-widget-creation --verbosity=error
[   +7 ms] <- compile file:///Users/piotrrogulski/repos/experimental-testing-app/build/isolate_spawning_tester/child_test_isolate_spawner.dart
[ +621 ms] build/isolate_spawning_tester/child_test_isolate_spawner.dart:10:84: Error: Expected ';' after this.
[   +1 ms] import '/Users/piotrrogulski/repos/experimental-testing-app/test/two_test.dart' as _Users_piotrrogulski_repos_experimental-testing-app_test_two_test;
[        ]                                                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[        ] build/isolate_spawning_tester/child_test_isolate_spawner.dart:10:123: Error: Expected a declaration, but got '-'.
[        ] import '/Users/piotrrogulski/repos/experimental-testing-app/test/two_test.dart' as _Users_piotrrogulski_repos_experimental-testing-app_test_two_test;
[        ]                                                                                           ^
[        ] build/isolate_spawning_tester/child_test_isolate_spawner.dart:10:124: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
[        ] Try adding the name of the type of the variable or the keyword 'var'.
[        ] import '/Users/piotrrogulski/repos/experimental-testing-app/test/two_test.dart' as _Users_piotrrogulski_repos_experimental-testing-app_test_two_test;
[        ]                                                                                           ^^^^^^^
[        ] build/isolate_spawning_tester/child_test_isolate_spawner.dart:10:124: Error: Expected ';' after this.
[        ] import '/Users/piotrrogulski/repos/experimental-testing-app/test/two_test.dart' as _Users_piotrrogulski_repos_experimental-testing-app_test_two_test;
[        ]                                                                                           ^^^^^^^
[        ] build/isolate_spawning_tester/child_test_isolate_spawner.dart:10:131: Error: Expected a declaration, but got '-'.
[        ] import '/Users/piotrrogulski/repos/experimental-testing-app/test/two_test.dart' as _Users_piotrrogulski_repos_experimental-testing-app_test_two_test;
[        ]                                                                                           ^
[        ] build/isolate_spawning_tester/child_test_isolate_spawner.dart:10:132: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
[        ] Try adding the name of the type of the variable or the keyword 'var'.
[        ] import '/Users/piotrrogulski/repos/experimental-testing-app/test/two_test.dart' as _Users_piotrrogulski_repos_experimental-testing-app_test_two_test;
[        ]                                                                                           ^^^^^^^^^^^^^^^^^
[        ] build/isolate_spawning_tester/child_test_isolate_spawner.dart:11:1: Error: Directives must appear before any declarations.
[        ] Try moving the directive before any declarations.
[        ] import '/Users/piotrrogulski/repos/experimental-testing-app/test/one_test.dart' as _Users_piotrrogulski_repos_experimental-testing-app_test_one_test;
[        ] ^^^^^^
[        ] build/isolate_spawning_tester/child_test_isolate_spawner.dart:11:84: Error: Expected ';' after this.
[        ] import '/Users/piotrrogulski/repos/experimental-testing-app/test/one_test.dart' as _Users_piotrrogulski_repos_experimental-testing-app_test_one_test;
[        ]                                                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[        ] build/isolate_spawning_tester/child_test_isolate_spawner.dart:11:123: Error: Expected a declaration, but got '-'.
[        ] import '/Users/piotrrogulski/repos/experimental-testing-app/test/one_test.dart' as _Users_piotrrogulski_repos_experimental-testing-app_test_one_test;
[        ]                                                                                           ^
[        ] build/isolate_spawning_tester/child_test_isolate_spawner.dart:11:124: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
[        ] Try adding the name of the type of the variable or the keyword 'var'.
[        ] import '/Users/piotrrogulski/repos/experimental-testing-app/test/one_test.dart' as _Users_piotrrogulski_repos_experimental-testing-app_test_one_test;
[        ]                                                                                           ^^^^^^^
[        ] build/isolate_spawning_tester/child_test_isolate_spawner.dart:11:124: Error: Expected ';' after this.
[        ] import '/Users/piotrrogulski/repos/experimental-testing-app/test/one_test.dart' as _Users_piotrrogulski_repos_experimental-testing-app_test_one_test;
[        ]                                                                                           ^^^^^^^
[        ] build/isolate_spawning_tester/child_test_isolate_spawner.dart:11:131: Error: Expected a declaration, but got '-'.
[        ] import '/Users/piotrrogulski/repos/experimental-testing-app/test/one_test.dart' as _Users_piotrrogulski_repos_experimental-testing-app_test_one_test;
[        ]                                                                                           ^
[        ] build/isolate_spawning_tester/child_test_isolate_spawner.dart:11:132: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
[        ] Try adding the name of the type of the variable or the keyword 'var'.
[        ] import '/Users/piotrrogulski/repos/experimental-testing-app/test/one_test.dart' as _Users_piotrrogulski_repos_experimental-testing-app_test_one_test;
[        ]                                                                                           ^^^^^^^^^^^^^^^^^
[        ] build/isolate_spawning_tester/child_test_isolate_spawner.dart:11:124: Error: 'testing' is already declared in this scope.
[        ] import '/Users/piotrrogulski/repos/experimental-testing-app/test/one_test.dart' as _Users_piotrrogulski_repos_experimental-testing-app_test_one_test;
[        ]                                                                                           ^^^^^^^
[        ] build/isolate_spawning_tester/child_test_isolate_spawner.dart:10:124: Context: Previous declaration of 'testing'.
[        ] import '/Users/piotrrogulski/repos/experimental-testing-app/test/two_test.dart' as _Users_piotrrogulski_repos_experimental-testing-app_test_two_test;
[        ]                                                                                           ^^^^^^^
[        ] build/isolate_spawning_tester/child_test_isolate_spawner.dart:50:152: Error: Can't use 'testing' because it is declared more than once.
[        ]       createChannelAndConnect('/Users/piotrrogulski/repos/experimental-testing-app/test/two_test.dart', route, _Users_piotrrogulski_repos_experimental-testing-app_test_two_test.main);
[        ]                                                                                           ^
[        ] build/isolate_spawning_tester/child_test_isolate_spawner.dart:50:112: Error: A prefix can't be used as an expression.
[        ]       createChannelAndConnect('/Users/piotrrogulski/repos/experimental-testing-app/test/two_test.dart', route, _Users_piotrrogulski_repos_experimental-testing-app_test_two_test.main);
[        ]                                                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[        ] build/isolate_spawning_tester/child_test_isolate_spawner.dart:52:152: Error: Can't use 'testing' because it is declared more than once.
[        ]       createChannelAndConnect('/Users/piotrrogulski/repos/experimental-testing-app/test/one_test.dart', route, _Users_piotrrogulski_repos_experimental-testing-app_test_one_test.main);
[        ]                                                                                           ^
[        ] build/isolate_spawning_tester/child_test_isolate_spawner.dart:52:112: Error: A prefix can't be used as an expression.
[        ]       createChannelAndConnect('/Users/piotrrogulski/repos/experimental-testing-app/test/one_test.dart', route, _Users_piotrrogulski_repos_experimental-testing-app_test_one_test.main);
[        ]                                                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[  +27 ms] <- accept
[        ] Compiling file:///Users/piotrrogulski/repos/experimental-testing-app/build/isolate_spawning_tester/child_test_isolate_spawner.dart took 663ms
[        ] Compiling file:///Users/piotrrogulski/repos/experimental-testing-app/build/isolate_spawning_tester/root_test_isolate_spawner.dart
[        ] /Users/piotrrogulski/fvm/versions/master/bin/cache/dart-sdk/bin/dartaotruntime /Users/piotrrogulski/fvm/versions/master/bin/cache/dart-sdk/bin/snapshots/frontend_server_aot.dart.snapshot --sdk-root /Users/piotrrogulski/fvm/versions/master/bin/cache/artifacts/engine/common/flutter_patched_sdk/ --incremental --no-print-incremental-dependencies --target=flutter --experimental-emit-debug-metadata --output-dill /Users/piotrrogulski/repos/experimental-testing-app/build/isolate_spawning_tester/root_test_isolate_spawner.dill --packages /Users/piotrrogulski/repos/experimental-testing-app/build/isolate_spawning_tester/.dart_tool/package_config.json -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts --track-widget-creation --verbosity=error
[   +5 ms] <- compile file:///Users/piotrrogulski/repos/experimental-testing-app/build/isolate_spawning_tester/root_test_isolate_spawner.dart
[ +466 ms] <- accept
[        ] Compiling file:///Users/piotrrogulski/repos/experimental-testing-app/build/isolate_spawning_tester/root_test_isolate_spawner.dart took 473ms
[   +1 ms] Using this directory for fonts configuration: /var/folders/cx/x_9fdh5j2mb0_wnjtg4d7pz40000gn/T/flutter_tools.ga59ss/flutter_test_fonts.WIaLuH
[        ] Starting flutter_tester process with command=[/Users/piotrrogulski/fvm/versions/master/bin/cache/artifacts/engine/darwin-x64/flutter_tester, --disable-vm-service, --enable-checked-mode, --verify-entry-points, --enable-software-rendering, --skia-deterministic-rendering, --enable-dart-profiling, --non-interactive, --use-test-fonts, --disable-asset-fonts, --packages=/Users/piotrrogulski/repos/experimental-testing-app/.dart_tool/package_config.json, --flutter-assets-dir=/Users/piotrrogulski/repos/experimental-testing-app/build/unit_test_assets, /Users/piotrrogulski/repos/experimental-testing-app/build/isolate_spawning_tester/root_test_isolate_spawner.dill], environment={FLUTTER_TEST: true, FONTCONFIG_FILE: /var/folders/cx/x_9fdh5j2mb0_wnjtg4d7pz40000gn/T/flutter_tools.ga59ss/flutter_test_fonts.WIaLuH/fonts.conf, APP_NAME: experimental_testing_app, UNIT_TEST_ASSETS: /Users/piotrrogulski/repos/experimental-testing-app/build/unit_test_assets}
[   +6 ms] Started flutter_tester process at pid 3606

00:00 +0: loading /Users/piotrrogulski/repos/experimental-testing-app/test/two_test.dart                                                                                                               [ERROR:flutter/shell/testing/tester_main.cc(674)] Unhandled exception
Exception: 'file:///Users/piotrrogulski/repos/experimental-testing-app/build/isolate_spawning_tester/child_test_isolate_spawner.dart': error: build/isolate_spawning_tester/child_test_isolate_spawner.dart:50:112: Error: A prefix can't be used as an expression.
      createChannelAndConnect('/Users/piotrrogulski/repos/experimental-testing-app/test/two_test.dart', route, _Users_piotrrogulski_repos_experimental-testing-app_test_two_test.main);
                                                                                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Stack trace: #0      main (file:///Users/piotrrogulski/repos/experimental-testing-app/build/isolate_spawning_tester/root_test_isolate_spawner.dart:85:55)
#1      _runMain.<anonymous closure> (dart:ui/hooks.dart:305:23)
#2      _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:315:19)
#3      _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:194:12)

[ +468 ms] flutter_tester process at pid 3606 exited with code=1
[        ] Runtime for phase TestRunner: Wall-clock: 0:00:01.625387; combined: 0:00:01.625407.
[        ] Runtime for phase Compile: Wall-clock: 0:00:01.136856; combined: 0:00:01.136894.
[        ] Runtime for phase Run: Wall-clock: 0:00:00.474527; combined: 0:00:00.474532.
[        ] Runtime for phase CoverageTotal: Wall-clock: 0:00:00.000000; combined: 0:00:00.000000.
[        ] Runtime for phase CoverageCollect: Wall-clock: 0:00:00.000000; combined: 0:00:00.000000.
[        ] Runtime for phase CoverageParseJson: Wall-clock: 0:00:00.000000; combined: 0:00:00.000000.
[        ] Runtime for phase CoverageAddHitmap: Wall-clock: 0:00:00.000000; combined: 0:00:00.000000.
[        ] Runtime for phase CoverageDataCollect: Wall-clock: 0:00:00.000000; combined: 0:00:00.000000.
[        ] Runtime for phase WatcherFinishedTest: Wall-clock: 0:00:00.000000; combined: 0:00:00.000000.
[   +4 ms] "flutter test" took 1,884ms.
[   +2 ms] 
           #0      throwToolExit (package:flutter_tools/src/base/common.dart:34:3)
           #1      TestCommand.runCommand (package:flutter_tools/src/commands/test.dart:715:7)
           <asynchronous suspension>
           #2      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1558:27)
           <asynchronous suspension>
           #3      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:19)
           <asynchronous suspension>
           #4      CommandRunner.runCommand (package:args/command_runner.dart:212:13)
           <asynchronous suspension>
           #5      FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:496:9)
           <asynchronous suspension>
           #6      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:19)
           <asynchronous suspension>
           #7      FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:431:5)
           <asynchronous suspension>
           #8      run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:98:11)
           <asynchronous suspension>
           #9      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:19)
           <asynchronous suspension>
           #10     main (package:flutter_tools/executable.dart:99:3)
           <asynchronous suspension>


[        ] Running 2 shutdown hooks
[   +1 ms] Shutdown hooks complete
[        ] exiting with code 1

Flutter Doctor output

Doctor output
[✓] Flutter (Channel master, 3.28.0-2.0.pre.38596, on macOS 15.3 24D5034f darwin-arm64, locale en-US)
    • Flutter version 3.28.0-2.0.pre.38596 on channel master at /Users/piotrrogulski/fvm/versions/master
    • Upstream repository [email protected]:flutter/flutter.git
    • Framework revision dbf9e32879 (7 hours ago), 2025-01-02 18:23:10 -0800
    • Engine revision dbf9e32879
    • Dart version 3.7.0 (build 3.7.0-267.0.dev)
    • DevTools version 2.41.0

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
    • Android SDK at /Users/piotrrogulski/Library/Android/sdk
    • Platform android-35, build-tools 35.0.0
    • Java binary at: /Users/piotrrogulski/Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
      This is the JDK bundled with the latest Android Studio installation on this machine.
      To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 21.0.4+-12422083-b607.1)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.2)
    • Xcode at /Applications/Xcode-16.2.0.app/Contents/Developer
    • Build 16C5032a
    • CocoaPods version 1.16.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2024.2.2)
    • Android Studio at /Users/piotrrogulski/Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 21.0.4+-12422083-b607.1)

[✓] VS Code (version 1.95.3)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.56.0

[✓] Connected device (3 available)
    • macOS (desktop)                 • macos                 • darwin-arm64   • macOS 15.3 24D5034f darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin         • macOS 15.3 24D5034f darwin-arm64
    • Chrome (web)                    • chrome                • web-javascript • Google Chrome 131.0.6778.205

[✓] Network resources
    • All expected network resources are available.

• No issues found!

Activity

  1. changed the title [-]`--experimental-faster-testing` [/-] [+]`--experimental-faster-testing` doesn't sanitize paths[/+] on Jan 3, 2025
  2. added
    in triagePresently being triaged by the triage team
    on Jan 6, 2025
  3. huycozy commented on Jan 6, 2025

    @huycozy
    Member

    Reproduced this issue on Flutter 3.27.1 as well. Perhaps this is related to #160685?

    [✓] Flutter (Channel stable, 3.27.1, on macOS 15.1 24B83 darwin-x64, locale en-VN)
        • Flutter version 3.27.1 on channel stable at /Users/huynq/Documents/GitHub/flutter
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision 17025dd882 (3 weeks ago), 2024-12-17 03:23:09 +0900
        • Engine revision cb4b5fff73
        • Dart version 3.6.0
        • DevTools version 2.40.2
  4. added
    a: tests"flutter test", flutter_test, or one of our tests
    toolAffects the "flutter" command-line tool. See also t: labels.
    has reproducible stepsThe issue has been confirmed reproducible and is ready to work on
    team-toolOwned by Flutter Tool team
    and removed
    in triagePresently being triaged by the triage team
    on Jan 6, 2025
  5. added
    P3Issues that are less important to the Flutter project
    triaged-toolTriaged by Flutter Tool team
    on Jan 7, 2025
  6. bkonyi commented on Jan 7, 2025

    @bkonyi
    Contributor
  7. added
    ⏳Bot is counting down the days until it unassigns the issue
    on May 13, 2025
  8. flutter-triage-bot commented on May 13, 2025

    @flutter-triage-bot

    This issue is assigned to @derekxu16 but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks!

  9. flutter-triage-bot commented on Jul 29, 2025

    @flutter-triage-bot

    This issue was assigned to @derekxu16 but has had no status updates in a long time. To remove any ambiguity about whether the issue is being worked on, the assignee was removed.

  10. removed
    ⏳Bot is counting down the days until it unassigns the issue
    on Jul 29, 2025
  11. vladimir-ionita commented on Aug 8, 2026

    @vladimir-ionita

    The hyphen case appears to be fixed on current beta/master.

    pathToImport in packages/flutter_tools/lib/src/test/runner.dart changed from an enumerated chain to a character-class regex:

    // 3.44.6 stable (runner.dart:277-282) — omits '-'
    .replaceAll('.', '_').replaceAll(':', '_').replaceAll('/', '_')
    
    // 3.47.0-0.4.pre beta (runner.dart:283) — covers all non-alphanumerics
    .replaceAll(RegExp(r'[^a-zA-Z0-9]'), '_')

    Verified present in 3.47.0-0.4.pre (034409942b) and absent in 3.44.6 (ee80f08bbf).

    One caveat before closing: fixing sanitization makes hyphenated paths reach a second, separate failure — package: self-imports fail to resolve, because PackageConfig.parseBytes is passed the project directory rather than the package_config.json URI. Filed separately as #190784. So a hyphenated-path project may still fail after this fix, for a different reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projecta: tests"flutter test", flutter_test, or one of our testsfound in release: 3.27Found to occur in 3.27found in release: 3.28Found to occur in 3.28has reproducible stepsThe issue has been confirmed reproducible and is ready to work onteam-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions