google / process.dart

BSD 3-Clause "New" or "Revised" License
52 stars 26 forks source link

Added the `ProcessException` class. #16

Closed cedx closed 5 years ago

cedx commented 6 years ago

Fixes issue #7. EDIT: also fixes a CI issue ("Options file not found: .analysis_options").

cedx commented 6 years ago

You are right. I'm completely OK for exporting the ProcessException class and a few others from dart:io: that's what I'm doing currently.

I think a good abstraction should export whatever is required to avoid the direct usage of the dart:io library. Like what is done by the file package.

Unfortunately, we can't export the Process class itself: unlike the ProcessException class, it contains code tied to the Dart VM (and I'm using the process package for isomorphic Dart/Node.js apps).

Instead, we should export an abstract class (i.e. an interface) having the same API (backed by the dart:io class in the LocalProcessManager class).

cedx commented 5 years ago

Closing this PR as using the ProcessException class from dart:io is fine (and I do not have enough free time anyway to finish it :sweat_smile:).