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

Problems with moving comments when automatically moving child arg to last parameter position of widget constructor #55662

Open
lukehutch opened this issue May 7, 2024 · 0 comments
Labels
analyzer-quick-fix area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@lukehutch
Copy link

I get The 'child' argument should be last in widget constructor invocations for this code:

image

Issue 1: Hitting Save moves child to the end, as expected. But the comment is lost:

image

Issue 2: If the comment is on a different line, it moves with the line (this is correct so far):

image

image

However, if there are only 2 lines, weirdly the parameters switch without moving the comment!

image

image

Workspace Environment
Dart Code extension: 3.89.20240501
Flutter extension: 3.89.20240501 (activated)

App: Visual Studio Code
App Host: desktop
Version: linux 1.89.0

Workspace type: Dart, Flutter (LSP) (Multiroot)

Dart (3.5.0-131.0.dev): /opt/flutter/bin/cache/dart-sdk
Flutter (3.22.0-23.0.pre.43): /opt/flutter (Chrome (web-javascript/web))

Output from 'dart info'

/opt/flutter/bin/cache/dart-sdk/bin/dart info

If providing this information as part of reporting a bug, please review the information
below to ensure it only contains things you're comfortable posting publicly.

General info

Project info

  • sdk constraint: '>=3.1.5'
  • dependencies: auto_size_text, boxy, bubble, cached_network_image, carousel_slider, chat_message_timestamp, collection, cronet_http, cross_file, cupertino_http, cupertino_icons, dart_emoji, delayed_display, device_info_plus, dio, dio_smart_retry, email_validator, exif, extended_image, file_picker, flutter, flutter_cache_manager, flutter_email_sender, flutter_google_maps_webservices, flutter_image_utilities, flutter_localizations, flutter_persistent_value_notifier, flutter_staggered_grid_view, flutter_svg, flutter_value_notifier_stateful_widget, fluttericon, fluttertoast, geocoding, geolocator, google_fonts, google_maps_flutter, google_maps_webapi, google_places_flutter, http, image_crop, image_picker, image_picker_android, image_picker_platform_interface, intl, jiffy, keep_keyboard_popup_menu, latlong2, line_awesome_flutter, logging, maps_launcher, material_dialogs, package_info_plus, path_provider, persistent_bottom_nav_bar_v2, pexels_api, pinch_to_zoom_scrollable, provider, serverpod_auth_apple_flutter, serverpod_auth_client, serverpod_auth_facebook_flutter, serverpod_auth_google_flutter, serverpod_auth_shared_flutter, serverpod_chat_client, serverpod_client, serverpod_flutter, serverpod_serialization, share_plus, shared_preferences, syncfusion_flutter_datepicker, timezone, url_launcher
  • dev_dependencies: flutter_launcher_icons, flutter_lints, flutter_test, lints
  • elided dependencies: 1

Process info

Memory CPU Elapsed time Command line
63 MB 0.0% 06:57:55 dart devtools --machine --allow-embedding --dtd-uri ws:/PQZ7GvZMuwldQqVn
1018 MB 0.0% 06:57:55 dart language-server --protocol=lsp --client-id=VS-Code --client-version=3.89.20240501
76 MB 0.0% 06:57:55 dart tooling-daemon --machine
84 MB 0.0% 06:57:55 flutter_tools.snapshot daemon
Output from 'flutter doctor'

/opt/flutter/bin/flutter doctor -v

[✓] Flutter (Channel master, 3.22.0-23.0.pre.43, on Fedora Linux 39 (Workstation Edition) 6.8.8-200.fc39.x86_64, locale en_US.utf8)
    • Flutter version 3.22.0-23.0.pre.43 on channel master at /opt/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision b8abc10689 (2 days ago), 2024-05-05 13:01:23 -0400
    • Engine revision 624dcb987f
    • Dart version 3.5.0 (build 3.5.0-131.0.dev)
    • DevTools version 2.35.0

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /home/luke/Android/Sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /opt/android-studio/jbr/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • clang version 17.0.6 (Fedora 17.0.6-2.fc39)
    • cmake version 3.27.7
    • ninja version 1.11.1
    • pkg-config version 1.9.5

[!] Android Studio (version unknown)
    • Android Studio at /opt/android-studio
    • 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
    ✗ Unable to determine Android Studio version.
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)

[✓] VS Code (version 1.89.0)
    • VS Code at /usr/share/code
    • Flutter extension version 3.89.20240501

[✓] VS Code (version 1.90.0-insider)
    • VS Code at /usr/share/code-insiders
    • Flutter extension version 3.79.20231130

[✓] Connected device (2 available)
    • Linux (desktop) • linux  • linux-x64      • Fedora Linux 39 (Workstation Edition) 6.8.8-200.fc39.x86_64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 124.0.6367.118

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

! Doctor found issues in 1 category.
@bwilkerson bwilkerson added area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. analyzer-quick-fix labels May 7, 2024
@srawlins srawlins added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) P2 A bug or feature request we're likely to work on labels May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-quick-fix area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

3 participants