GoogleCloudPlatform / cloud-code-vscode

Cloud Code for Visual Studio Code: Issues, Documentation and more
Other
420 stars 112 forks source link

extension incompatible with Dart/Flutter's pubspec.yaml #932

Open opyate opened 2 months ago

opyate commented 2 months ago

Type: Bug

When opening a Dart/Flutter project with the extension active, the project won't compile due to an error in the pubspec.yaml on the line containing publish_to: none, with error:

Matches multiple schemas when only one must validate.

image

Extension version: 2.17.0 VS Code version: Code 1.93.0 (4849ca9bdf9666755eb463db297b69e5385090e3, 2024-09-04T13:02:38.431Z) OS version: Linux x64 6.8.0-41-generic snap Modes:

System Info |Item|Value| |---|---| |CPUs|AMD Ryzen Threadripper PRO 5955WX 16-Cores (32 x 1800)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
webnn: disabled_off| |Load (avg)|1, 1, 1| |Memory (System)|503.55GB (489.71GB free)| |Process Argv|--no-sandbox . --crash-reporter-id 1cb5082b-76d7-4f37-ba57-d0845650061e| |Screen Reader|no| |VM|0%| |DESKTOP_SESSION|ubuntu| |XDG_CURRENT_DESKTOP|Unity| |XDG_SESSION_DESKTOP|ubuntu| |XDG_SESSION_TYPE|x11|
A/B Experiments ``` vsliv368cf:30146710 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscod805:30301674 binariesv615:30325510 vsaa593cf:30376535 py29gd2263:31024239 c4g48928:30535728 azure-dev_surveyone:30548225 2i9eh265:30646982 962ge761:30959799 pythongtdpath:30769146 welcomedialogc:30910334 pythonnoceb:30805159 asynctok:30898717 pythonmypyd1:30879173 h48ei257:31000450 pythontbext0:30879054 accentitlementsc:30995553 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 dsvsc021:30996838 945dj816:31013170 a69g1124:31058053 dvdeprecation:31068756 dwnewjupytercf:31046870 impr_priority:31102340 refactort:31108082 pythonrstrctxt:31112756 flighttreat:31134774 wkspc-onlycs-t:31132770 wkspc-ranged-c:31125598 cf971741:31134768 autoexpandse:31133494 fje88620:31121564 ```
slde12 commented 2 months ago

Hey @opyate, are you able to reproduce this error, and can you provide what states in problems tab, it can tell which extension/validator provides this error. And if possible can you provide full yaml file instead of just line 5 so that we can try to reproduce the error? thanks! image

opyate commented 2 months ago

Extensions:

For Flutter/Dart development, I have these two enabled:

This is the extension which is incompatible with the above two:

If I work on Flutter code, I have to disable the "Gemini Code Assist + Google Cloud Code" extension, and if I don't work on Flutter code, I have to disable the Dart/Flutter extensions to get Gemini code assist etc.

Problems tab

image

pubspec.yaml example

Here's a toy example you can open in vscode: https://github.com/opyate/flutter-bloc-example

It was generated with "Flutter: New Project" in vscode, if you want to start with the default skeleton:

image

slde12 commented 2 months ago

Thanks for the context, we are currently looking into it.

glouischandra commented 2 months ago

Hello @opyate looks like this is a bug in our yaml LS that mistakenly process pubspec.yaml, we currently don't support validation for flutter pubspec doc. We will disable it in the next release.