Skip to content

[native_assets_cli] Protocol exit codes / unhandled exceptions #33

Closed
@dcharkes

Description

@dcharkes

I'm leaning towards specifying hooks will always be run as a separate process, and non-zero exit code means error.

We need to specify whether build.dart is always run as a separate process.
And we need to specify the failure modes for a build. (e.g. 0-zero exit code for an unhandled exception.)
E.g. what happens if a build succeeds at first, and then fails later. Who is responsible for deleting the outdated build_output.yaml? (The Dart / Flutter SDK.)

We could consider using Isolate.spawnUri to invoke build.dart scripts rather than Process.run.

  • This would mean build.dart scripts should not call exit(int).
    It would probably also mean we need to think about what to do with unhandled exceptions.
  • Doing this would isolate the builds less.
  • Doing this might speed up the builds slightly (we'd still need to JIT from source every time, so we'd only be saving the Dart VM C++ process startup)

I believe it's probably best to use process isolation for the builds and not run them as Isolate.spawnUri

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions