Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build_runner: Failed to precompile build script .dart_tool/build/entrypoint/build.dart. #3412

Closed
ykmnkmi opened this issue Nov 23, 2022 · 6 comments

Comments

@ykmnkmi
Copy link

ykmnkmi commented Nov 23, 2022

Dart SDK version: 2.19.0-374.1.beta (beta) (Tue Nov 15 07:44:30 2022 -0800) on "windows_x64"

PS ...\angular\ngforms> dart run build_runner build --fail-on-severe
Building package executable...
Built build_runner:build_runner.
[INFO] Generating build script completed, took 470ms
[WARNING] .../Pub/Cache/hosted/pub.dev/build_modules-4.0.6/lib/src/module_cache.dart:21:70: Error: The method 'toJson' isn't defined for the class 'Object?'.
 - 'Object' is from 'dart:core'.
Try correcting the name to the name of an existing method, or defining a method named 'toJson'.
    (m) => MetaModule.fromJson(_deserialize(m)), (m) => _serialize(m.toJson()));
                                                                     ^^^^^^
.../Pub/Cache/hosted/pub.dev/build_modules-4.0.6/lib/src/module_cache.dart:24:66: Error: The method 'toJson' isn't defined for the class 'Object?'.
 - 'Object' is from 'dart:core'.
Try correcting the name to the name of an existing method, or defining a method named 'toJson'.
    (m) => Module.fromJson(_deserialize(m)), (m) => _serialize(m.toJson()));
                                                                 ^^^^^^
[INFO] Precompiling build script... completed, took 1.4s
[SEVERE] Failed to precompile build script .dart_tool/build/entrypoint/build.dart.
This is likely caused by a misconfigured builder definition.

After adding generic types here, the errors have been fixed:

// ...\Pub\Cache\hosted\pub.dev\build_modules-4.0.6\lib\src\module_cache.dart

final metaModuleCache = DecodingCache.resource</* here */ MetaModule>(
    (m) => MetaModule.fromJson(_deserialize(m)), (m) => _serialize(m.toJson()));

final moduleCache = DecodingCache.resource</* here */ Module>(
    (m) => Module.fromJson(_deserialize(m)), (m) => _serialize(m.toJson()));
pubspec.lock
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
  _fe_analyzer_shared:
    dependency: transitive
    description:
      name: _fe_analyzer_shared
      sha256: "4897882604d919befd350648c7f91926a9d5de99e67b455bf0917cc2362f4bb8"
      url: "https://pub.dev"
    source: hosted
    version: "47.0.0"
  analyzer:
    dependency: "direct dev"
    description:
      name: analyzer
      sha256: "690e335554a8385bc9d787117d9eb52c0c03ee207a607e593de3c9d71b1cfe80"
      url: "https://pub.dev"
    source: hosted
    version: "4.7.0"
  archive:
    dependency: transitive
    description:
      name: archive
      sha256: ed7cc591a948744994714375caf9a2ce89e1d82e8243997c8a2994d57181c212
      url: "https://pub.dev"
    source: hosted
    version: "3.3.5"
  args:
    dependency: transitive
    description:
      name: args
      sha256: b003c3098049a51720352d219b0bb5f219b60fbfb68e7a4748139a06a5676515
      url: "https://pub.dev"
    source: hosted
    version: "2.3.1"
  async:
    dependency: transitive
    description:
      name: async
      sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0
      url: "https://pub.dev"
    source: hosted
    version: "2.10.0"
  bazel_worker:
    dependency: transitive
    description:
      name: bazel_worker
      sha256: "500584fdb80bcb70a2990a5838338a757cc24bbf27d88bf791cbe9461c57cd5a"
      url: "https://pub.dev"
    source: hosted
    version: "1.0.2"
  boolean_selector:
    dependency: transitive
    description:
      name: boolean_selector
      sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
      url: "https://pub.dev"
    source: hosted
    version: "2.1.1"
  build:
    dependency: transitive
    description:
      name: build
      sha256: "3fbda25365741f8251b39f3917fb3c8e286a96fd068a5a242e11c2012d495777"
      url: "https://pub.dev"
    source: hosted
    version: "2.3.1"
  build_config:
    dependency: transitive
    description:
      name: build_config
      sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1
      url: "https://pub.dev"
    source: hosted
    version: "1.1.1"
  build_daemon:
    dependency: transitive
    description:
      name: build_daemon
      sha256: "6bc5544ea6ce4428266e7ea680e945c68806c4aae2da0eb5e9ccf38df8d6acbf"
      url: "https://pub.dev"
    source: hosted
    version: "3.1.0"
  build_modules:
    dependency: transitive
    description:
      name: build_modules
      sha256: "48946ee056939d50a9466babe24333c738526310e744a2498f02f86f084f24d8"
      url: "https://pub.dev"
    source: hosted
    version: "4.0.5"
  build_resolvers:
    dependency: transitive
    description:
      name: build_resolvers
      sha256: "687cf90a3951affac1bd5f9ecb5e3e90b60487f3d9cdc359bb310f8876bb02a6"
      url: "https://pub.dev"
    source: hosted
    version: "2.0.10"
  build_runner:
    dependency: "direct dev"
    description:
      name: build_runner
      sha256: "6f48c61a9dcd2c3a9e62d3dcdab1ba382790e2f31026288cbabe55d6003c9c23"
      url: "https://pub.dev"
    source: hosted
    version: "2.3.2"
  build_runner_core:
    dependency: transitive
    description:
      name: build_runner_core
      sha256: "14febe0f5bac5ae474117a36099b4de6f1dbc52df6c5e55534b3da9591bf4292"
      url: "https://pub.dev"
    source: hosted
    version: "7.2.7"
  build_test:
    dependency: "direct dev"
    description:
      name: build_test
      sha256: b8165c422fab3f04622f44942ba0d85c7a0a1dd8195badce6862b24d19acd945
      url: "https://pub.dev"
    source: hosted
    version: "2.1.5"
  build_web_compilers:
    dependency: "direct dev"
    description:
      name: build_web_compilers
      sha256: "9c29514fcdcd225bf3b5c771fc033f1d37a7bc59dfe4d44f066ef0dbad8c0466"
      url: "https://pub.dev"
    source: hosted
    version: "3.2.6"
  built_collection:
    dependency: transitive
    description:
      name: built_collection
      sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100"
      url: "https://pub.dev"
    source: hosted
    version: "5.1.1"
  built_value:
    dependency: transitive
    description:
      name: built_value
      sha256: "59e08b0079bb75f7e27392498e26339387c1089c6bd58525a14eb8508637277b"
      url: "https://pub.dev"
    source: hosted
    version: "8.4.2"
  charcode:
    dependency: transitive
    description:
      name: charcode
      sha256: fb98c0f6d12c920a02ee2d998da788bca066ca5f148492b7085ee23372b12306
      url: "https://pub.dev"
    source: hosted
    version: "1.3.1"
  checked_yaml:
    dependency: transitive
    description:
      name: checked_yaml
      sha256: dd007e4fb8270916820a0d66e24f619266b60773cddd082c6439341645af2659
      url: "https://pub.dev"
    source: hosted
    version: "2.0.1"
  clock:
    dependency: transitive
    description:
      name: clock
      sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
      url: "https://pub.dev"
    source: hosted
    version: "1.1.1"
  code_builder:
    dependency: transitive
    description:
      name: code_builder
      sha256: "02ce3596b459c666530f045ad6f96209474e8fee6e4855940a3cee65fb872ec5"
      url: "https://pub.dev"
    source: hosted
    version: "4.3.0"
  collection:
    dependency: transitive
    description:
      name: collection
      sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0
      url: "https://pub.dev"
    source: hosted
    version: "1.17.0"
  convert:
    dependency: transitive
    description:
      name: convert
      sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592"
      url: "https://pub.dev"
    source: hosted
    version: "3.1.1"
  coverage:
    dependency: transitive
    description:
      name: coverage
      sha256: d2494157c32b303f47dedee955b1479f2979c4ff66934eb7c0def44fd9e0267a
      url: "https://pub.dev"
    source: hosted
    version: "1.6.1"
  crypto:
    dependency: transitive
    description:
      name: crypto
      sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67
      url: "https://pub.dev"
    source: hosted
    version: "3.0.2"
  csslib:
    dependency: transitive
    description:
      name: csslib
      sha256: b36c7f7e24c0bdf1bf9a3da461c837d1de64b9f8beb190c9011d8c72a3dfd745
      url: "https://pub.dev"
    source: hosted
    version: "0.17.2"
  dart_style:
    dependency: transitive
    description:
      name: dart_style
      sha256: "7a03456c3490394c8e7665890333e91ae8a49be43542b616e414449ac358acd4"
      url: "https://pub.dev"
    source: hosted
    version: "2.2.4"
  file:
    dependency: transitive
    description:
      name: file
      sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d"
      url: "https://pub.dev"
    source: hosted
    version: "6.1.4"
  fixnum:
    dependency: transitive
    description:
      name: fixnum
      sha256: "04be3e934c52e082558cc9ee21f42f5c1cd7a1262f4c63cd0357c08d5bba81ec"
      url: "https://pub.dev"
    source: hosted
    version: "1.0.1"
  frontend_server_client:
    dependency: transitive
    description:
      name: frontend_server_client
      sha256: "82715f8041a85a534a7bf64400b2ee0bb3d594ccf695d97c0bb017259657ff5d"
      url: "https://pub.dev"
    source: hosted
    version: "3.1.0"
  glob:
    dependency: transitive
    description:
      name: glob
      sha256: "4515b5b6ddb505ebdd242a5f2cc5d22d3d6a80013789debfbda7777f47ea308c"
      url: "https://pub.dev"
    source: hosted
    version: "2.1.1"
  graphs:
    dependency: transitive
    description:
      name: graphs
      sha256: f9e130f3259f52d26f0cfc0e964513796dafed572fa52e45d2f8d6ca14db39b2
      url: "https://pub.dev"
    source: hosted
    version: "2.2.0"
  html:
    dependency: transitive
    description:
      name: html
      sha256: d9793e10dbe0e6c364f4c59bf3e01fb33a9b2a674bc7a1081693dba0614b6269
      url: "https://pub.dev"
    source: hosted
    version: "0.15.1"
  http_multi_server:
    dependency: transitive
    description:
      name: http_multi_server
      sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b"
      url: "https://pub.dev"
    source: hosted
    version: "3.2.1"
  http_parser:
    dependency: transitive
    description:
      name: http_parser
      sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b"
      url: "https://pub.dev"
    source: hosted
    version: "4.0.2"
  intl:
    dependency: transitive
    description:
      name: intl
      sha256: "910f85bce16fb5c6f614e117efa303e85a1731bb0081edf3604a2ae6e9a3cc91"
      url: "https://pub.dev"
    source: hosted
    version: "0.17.0"
  io:
    dependency: transitive
    description:
      name: io
      sha256: "0d4c73c3653ab85bf696d51a9657604c900a370549196a91f33e4c39af760852"
      url: "https://pub.dev"
    source: hosted
    version: "1.0.3"
  js:
    dependency: transitive
    description:
      name: js
      sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7"
      url: "https://pub.dev"
    source: hosted
    version: "0.6.5"
  json_annotation:
    dependency: transitive
    description:
      name: json_annotation
      sha256: "3520fa844009431b5d4491a5a778603520cdc399ab3406332dcc50f93547258c"
      url: "https://pub.dev"
    source: hosted
    version: "4.7.0"
  lints:
    dependency: "direct dev"
    description:
      name: lints
      sha256: "5e4a9cd06d447758280a8ac2405101e0e2094d2a1dbdd3756aec3fe7775ba593"
      url: "https://pub.dev"
    source: hosted
    version: "2.0.1"
  logging:
    dependency: transitive
    description:
      name: logging
      sha256: c0bbfe94d46aedf9b8b3e695cf3bd48c8e14b35e3b2c639e0aa7755d589ba946
      url: "https://pub.dev"
    source: hosted
    version: "1.1.0"
  matcher:
    dependency: transitive
    description:
      name: matcher
      sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72"
      url: "https://pub.dev"
    source: hosted
    version: "0.12.13"
  meta:
    dependency: "direct main"
    description:
      name: meta
      sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42"
      url: "https://pub.dev"
    source: hosted
    version: "1.8.0"
  mime:
    dependency: transitive
    description:
      name: mime
      sha256: dab22e92b41aa1255ea90ddc4bc2feaf35544fd0728e209638cad041a6e3928a
      url: "https://pub.dev"
    source: hosted
    version: "1.0.2"
  mockito:
    dependency: "direct dev"
    description:
      name: mockito
      sha256: "2a8a17b82b1bde04d514e75d90d634a0ac23f6cb4991f6098009dd56836aeafe"
      url: "https://pub.dev"
    source: hosted
    version: "5.3.2"
  ngast:
    dependency: "direct overridden"
    description:
      path: "../ngast"
      relative: true
    source: path
    version: "2.1.4"
  ngcompiler:
    dependency: "direct overridden"
    description:
      path: "../ngcompiler"
      relative: true
    source: path
    version: "2.1.4-dev"
  ngdart:
    dependency: "direct main"
    description:
      path: "../ngdart"
      relative: true
    source: path
    version: "7.1.1"
  ngtest:
    dependency: "direct dev"
    description:
      path: "../ngtest"
      relative: true
    source: path
    version: "4.1.1"
  node_preamble:
    dependency: transitive
    description:
      name: node_preamble
      sha256: "8ebdbaa3b96d5285d068f80772390d27c21e1fa10fb2df6627b1b9415043608d"
      url: "https://pub.dev"
    source: hosted
    version: "2.0.1"
  package_config:
    dependency: transitive
    description:
      name: package_config
      sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd"
      url: "https://pub.dev"
    source: hosted
    version: "2.1.0"
  path:
    dependency: transitive
    description:
      name: path
      sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b
      url: "https://pub.dev"
    source: hosted
    version: "1.8.2"
  pointycastle:
    dependency: transitive
    description:
      name: pointycastle
      sha256: db7306cf0249f838d1a24af52b5a5887c5bf7f31d8bb4e827d071dc0939ad346
      url: "https://pub.dev"
    source: hosted
    version: "3.6.2"
  pool:
    dependency: transitive
    description:
      name: pool
      sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a"
      url: "https://pub.dev"
    source: hosted
    version: "1.5.1"
  protobuf:
    dependency: transitive
    description:
      name: protobuf
      sha256: "01dd9bd0fa02548bf2ceee13545d4a0ec6046459d847b6b061d8a27237108a08"
      url: "https://pub.dev"
    source: hosted
    version: "2.1.0"
  pub_semver:
    dependency: transitive
    description:
      name: pub_semver
      sha256: "307de764d305289ff24ad257ad5c5793ce56d04947599ad68b3baa124105fc17"
      url: "https://pub.dev"
    source: hosted
    version: "2.1.3"
  pubspec_parse:
    dependency: transitive
    description:
      name: pubspec_parse
      sha256: "75f6614d6dde2dc68948dffbaa4fe5dae32cd700eb9fb763fe11dfb45a3c4d0a"
      url: "https://pub.dev"
    source: hosted
    version: "1.2.1"
  quiver:
    dependency: transitive
    description:
      name: quiver
      sha256: "93982981971e812c94d4a6fa3a57b89f9ec12b38b6380cd3c1370c3b01e4580e"
      url: "https://pub.dev"
    source: hosted
    version: "3.1.0"
  scratch_space:
    dependency: transitive
    description:
      name: scratch_space
      sha256: a469a9642a4d7ee406d6224a85446eb8baa9dd6d81e2f0b76770deae7bd32aab
      url: "https://pub.dev"
    source: hosted
    version: "1.0.1"
  shelf:
    dependency: transitive
    description:
      name: shelf
      sha256: c24a96135a2ccd62c64b69315a14adc5c3419df63b4d7c05832a346fdb73682c
      url: "https://pub.dev"
    source: hosted
    version: "1.4.0"
  shelf_packages_handler:
    dependency: transitive
    description:
      name: shelf_packages_handler
      sha256: aef74dc9195746a384843102142ab65b6a4735bb3beea791e63527b88cc83306
      url: "https://pub.dev"
    source: hosted
    version: "3.0.1"
  shelf_static:
    dependency: transitive
    description:
      name: shelf_static
      sha256: e792b76b96a36d4a41b819da593aff4bdd413576b3ba6150df5d8d9996d2e74c
      url: "https://pub.dev"
    source: hosted
    version: "1.1.1"
  shelf_web_socket:
    dependency: transitive
    description:
      name: shelf_web_socket
      sha256: a988c0e8d8ffbdb8a28aa7ec8e449c260f3deb808781fe1284d22c5bba7156e8
      url: "https://pub.dev"
    source: hosted
    version: "1.0.3"
  source_gen:
    dependency: transitive
    description:
      name: source_gen
      sha256: "2d79738b6bbf38a43920e2b8d189e9a3ce6cc201f4b8fc76be5e4fe377b1c38d"
      url: "https://pub.dev"
    source: hosted
    version: "1.2.6"
  source_map_stack_trace:
    dependency: transitive
    description:
      name: source_map_stack_trace
      sha256: "84cf769ad83aa6bb61e0aa5a18e53aea683395f196a6f39c4c881fb90ed4f7ae"
      url: "https://pub.dev"
    source: hosted
    version: "2.1.1"
  source_maps:
    dependency: transitive
    description:
      name: source_maps
      sha256: "490098075234dcedb83c5d949b4c93dad5e6b7702748de000be2b57b8e6b2427"
      url: "https://pub.dev"
    source: hosted
    version: "0.10.11"
  source_span:
    dependency: transitive
    description:
      name: source_span
      sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
      url: "https://pub.dev"
    source: hosted
    version: "1.9.1"
  stack_trace:
    dependency: transitive
    description:
      name: stack_trace
      sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
      url: "https://pub.dev"
    source: hosted
    version: "1.11.0"
  stream_channel:
    dependency: transitive
    description:
      name: stream_channel
      sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
      url: "https://pub.dev"
    source: hosted
    version: "2.1.1"
  stream_transform:
    dependency: transitive
    description:
      name: stream_transform
      sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f"
      url: "https://pub.dev"
    source: hosted
    version: "2.1.0"
  string_scanner:
    dependency: transitive
    description:
      name: string_scanner
      sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
      url: "https://pub.dev"
    source: hosted
    version: "1.2.0"
  term_glyph:
    dependency: transitive
    description:
      name: term_glyph
      sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
      url: "https://pub.dev"
    source: hosted
    version: "1.2.1"
  test:
    dependency: "direct dev"
    description:
      name: test
      sha256: a5fcd2d25eeadbb6589e80198a47d6a464ba3e2049da473943b8af9797900c2d
      url: "https://pub.dev"
    source: hosted
    version: "1.22.0"
  test_api:
    dependency: transitive
    description:
      name: test_api
      sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206
      url: "https://pub.dev"
    source: hosted
    version: "0.4.16"
  test_core:
    dependency: transitive
    description:
      name: test_core
      sha256: "0ef9755ec6d746951ba0aabe62f874b707690b5ede0fecc818b138fcc9b14888"
      url: "https://pub.dev"
    source: hosted
    version: "0.4.20"
  timing:
    dependency: transitive
    description:
      name: timing
      sha256: c386d07d7f5efc613479a7c4d9d64b03710b03cfaa7e8ad5f2bfb295a1f0dfad
      url: "https://pub.dev"
    source: hosted
    version: "1.0.0"
  typed_data:
    dependency: transitive
    description:
      name: typed_data
      sha256: "26f87ade979c47a150c9eaab93ccd2bebe70a27dc0b4b29517f2904f04eb11a5"
      url: "https://pub.dev"
    source: hosted
    version: "1.3.1"
  vm_service:
    dependency: transitive
    description:
      name: vm_service
      sha256: e7fb6c2282f7631712b69c19d1bff82f3767eea33a2321c14fa59ad67ea391c7
      url: "https://pub.dev"
    source: hosted
    version: "9.4.0"
  watcher:
    dependency: transitive
    description:
      name: watcher
      sha256: "6a7f46926b01ce81bfc339da6a7f20afbe7733eff9846f6d6a5466aa4c6667c0"
      url: "https://pub.dev"
    source: hosted
    version: "1.0.2"
  web_socket_channel:
    dependency: transitive
    description:
      name: web_socket_channel
      sha256: "3a969ddcc204a3e34e863d204b29c0752716f78b6f9cc8235083208d268a4ccd"
      url: "https://pub.dev"
    source: hosted
    version: "2.2.0"
  webkit_inspection_protocol:
    dependency: transitive
    description:
      name: webkit_inspection_protocol
      sha256: "67d3a8b6c79e1987d19d848b0892e582dbb0c66c57cc1fef58a177dd2aa2823d"
      url: "https://pub.dev"
    source: hosted
    version: "1.2.0"
  yaml:
    dependency: transitive
    description:
      name: yaml
      sha256: "23812a9b125b48d4007117254bca50abb6c712352927eece9e155207b1db2370"
      url: "https://pub.dev"
    source: hosted
    version: "3.1.1"
