-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
VS Code should never run dart pub
without asking
#52067
Comments
Have you noticed any pattern to when this happens? Dart-Code does try to detect the Dart SDK and disable any automatic running of It's possible this isn't covering all cases, but it's also possible we're triggering some other command that does an implicit I did hit these bogus errors a month or two back (the fix is to delete the I'll do some testing and see if I can find a way to trigger this. If anyone knows of any steps that might lead to it, please let me know! |
I believe that the automatic running of |
Yeah, changes for #50422 were reverted. Although I think It's possible the recent instance of this I saw was related to those (now-reverted) changes though. It would be nice if there was some flag in the SDK that just preventing |
I'm using a locally-built SDK that was definitely from after the revert, so I'm pretty sure it's not |
Some more information: this morning I added a new SDK folder ( Then I opened the file I then added a Then I clicked the Now, if I touch the analysis server pubspec file, the VSCode plug-in automatically runs All of this is using the SDK as of fa3a72f (which is after the changes for #50422 were reverted). So, to summarize:
|
@stereotype441 thanks! I wouldn't have expected you to have even seen the "Some packages are missing or out of date" prompt - it should all be disabled. I'll do some testing, but could you confirm what your .code-workspace looks like? Where does the file live, and what folders do you have in it? I presume there's nothing you'd consider unusual about your SDK checkout (eg. it's complete and has a Edit:
This definitely suggests we didn't detect your workspace as being the Dart SDK. I'll take a look. |
The workspace settings JSON file lives in my home directory ( The contents of that file look like this:
My SDK checkout is slightly unusual in that it's a linked worktree (see git worktree documentation). This means that instead of having a
|
Aha, that'll be it. I see I'm explicitly checking for a folder. I've opened Dart-Code/Dart-Code#4501 for fixing this, and also Dart-Code/Dart-Code#4502 to track whether we can relax the restrictions on disabling the test runner for the SDK. I also just noticed that in the analysis server to suppress |
That's interesting. On the one hand, I can see the benefit to consistency between the analysis server and the VSCode plug-in. On the other hand, DEPS is a part of Google open-source infrastructure that's potentially used by other teams, so there's a risk that if we check for it, the check will be overly broad. On the other other hand, I really like it when we can make the experience of the SDK developers as consistent as possible with the experience of our customers, because it means we do a better job of "eating our own dog food" and finding bugs that customers will care about. So even though I do agree that it's a little weird for tools to be automatically run |
For now I've left the check as-is, but allow I don't think there's anything more to do here now that's fixed (via Dart-Code/Dart-Code#4501), although it would definitely be nice if we could agree an official way to mark (perhaps in a pubspec.yaml?) that a project is not using @scheglov are you happy for me to close this, or do you think we need more control of this for non-SDK projects too? (there are some existing settings to disable things like |
Specifically, I think it should not do this in Dart SDK at all.
See https://dart-review.googlesource.com/c/sdk/+/295661
@bwilkerson @DanTup
The text was updated successfully, but these errors were encountered: