cfjedimaster / brackets-caniuse

A CanIUse.com extension for Brackets
40 stars 12 forks source link

Will show incorrect error messages in Brackets Sprint 34 #8

Closed peterflynn closed 10 years ago

peterflynn commented 11 years ago

The line FileUtils.showFileOpenError(error.name, dataFile) will no longer show the correct error message as of the next release of Brackets due to file system API changes. It should be changed to FileUtils.showFileOpenError(error, dataFile).

You can release a new version marked for Sprint 34+ in advance if you want, since users of Brackets Sprint 33 (the current release) will still be able to install the older version of your extension that is compatible with their build. It should also be possible to write code that sniffs the type of error (e.g. check whether error.name is truthy) so it will work across all versions.

See this discussion thread for more background on the API changes.

peterflynn commented 11 years ago

Re the sniffing: if you wanted to go that route, I think FileUtils.showFileOpenError(error.name || error, path) should work for all versions.

peterflynn commented 11 years ago

This extension also uses one deprecated API, NativeFileSystem.FileEntry.

This API should continue to work in Brackets Sprint 34, so you do not necessarily need to clean it up at the same time as fixing the breaking changes above. But the deprecated APIs will go away by the end of this year, so you should migrate away from them as soon as you have time (see same migration guide as above).

cfjedimaster commented 10 years ago

Addressed in latest update.