-
Notifications
You must be signed in to change notification settings - Fork 26.7k
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
Flutter "version" file in repo root is missing and being created then deleted by the tool on branches named master/main #142521
Comments
This is very odd... I can repro running from source and added some
And nothing in the I'll try to debug a bit more shortly... This could be a big issue if widespread, because VS Code uses this version to switch quite a bit of Dart-Code functionality. |
@christopherfujino here is the issue:
The files are being deleted by:
Stack trace is like:
It's created here on line 311 and then deleted because of the call on line 338: Doesn't seem to affect beta, but I haven't yet figured out why, since most of the code seems the same. |
Ok, the reason this doesn't happen on beta is because of this early exit, which prevents the constructor running that deletes the file: flutter/packages/flutter_tools/lib/src/version.dart Lines 172 to 174 in ccb2b44
So the issue is isolated to branches named |
Thanks for the detailed report and analysis. Labeling this for tracking. |
@christopherfujino leaving to you for prioritizing |
Not sure if it's the same thing, but I just noticed that the GitHub actions are often failing the coverage step because the Flutter version is reported as 0.0.0-unknown: Example: https://github.com/flutter/flutter/actions/runs/8999603670/job/24722091985 |
TIL we try to upload coverage from actions |
Steps to reproduce
I'm on the latest
master
(commit ccb2b44) and I noticed a number of things not working as expected in VS Code. It turns out, Dart-Code thinks I'm on Flutter version 0.0.0 and is therefore disabling all functionality that requires a specific Flutter version. This seems to be because I don't have theversion
file in the repo root.I found #133097 while searching which seems to describe the same issue, however I'm on a much newer version than that (cc @christopherfujino )
Expected results
There should be a file named
version
in the root of the repository.Actual results
There is no file.
Code sample
N/A
Screenshots or Video
Logs
No response
Flutter Doctor output
The text was updated successfully, but these errors were encountered: