Skip to content
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

digit-separators language feature not enabled ? #341

Closed
PiotrFLEURY opened this issue Dec 27, 2024 · 1 comment
Closed

digit-separators language feature not enabled ? #341

PiotrFLEURY opened this issue Dec 27, 2024 · 1 comment

Comments

@PiotrFLEURY
Copy link

Using digit-separators Dart language feature raise an error:

Could not format because the source could not be parsed:
line 23, column 17 of test/step_definitions.dart: This requires the 'digit-separators' language feature to be enabled.
   ╷
23 │         amount: 2_000,
   │                 ^^^^^
   ╵

This language feature has been enabled since Dart 3.6 as specified in the official documentation here

I ran a flutter-version in the CI and everything seems to be well configured. Right Flutter and Dart SDK versions.

Run flutter --version
  flutter --version
  shell: /usr/bin/bash -e {0}
  env:
    FLUTTER_ROOT: /opt/hostedtoolcache/flutter/stable-3.[2](https://github.com/PiotrFLEURY/freenance/actions/runs/12515017166/job/34911945331#step:4:2)7.1-x64
    PUB_CACHE: /home/runner/.pub-cache
Flutter [3](https://github.com/PiotrFLEURY/freenance/actions/runs/12515017166/job/34911945331#step:4:3).27.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 17025dd882 (11 days ago) • 202[4](https://github.com/PiotrFLEURY/freenance/actions/runs/12515017166/job/34911945331#step:4:4)-12-17 03:23:09 +0900
Engine • revision cb4b[5](https://github.com/PiotrFLEURY/freenance/actions/runs/12515017166/job/34911945331#step:4:5)fff73
Tools • Dart 3.6.0 • DevTools 2.40.2

Everything's works fine on my local machine using Flutter 3.27.1 and Dart 3.6.

flutter --version
Flutter 3.27.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 17025dd882 (il y a 11 jours) • 2024-12-17 03:23:09 +0900
Engine • revision cb4b5fff73
Tools • Dart 3.6.0 • DevTools 2.40.2

flutter analyze
Analyzing freenance...                                                  
No issues found! (ran in 1.3s)

Here is the CI run failing for more details: https://github.com/PiotrFLEURY/freenance/actions/runs/12515017166/job/34911945331

Here is my CI workflow file:

name: CI
on: push

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
    perform-checks:
        runs-on: ubuntu-latest
        steps:
            - name: Checkout
              uses: actions/checkout@v4
            - name: Set up Flutter
              uses: subosito/flutter-action@v2
              with:
                cache: true
            - name: Show Flutter version
              run: flutter --version
            - name: Get dependencies
              run: |
                flutter pub get
                flutter analyze
                dart format --set-exit-if-changed .
                flutter test
    build-android:
        needs: perform-checks
        runs-on: ubuntu-latest
        steps:
            - name: Checkout
              uses: actions/checkout@v4
            - name: Set up Java
              uses: actions/setup-java@v4
              with:
                distribution: 'temurin' # See 'Supported distributions' for available options
                java-version: '17'
            - name: Set up Flutter
              uses: subosito/flutter-action@v2
              with:
                cache: true
            - name: Build Android appbundle
              run: flutter build appbundle --debug 
    build-ios:
      needs: perform-checks
      runs-on: macos-latest
      steps:
          - name: Checkout
            uses: actions/checkout@v4
          - name: Set up Flutter
            uses: subosito/flutter-action@v2
            with:
              cache: true
          - name: Build ios
            run: flutter build ios --debug --no-codesign 

Did I miss something in the configuration ? Sounds strange to have two distinct behaviors using the same SDK version on both environments.

@PiotrFLEURY
Copy link
Author

Edit:

This is linked to an issue with the dart format command in the 3.6 version

I openned an issue dart-lang/sdk#59815

This is not caused by flutter-action => closing

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

No branches or pull requests

1 participant