Repository navigation
[flutter_tools] maintain file manifest for create - #59706
Conversation
|
This is an attempt at the smallest possible change to prevent the bug without doing any large refactoring to create. I'd be interested to get your thoughts @christopherfujino @jmagman future changes could be a little smarter than this... |
|
Friendly ping @jmagman @christopherfujino |
| return Set<Uri>.from( | ||
| (manifest['files'] as List<Object>) | ||
| .cast<String>() | ||
| .map<Uri>((String path) => Uri.file(globals.fs.path.join(flutterToolsAbsolutePath, path))), |
There was a problem hiding this comment.
if that string is not a valid path, Uri.file() will throw. I'm thinking we should catch that, especially since we're re-constructing the absolute path.
There was a problem hiding this comment.
oh wait, nvm. i see the manifest is checked in.
| // We are only interesting in template *file* URIs. | ||
| continue; | ||
| } | ||
| if (_templateManifest != null && !_templateManifest.contains(Uri.file(entity.absolute.path))) { |
There was a problem hiding this comment.
Can we add logging, or metrics for this?
| final Set<Uri> activeTemplateList = Directory('templates') | ||
| .listSync(recursive: true) | ||
| .whereType<File>() | ||
| .where((File file) => path.basename(file.path) != 'template_manifest.json') |
There was a problem hiding this comment.
For those of us on Macs, can you also ignore .DS_Store?
00:03 +0 -1: Check template manifest is up to date [E]
Expected: empty
Actual: Set:[
Uri:templates/.DS_Store,
Uri:templates/app/ios-swift.tmpl/.DS_Store,
Uri:templates/module/ios/library/.DS_Store
]
There was a problem hiding this comment.
I always forget about .DS_Store
christopherfujino
left a comment
There was a problem hiding this comment.
I see nothing obviously wrong. LGTM, though I'd like Jenn's approval too.
LGTM too, I'll run it again locally after the DS_Store update and approve. |
|
Started Google testing for this PR |
|
Google testing passed! |
First pass at fixing flutter#57985 and implementing flutter#59602 This doesn't have enough metadata to be useful for IDEs yet, but it prevents the issue from getting worse while we iterate on it.
Description
First pass at fixing #57985 and implementing #59602
This doesn't have enough metadata to be useful for IDEs yet, but it prevents the issue from getting worse while we iterate on it.