Skip to content

Unsupported operation: Cannot add to an unmodifiable list in build.dart scripts #168

Closed
@dcharkes

Description

@dcharkes
  Unsupported operation: Cannot add to an unmodifiable list
  dart:_internal                                                UnmodifiableListMixin.addAll
  package:native_toolchain_c/src/cbuilder/cbuilder.dart 276:45  CBuilder.run
  ===== asynchronous gap ===========================
  test/cbuilder/cbuilder_cross_android_test.dart 132:3          buildLib
  ===== asynchronous gap ===========================
  test/cbuilder/cbuilder_cross_android_test.dart 46:24          main.<fn>

@parlough it seems we're running into unmodifiable list errors being thrown in various places because the default values for arguments are now not modifiable. Could you please submit a PR to make the defaults modifiable again (and test it with unit tests).

I'm not sure why this was not caught by the CI earlier. 🙈

Originally posted by @dcharkes in #161 (comment)

Also failing on roll into Dart SDK: https://ci.chromium.org/ui/p/dart/builders/ci.sandbox/pkg-linux-debug/18536/overview

Unsupported operation: Cannot add to an unmodifiable list
#0      UnmodifiableListMixin.addAll (dart:_internal/list.dart:129:5)
#1      CBuilder.run (package:native_toolchain_c/src/cbuilder/cbuilder.dart:276:45)
<asynchronous suspension>
#2      main (file:///b/s/w/ir/x/t/NRYGUQ/native_add/build.dart:21:3)
<asynchronous suspension>

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1A high priority bug; for example, a single project is unusable or has many test failurespackage:hooks

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions