dart_spawner 1.2.0
dart_spawner: ^1.2.0 copied to clipboard
Runs a Dart script/File/Uri inside a new Isolate of the current Dart VM. It also can spawn a Dart File from another Dart project/package into the current Dart VM.
1.2.0 #
-
DartSpawner:- Honour the
startupTimeoutconstructor parameter (it was ignored), and use it for the managed (usesSpawnedMain) startup instead of a fixed 45s. - An uncaught error in the spawned isolate now completes
exitCodewithuncaughtErrorExitCode(255, as thedartcommand) instead of0. The error is available atuncaughtError(aRemoteError). - A failure to spawn (
IsolateSpawnException, startup timeout, managed script exiting before callingspawnedMain) closes the isolate ports, kills the isolate, completesexitCodewith 255 and is available atspawnError. - Managed scripts:
exitCodealso completes when the isolate exits without reportingstopped;SpawnedIsolate.stopwaits for the script'sstopcallback (up tomanagedStopTimeout) and then kills the isolate. - Fix the Dart VM detection, which rejected VM service protocol versions
with a
0minor version.
- Honour the
-
DartProject:- Added
projectResolutionDirectory: supports pub workspace members (resolution: workspace), resolvingprojectPackageConfigUriandprojectPubspecLockFileat the workspace root. existsProjectPackageConfigUri: returnfalse(instead of throwing) when the project directory is resolved asynchronously.
- Added
-
SpawnedIsolate: fix a concurrent modification error whenstopis called after the isolate finished. -
Tests: unit tests for the tools, extensions and
DartProject; integration tests spawning scripts,Files andUris, error propagation, managed scripts, a separate project and a pub workspace member. -
Dart CI:
actions/checkout@v7,codecov/codecov-action@v7. -
sdk: ^3.13.0
-
path: ^1.9.1
-
yaml: ^3.1.4
-
async_extension: ^1.2.23
-
lints: ^6.1.0
-
test: ^1.33.0
-
dependency_validator: ^5.1.0
-
coverage: ^1.16.0
1.1.0 #
-
Dart CI: update and optimize jobs.
-
sdk: '>=3.0.0 <4.0.0'
-
path: ^1.8.3
-
yaml: ^3.1.2
-
async_extension: ^1.2.4
-
lints: ^2.1.1
-
test: ^1.24.6
-
dependency_validator: ^3.2.2
-
coverage: ^1.6.3
1.0.6 #
- Added environment variable:
- DART_SPAWNER_DEBUG
- DART_SPAWNER_STARTUP_TIMEOUT
- DART_SPAWNER_ISOLATE_CHECK_PING_TIMEOUT
1.0.5 #
- Renamed
runCommandtorunProcess.- Returns a
ProcessInfo.
- Returns a
- Added
runDartVM, to start a new Dart VM.
1.0.4 #
DartProject.cleanDartPubGetGeneratedFiles:- Fix
deleteDirectory.
- Fix
1.0.3 #
projectPackageConfigUri:- Return
.dart_tool/package_config.json, since.packagesis deprecated.
- Return
- Added
runDartPubGet,ensureProjectDependenciesResolved,existsProjectPackageConfigUriandcleanDartPubGetGeneratedFiles. - Improve tests:
- Test spawn of file in a different project (
test/test_project), with different dependencies.
- Test spawn of file in a different project (
- Change package
pedantic(deprecated) tolints. - lints: ^1.0.1
1.0.2 #
- Improved
spawnedMainconsole logging.
1.0.1 #
- Adjust package description.
- Adjust
README.md.- Added
codecov.iobadge.
- Added
1.0.0 #
- Support to spawn Dart entry points: script, file and Uri.
- Allow the use of another project/package dependencies while running a spawned Dart entry point.
- Added code coverage.
- Initial version.