sdks:
  dart: ">=2.18.0 <4.0.0"    
  
@jakemac53
Copy link
Contributor

It looks like you are on a beta build, so maybe there was a recent bug or something in the SDK? Or possibly a change to type inference that is unexpectedly breaking? cc @stereotype441

@ykmnkmi
Copy link
Author

ykmnkmi commented Nov 23, 2022

I think the problem is that the packages uses sdk: '>=2.17.0 <3.0.0': angulardart-community/angular#31.

@jakemac53
Copy link
Contributor

That looks like a good sdk constraint to me, the SDK isn't supposed to break you until major versions, generally (although sometimes it is done after some careful examination of the tradeoffs).

@jakemac53
Copy link
Contributor

Fwiw most everybody on the team will be out until next monday, starting shortly, so I wouldn't expect movement here until then. Given this is only broken on a beta build, I don't think we need to be concerned about fixing it immediately in this package, and should instead wait until we can understand the underlying cause (likely in the SDK, from the looks of it).

@greglittlefield-wf
Copy link
Contributor

I wrote the below message before I found a Dart SDK issue for this underlying issue: dart-lang/sdk#51128

...but I thought I'd post it here anyways for posterity. I'm going to also post in that thread the bit about the SDK constraint in build_modules.


I also ran into the same issue, but with build_modules 4.0.4 (that's the just newest version I can get to without upgrading analyzer). Link to build: https://github.com/Workiva/over_react/actions/runs/4066018292/jobs/7001513513#logs.

It looks like the issue only occurs in both Dart 2.19.0, 2.19.1, and 3.0.0-187.0.dev, but not on Dart 2.18.7. Also, the issue seems to occur with build_modules 4.0.4/4.0.6 but not 4.0.7.

To reproduce, create a pubspec.yaml with:

name: build_issue_3412
environment:
  sdk: '>=2.18.0 <3.0.0'
dependencies:
  build_modules: 4.0.6 # Or 4.0.7, which does not exhibit the issue
  build_runner:

and run

dart run build_runner build

I wonder if it has to do with raising the SDK constraint in build_modules from 2.14 to 2.18 to opt into the new enhanced generics inference language feature?

@jakemac53
Copy link
Contributor

Right, thanks for pinging this issue :). I am going to close this as the package is fixed in the latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants