Open JsonYuu opened 3 years ago
需要修改 patch 中的部分代码才可以,用于适配 null safety 功能,后面我会将此部分代码提交上来。 dart sdk 以及 package-config.json 文件都需要针对性的进行更新。
需要修改 patch 中的部分代码才可以,用于适配 null safety 功能,后面我会将此部分代码提交上来。 dart sdk 以及 package-config.json 文件都需要针对性的进行更新。
我自己修改了patch 的代码,然后成功生成了flutter_tools.stamp 文件,然后指定 aspectd dart sdk >2.12 ,修复一些null safety 问题,但是再flutter run 的时候,aspectd 里面的aop_transform 报错还是有。是package-config.json 需要更新吗?具体咋样更新呢
需要修改 patch 中的部分代码才可以,用于适配 null safety 功能,后面我会将此部分代码提交上来。 dart sdk 以及 package-config.json 文件都需要针对性的进行更新。
我自己修改了patch 的代码,然后成功生成了flutter_tools.stamp 文件,然后指定 aspectd dart sdk >2.12 ,修复一些null safety 问题,但是再flutter run 的时候,aspectd 里面的aop_transform 报错还是有。是package-config.json 需要更新吗?具体咋样更新呢
根据报错信息看了下 ,我修改了 aspectd 里面 没啥用,报错说,dart sdk 不支持null safety , stable/v2.0.0 还不行。
@JsonYuu 试试这个,看看有没有效果呢,这个是 2.2.0 的。
{
"configVersion": 2,
"packages": [
{
"name": "flutter_frontend_server",
"rootUri": "../",
"packageUri": "lib",
"languageVersion": "2.2"
},
{
"name": "_fe_analyzer_shared",
"rootUri": "../../../third_party/dart/pkg/_fe_analyzer_shared",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "_js_interop_checks",
"rootUri": "../../../third_party/dart/pkg/_js_interop_checks",
"packageUri": "lib",
"languageVersion": "2.7"
},
{
"name": "analysis_server",
"rootUri": "../../../third_party/dart/pkg/analysis_server",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "analysis_server_client",
"rootUri": "../../../third_party/dart/pkg/analysis_server_client",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "analyzer",
"rootUri": "../../../third_party/dart/pkg/analyzer",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "analyzer_cli",
"rootUri": "../../../third_party/dart/pkg/analyzer_cli",
"packageUri": "lib",
"languageVersion": "2.7"
},
{
"name": "analyzer_plugin",
"rootUri": "../../../third_party/dart/pkg/analyzer_plugin",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "analyzer_utilities",
"rootUri": "../../../third_party/dart/pkg/analyzer_utilities",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "async_helper",
"rootUri": "../../../third_party/dart/pkg/async_helper",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "build_integration",
"rootUri": "../../../third_party/dart/pkg/build_integration",
"packageUri": "lib",
"languageVersion": "2.1"
},
{
"name": "compiler",
"rootUri": "../../../third_party/dart/pkg/compiler",
"packageUri": "lib",
"languageVersion": "2.6"
},
{
"name": "dart2js_tools",
"rootUri": "../../../third_party/dart/pkg/dart2js_tools",
"packageUri": "lib",
"languageVersion": "2.3"
},
{
"name": "dart2native",
"rootUri": "../../../third_party/dart/pkg/dart2native",
"packageUri": "lib",
"languageVersion": "2.7"
},
{
"name": "dart_internal",
"rootUri": "../../../third_party/dart/pkg/dart_internal",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "dartdev",
"rootUri": "../../../third_party/dart/pkg/dartdev",
"packageUri": "lib",
"languageVersion": "2.6"
},
{
"name": "dds",
"rootUri": "../../../third_party/dart/pkg/dds",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "dev_compiler",
"rootUri": "../../../third_party/dart/pkg/dev_compiler",
"packageUri": "lib",
"languageVersion": "2.3"
},
{
"name": "diagnostic",
"rootUri": "../../../third_party/dart/pkg/diagnostic",
"packageUri": "lib",
"languageVersion": "2.0"
},
{
"name": "expect",
"rootUri": "../../../third_party/dart/pkg/expect",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "front_end",
"rootUri": "../../../third_party/dart/pkg/front_end",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "frontend_server",
"rootUri": "../../../third_party/dart/pkg/frontend_server",
"packageUri": "lib",
"languageVersion": "2.7"
},
{
"name": "js",
"rootUri": "../../../third_party/dart/pkg/js",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "js_ast",
"rootUri": "../../../third_party/dart/pkg/js_ast",
"packageUri": "lib",
"languageVersion": "2.0"
},
{
"name": "js_runtime",
"rootUri": "../../../third_party/dart/pkg/js_runtime",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "kernel",
"rootUri": "../../../third_party/dart/pkg/kernel",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "meta",
"rootUri": "../../../third_party/dart/pkg/meta",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "modular_test",
"rootUri": "../../../third_party/dart/pkg/modular_test",
"packageUri": "lib",
"languageVersion": "2.2"
},
{
"name": "native_stack_traces",
"rootUri": "../../../third_party/dart/pkg/native_stack_traces",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "nnbd_migration",
"rootUri": "../../../third_party/dart/pkg/nnbd_migration",
"packageUri": "lib",
"languageVersion": "2.6"
},
{
"name": "smith",
"rootUri": "../../../third_party/dart/pkg/smith",
"packageUri": "lib",
"languageVersion": "2.3"
},
{
"name": "sourcemap_testing",
"rootUri": "../../../third_party/dart/pkg/sourcemap_testing",
"packageUri": "lib",
"languageVersion": "2.1"
},
{
"name": "status_file",
"rootUri": "../../../third_party/dart/pkg/status_file",
"packageUri": "lib",
"languageVersion": "2.3"
},
{
"name": "telemetry",
"rootUri": "../../../third_party/dart/pkg/telemetry",
"packageUri": "lib",
"languageVersion": "1.0"
},
{
"name": "test_runner",
"rootUri": "../../../third_party/dart/pkg/test_runner",
"packageUri": "lib",
"languageVersion": "2.3"
},
{
"name": "testing",
"rootUri": "../../../third_party/dart/pkg/testing",
"packageUri": "lib",
"languageVersion": "2.0"
},
{
"name": "vm",
"rootUri": "../../../third_party/dart/pkg/vm",
"packageUri": "lib",
"languageVersion": "2.7"
},
{
"name": "vm_service",
"rootUri": "../../../third_party/dart/pkg/vm_service",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "vm_snapshot_analysis",
"rootUri": "../../../third_party/dart/pkg/vm_snapshot_analysis",
"packageUri": "lib",
"languageVersion": "2.8"
},
{
"name": "wasm",
"rootUri": "../../../third_party/dart/pkg/wasm",
"packageUri": "lib",
"languageVersion": "2.10"
},
{
"name": "observatory",
"rootUri": "../../../third_party/dart/runtime/observatory",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "sdk_library_metadata",
"rootUri": "../../../third_party/dart/sdk/lib/_internal/sdk_library_metadata",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "args",
"rootUri": "../../../third_party/dart/third_party/pkg/args",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "async",
"rootUri": "../../../third_party/dart/third_party/pkg/async",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "bazel_worker",
"rootUri": "../../../third_party/dart/third_party/pkg/bazel_worker",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "boolean_selector",
"rootUri": "../../../third_party/dart/third_party/pkg/boolean_selector",
"packageUri": "lib",
"languageVersion": "2.10"
},
{
"name": "charcode",
"rootUri": "../../../third_party/dart/third_party/pkg/charcode",
"packageUri": "lib",
"languageVersion": "2.10"
},
{
"name": "cli_util",
"rootUri": "../../../third_party/dart/third_party/pkg/cli_util",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "collection",
"rootUri": "../../../third_party/dart/third_party/pkg/collection",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "convert",
"rootUri": "../../../third_party/dart/third_party/pkg/convert",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "crypto",
"rootUri": "../../../third_party/dart/third_party/pkg/crypto",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "csslib",
"rootUri": "../../../third_party/dart/third_party/pkg/csslib",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "dart2js_info",
"rootUri": "../../../third_party/dart/third_party/pkg/dart2js_info",
"packageUri": "lib",
"languageVersion": "2.3"
},
{
"name": "dartdoc",
"rootUri": "../../../third_party/dart/third_party/pkg/dartdoc",
"packageUri": "lib",
"languageVersion": "2.11"
},
{
"name": "ffi",
"rootUri": "../../../third_party/dart/third_party/pkg/ffi",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "fixnum",
"rootUri": "../../../third_party/dart/third_party/pkg/fixnum",
"packageUri": "lib",
"languageVersion": "2.10"
},
{
"name": "glob",
"rootUri": "../../../third_party/dart/third_party/pkg/glob",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "html",
"rootUri": "../../../third_party/dart/third_party/pkg/html",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "http",
"rootUri": "../../../third_party/dart/third_party/pkg/http",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "http_multi_server",
"rootUri": "../../../third_party/dart/third_party/pkg/http_multi_server",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "http_parser",
"rootUri": "../../../third_party/dart/third_party/pkg/http_parser",
"packageUri": "lib",
"languageVersion": "2.11"
},
{
"name": "http_retry",
"rootUri": "../../../third_party/dart/third_party/pkg/http_retry",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "http_throttle",
"rootUri": "../../../third_party/dart/third_party/pkg/http_throttle",
"packageUri": "lib",
"languageVersion": "2.0"
},
{
"name": "intl",
"rootUri": "../../../third_party/dart/third_party/pkg/intl",
"packageUri": "lib",
"languageVersion": "2.11"
},
{
"name": "json_rpc_2",
"rootUri": "../../../third_party/dart/third_party/pkg/json_rpc_2",
"packageUri": "lib",
"languageVersion": "2.2"
},
{
"name": "linter",
"rootUri": "../../../third_party/dart/third_party/pkg/linter",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "logging",
"rootUri": "../../../third_party/dart/third_party/pkg/logging",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "markdown",
"rootUri": "../../../third_party/dart/third_party/pkg/markdown",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "matcher",
"rootUri": "../../../third_party/dart/third_party/pkg/matcher",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "mime",
"rootUri": "../../../third_party/dart/third_party/pkg/mime",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "mockito",
"rootUri": "../../../third_party/dart/third_party/pkg/mockito",
"packageUri": "lib",
"languageVersion": "2.0"
},
{
"name": "oauth2",
"rootUri": "../../../third_party/dart/third_party/pkg/oauth2",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "path",
"rootUri": "../../../third_party/dart/third_party/pkg/path",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "pedantic",
"rootUri": "../../../third_party/dart/third_party/pkg/pedantic",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "pool",
"rootUri": "../../../third_party/dart/third_party/pkg/pool",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "protobuf",
"rootUri": "../../../third_party/dart/third_party/pkg/protobuf/protobuf",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "pub",
"rootUri": "../../../third_party/dart/third_party/pkg/pub",
"packageUri": "lib",
"languageVersion": "2.11"
},
{
"name": "pub_semver",
"rootUri": "../../../third_party/dart/third_party/pkg/pub_semver",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "resource",
"rootUri": "../../../third_party/dart/third_party/pkg/resource",
"packageUri": "lib",
"languageVersion": "2.0"
},
{
"name": "shelf",
"rootUri": "../../../third_party/dart/third_party/pkg/shelf",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "shelf_packages_handler",
"rootUri": "../../../third_party/dart/third_party/pkg/shelf_packages_handler",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "shelf_proxy",
"rootUri": "../../../third_party/dart/third_party/pkg/shelf_proxy",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "shelf_static",
"rootUri": "../../../third_party/dart/third_party/pkg/shelf_static",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "shelf_web_socket",
"rootUri": "../../../third_party/dart/third_party/pkg/shelf_web_socket",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "source_map_stack_trace",
"rootUri": "../../../third_party/dart/third_party/pkg/source_map_stack_trace",
"packageUri": "lib",
"languageVersion": "2.10"
},
{
"name": "source_maps",
"rootUri": "../../../third_party/dart/third_party/pkg/source_maps",
"packageUri": "lib",
"languageVersion": "2.10"
},
{
"name": "source_span",
"rootUri": "../../../third_party/dart/third_party/pkg/source_span",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "sse",
"rootUri": "../../../third_party/dart/third_party/pkg/sse",
"packageUri": "lib",
"languageVersion": "2.2"
},
{
"name": "stack_trace",
"rootUri": "../../../third_party/dart/third_party/pkg/stack_trace",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "stream_channel",
"rootUri": "../../../third_party/dart/third_party/pkg/stream_channel",
"packageUri": "lib",
"languageVersion": "2.10"
},
{
"name": "string_scanner",
"rootUri": "../../../third_party/dart/third_party/pkg/string_scanner",
"packageUri": "lib",
"languageVersion": "2.10"
},
{
"name": "term_glyph",
"rootUri": "../../../third_party/dart/third_party/pkg/term_glyph",
"packageUri": "lib",
"languageVersion": "2.10"
},
{
"name": "test",
"rootUri": "../../../third_party/dart/third_party/pkg/test/pkgs/test",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "test_api",
"rootUri": "../../../third_party/dart/third_party/pkg/test/pkgs/test_api",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "test_core",
"rootUri": "../../../third_party/dart/third_party/pkg/test/pkgs/test_core",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "test_reflective_loader",
"rootUri": "../../../third_party/dart/third_party/pkg/test_reflective_loader",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "typed_data",
"rootUri": "../../../third_party/dart/third_party/pkg/typed_data",
"packageUri": "lib",
"languageVersion": "2.10"
},
{
"name": "usage",
"rootUri": "../../../third_party/dart/third_party/pkg/usage",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "watcher",
"rootUri": "../../../third_party/dart/third_party/pkg/watcher",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "web_socket_channel",
"rootUri": "../../../third_party/dart/third_party/pkg/web_socket_channel",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "yaml",
"rootUri": "../../../third_party/dart/third_party/pkg/yaml",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "dart_style",
"rootUri": "../../../third_party/dart/third_party/pkg_tested/dart_style",
"packageUri": "lib",
"languageVersion": "2.12"
},
{
"name": "package_config",
"rootUri": "../../../third_party/dart/third_party/pkg_tested/package_config",
"packageUri": "lib",
"languageVersion": "2.12"
}
]
}
@JsonYuu 试试这个,看看有没有效果呢,这个是 2.2.0 的。
{ "configVersion": 2, "packages": [ { "name": "flutter_frontend_server", "rootUri": "../", "packageUri": "lib", "languageVersion": "2.2" }, { "name": "_fe_analyzer_shared", "rootUri": "../../../third_party/dart/pkg/_fe_analyzer_shared", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "_js_interop_checks", "rootUri": "../../../third_party/dart/pkg/_js_interop_checks", "packageUri": "lib", "languageVersion": "2.7" }, { "name": "analysis_server", "rootUri": "../../../third_party/dart/pkg/analysis_server", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "analysis_server_client", "rootUri": "../../../third_party/dart/pkg/analysis_server_client", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "analyzer", "rootUri": "../../../third_party/dart/pkg/analyzer", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "analyzer_cli", "rootUri": "../../../third_party/dart/pkg/analyzer_cli", "packageUri": "lib", "languageVersion": "2.7" }, { "name": "analyzer_plugin", "rootUri": "../../../third_party/dart/pkg/analyzer_plugin", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "analyzer_utilities", "rootUri": "../../../third_party/dart/pkg/analyzer_utilities", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "async_helper", "rootUri": "../../../third_party/dart/pkg/async_helper", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "build_integration", "rootUri": "../../../third_party/dart/pkg/build_integration", "packageUri": "lib", "languageVersion": "2.1" }, { "name": "compiler", "rootUri": "../../../third_party/dart/pkg/compiler", "packageUri": "lib", "languageVersion": "2.6" }, { "name": "dart2js_tools", "rootUri": "../../../third_party/dart/pkg/dart2js_tools", "packageUri": "lib", "languageVersion": "2.3" }, { "name": "dart2native", "rootUri": "../../../third_party/dart/pkg/dart2native", "packageUri": "lib", "languageVersion": "2.7" }, { "name": "dart_internal", "rootUri": "../../../third_party/dart/pkg/dart_internal", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "dartdev", "rootUri": "../../../third_party/dart/pkg/dartdev", "packageUri": "lib", "languageVersion": "2.6" }, { "name": "dds", "rootUri": "../../../third_party/dart/pkg/dds", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "dev_compiler", "rootUri": "../../../third_party/dart/pkg/dev_compiler", "packageUri": "lib", "languageVersion": "2.3" }, { "name": "diagnostic", "rootUri": "../../../third_party/dart/pkg/diagnostic", "packageUri": "lib", "languageVersion": "2.0" }, { "name": "expect", "rootUri": "../../../third_party/dart/pkg/expect", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "front_end", "rootUri": "../../../third_party/dart/pkg/front_end", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "frontend_server", "rootUri": "../../../third_party/dart/pkg/frontend_server", "packageUri": "lib", "languageVersion": "2.7" }, { "name": "js", "rootUri": "../../../third_party/dart/pkg/js", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "js_ast", "rootUri": "../../../third_party/dart/pkg/js_ast", "packageUri": "lib", "languageVersion": "2.0" }, { "name": "js_runtime", "rootUri": "../../../third_party/dart/pkg/js_runtime", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "kernel", "rootUri": "../../../third_party/dart/pkg/kernel", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "meta", "rootUri": "../../../third_party/dart/pkg/meta", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "modular_test", "rootUri": "../../../third_party/dart/pkg/modular_test", "packageUri": "lib", "languageVersion": "2.2" }, { "name": "native_stack_traces", "rootUri": "../../../third_party/dart/pkg/native_stack_traces", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "nnbd_migration", "rootUri": "../../../third_party/dart/pkg/nnbd_migration", "packageUri": "lib", "languageVersion": "2.6" }, { "name": "smith", "rootUri": "../../../third_party/dart/pkg/smith", "packageUri": "lib", "languageVersion": "2.3" }, { "name": "sourcemap_testing", "rootUri": "../../../third_party/dart/pkg/sourcemap_testing", "packageUri": "lib", "languageVersion": "2.1" }, { "name": "status_file", "rootUri": "../../../third_party/dart/pkg/status_file", "packageUri": "lib", "languageVersion": "2.3" }, { "name": "telemetry", "rootUri": "../../../third_party/dart/pkg/telemetry", "packageUri": "lib", "languageVersion": "1.0" }, { "name": "test_runner", "rootUri": "../../../third_party/dart/pkg/test_runner", "packageUri": "lib", "languageVersion": "2.3" }, { "name": "testing", "rootUri": "../../../third_party/dart/pkg/testing", "packageUri": "lib", "languageVersion": "2.0" }, { "name": "vm", "rootUri": "../../../third_party/dart/pkg/vm", "packageUri": "lib", "languageVersion": "2.7" }, { "name": "vm_service", "rootUri": "../../../third_party/dart/pkg/vm_service", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "vm_snapshot_analysis", "rootUri": "../../../third_party/dart/pkg/vm_snapshot_analysis", "packageUri": "lib", "languageVersion": "2.8" }, { "name": "wasm", "rootUri": "../../../third_party/dart/pkg/wasm", "packageUri": "lib", "languageVersion": "2.10" }, { "name": "observatory", "rootUri": "../../../third_party/dart/runtime/observatory", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "sdk_library_metadata", "rootUri": "../../../third_party/dart/sdk/lib/_internal/sdk_library_metadata", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "args", "rootUri": "../../../third_party/dart/third_party/pkg/args", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "async", "rootUri": "../../../third_party/dart/third_party/pkg/async", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "bazel_worker", "rootUri": "../../../third_party/dart/third_party/pkg/bazel_worker", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "boolean_selector", "rootUri": "../../../third_party/dart/third_party/pkg/boolean_selector", "packageUri": "lib", "languageVersion": "2.10" }, { "name": "charcode", "rootUri": "../../../third_party/dart/third_party/pkg/charcode", "packageUri": "lib", "languageVersion": "2.10" }, { "name": "cli_util", "rootUri": "../../../third_party/dart/third_party/pkg/cli_util", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "collection", "rootUri": "../../../third_party/dart/third_party/pkg/collection", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "convert", "rootUri": "../../../third_party/dart/third_party/pkg/convert", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "crypto", "rootUri": "../../../third_party/dart/third_party/pkg/crypto", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "csslib", "rootUri": "../../../third_party/dart/third_party/pkg/csslib", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "dart2js_info", "rootUri": "../../../third_party/dart/third_party/pkg/dart2js_info", "packageUri": "lib", "languageVersion": "2.3" }, { "name": "dartdoc", "rootUri": "../../../third_party/dart/third_party/pkg/dartdoc", "packageUri": "lib", "languageVersion": "2.11" }, { "name": "ffi", "rootUri": "../../../third_party/dart/third_party/pkg/ffi", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "fixnum", "rootUri": "../../../third_party/dart/third_party/pkg/fixnum", "packageUri": "lib", "languageVersion": "2.10" }, { "name": "glob", "rootUri": "../../../third_party/dart/third_party/pkg/glob", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "html", "rootUri": "../../../third_party/dart/third_party/pkg/html", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "http", "rootUri": "../../../third_party/dart/third_party/pkg/http", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "http_multi_server", "rootUri": "../../../third_party/dart/third_party/pkg/http_multi_server", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "http_parser", "rootUri": "../../../third_party/dart/third_party/pkg/http_parser", "packageUri": "lib", "languageVersion": "2.11" }, { "name": "http_retry", "rootUri": "../../../third_party/dart/third_party/pkg/http_retry", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "http_throttle", "rootUri": "../../../third_party/dart/third_party/pkg/http_throttle", "packageUri": "lib", "languageVersion": "2.0" }, { "name": "intl", "rootUri": "../../../third_party/dart/third_party/pkg/intl", "packageUri": "lib", "languageVersion": "2.11" }, { "name": "json_rpc_2", "rootUri": "../../../third_party/dart/third_party/pkg/json_rpc_2", "packageUri": "lib", "languageVersion": "2.2" }, { "name": "linter", "rootUri": "../../../third_party/dart/third_party/pkg/linter", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "logging", "rootUri": "../../../third_party/dart/third_party/pkg/logging", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "markdown", "rootUri": "../../../third_party/dart/third_party/pkg/markdown", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "matcher", "rootUri": "../../../third_party/dart/third_party/pkg/matcher", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "mime", "rootUri": "../../../third_party/dart/third_party/pkg/mime", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "mockito", "rootUri": "../../../third_party/dart/third_party/pkg/mockito", "packageUri": "lib", "languageVersion": "2.0" }, { "name": "oauth2", "rootUri": "../../../third_party/dart/third_party/pkg/oauth2", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "path", "rootUri": "../../../third_party/dart/third_party/pkg/path", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "pedantic", "rootUri": "../../../third_party/dart/third_party/pkg/pedantic", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "pool", "rootUri": "../../../third_party/dart/third_party/pkg/pool", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "protobuf", "rootUri": "../../../third_party/dart/third_party/pkg/protobuf/protobuf", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "pub", "rootUri": "../../../third_party/dart/third_party/pkg/pub", "packageUri": "lib", "languageVersion": "2.11" }, { "name": "pub_semver", "rootUri": "../../../third_party/dart/third_party/pkg/pub_semver", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "resource", "rootUri": "../../../third_party/dart/third_party/pkg/resource", "packageUri": "lib", "languageVersion": "2.0" }, { "name": "shelf", "rootUri": "../../../third_party/dart/third_party/pkg/shelf", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "shelf_packages_handler", "rootUri": "../../../third_party/dart/third_party/pkg/shelf_packages_handler", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "shelf_proxy", "rootUri": "../../../third_party/dart/third_party/pkg/shelf_proxy", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "shelf_static", "rootUri": "../../../third_party/dart/third_party/pkg/shelf_static", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "shelf_web_socket", "rootUri": "../../../third_party/dart/third_party/pkg/shelf_web_socket", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "source_map_stack_trace", "rootUri": "../../../third_party/dart/third_party/pkg/source_map_stack_trace", "packageUri": "lib", "languageVersion": "2.10" }, { "name": "source_maps", "rootUri": "../../../third_party/dart/third_party/pkg/source_maps", "packageUri": "lib", "languageVersion": "2.10" }, { "name": "source_span", "rootUri": "../../../third_party/dart/third_party/pkg/source_span", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "sse", "rootUri": "../../../third_party/dart/third_party/pkg/sse", "packageUri": "lib", "languageVersion": "2.2" }, { "name": "stack_trace", "rootUri": "../../../third_party/dart/third_party/pkg/stack_trace", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "stream_channel", "rootUri": "../../../third_party/dart/third_party/pkg/stream_channel", "packageUri": "lib", "languageVersion": "2.10" }, { "name": "string_scanner", "rootUri": "../../../third_party/dart/third_party/pkg/string_scanner", "packageUri": "lib", "languageVersion": "2.10" }, { "name": "term_glyph", "rootUri": "../../../third_party/dart/third_party/pkg/term_glyph", "packageUri": "lib", "languageVersion": "2.10" }, { "name": "test", "rootUri": "../../../third_party/dart/third_party/pkg/test/pkgs/test", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "test_api", "rootUri": "../../../third_party/dart/third_party/pkg/test/pkgs/test_api", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "test_core", "rootUri": "../../../third_party/dart/third_party/pkg/test/pkgs/test_core", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "test_reflective_loader", "rootUri": "../../../third_party/dart/third_party/pkg/test_reflective_loader", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "typed_data", "rootUri": "../../../third_party/dart/third_party/pkg/typed_data", "packageUri": "lib", "languageVersion": "2.10" }, { "name": "usage", "rootUri": "../../../third_party/dart/third_party/pkg/usage", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "watcher", "rootUri": "../../../third_party/dart/third_party/pkg/watcher", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "web_socket_channel", "rootUri": "../../../third_party/dart/third_party/pkg/web_socket_channel", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "yaml", "rootUri": "../../../third_party/dart/third_party/pkg/yaml", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "dart_style", "rootUri": "../../../third_party/dart/third_party/pkg_tested/dart_style", "packageUri": "lib", "languageVersion": "2.12" }, { "name": "package_config", "rootUri": "../../../third_party/dart/third_party/pkg_tested/package_config", "packageUri": "lib", "languageVersion": "2.12" } ] }
你这个不彻底啊。由于我的项目 是 dart sdk >2.12 ,所以 我把example 改为 >2.12 ,然后把aspectd_impl 也改为 >2.12 ,保留aspectd 的 sdk: ">=2.3.0-dev.68.0 <3.0.0" 。然后 我运行,提示我
[ ] [ +13 ms] C:\AndroidStudio\flutter_sdk\flutter\bin\cache\dart-sdk\bin\dart.exe --disable-dart-dev C:\AndroidStudio\flutter_sdk\flutter\bin\cache\artifacts\engine\windows-x64\frontend_server.dart.snapshot --sdk-root C:\AndroidStudio\flutter_sdk\flutter\bin\cache\artifacts\engine\common\flutter_patched_sdk/ --target=flutter --no-print-incremental-dependencies -DFLUTTER_WEB_AUTO_DETECT=true -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts --track-widget-creation --no-link-platform --packages C:\gitworkplace\github\aspectd\example\.dart_tool\package_config.json --output-dill C:\gitworkplace\github\aspectd\example\.dart_tool\flutter_build\ddd1b1144079e33a3f3028fd3f47ec8f\app.dill --depfile C:\gitworkplace\github\aspectd\example\.dart_tool\flutter_build\ddd1b1144079e33a3f3028fd3f47ec8f\kernel_snapshot.d package:example/main.dart [+27000 ms] [+27037 ms] C:\AndroidStudio\flutter_sdk\flutter\bin\cache\dart-sdk\bin\dart.exe --disable-dart-dev C:\AndroidStudio\flutter_sdk\flutter\bin\cache\artifacts\engine\windows-x64\frontend_server.dart.snapshot --sdk-root C:\AndroidStudio\flutter_sdk\flutter\bin\cache\artifacts\engine\common\flutter_patched_sdk/ --target=flutter --no-print-incremental-dependencies -DFLUTTER_WEB_AUTO_DETECT=true -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts --track-widget-creation --no-link-platform --packages C:\gitworkplace\github\aspectd\aspectd_impl\.dart_tool\package_config.json --output-dill C:\gitworkplace\github\aspectd\aspectd_impl\.dart_tool\flutter_build\9e30be54d607c4658e117e54c8d99488\app.dill --depfile C:\gitworkplace\github\aspectd\aspectd_impl\.dart_tool\flutter_build\9e30be54d607c4658e117e54c8d99488\kernel_snapshot.d package:aspectd_impl/aspectd_impl.dart [+2098 ms] [+2098 ms] Error: Cannot run with sound null safety, because the following dependencies [ ] [ +1 ms] don't support null safety: [ ] [ ] - package:aspectd [ ] [ ] For solutions, see https://dart.dev/go/unsound-null-safety [+12800 ms] [+12833 ms] Persisting file store [ +100 ms] [ +12 ms] Done persisting file store [ ] [ +5 ms] Target kernel_snapshot failed: Exception [ ] #0 KernelSnapshot.buildImpl (package:flutter_tools/src/build_system/targets/common.dart:299:7) [ ] <asynchronous suspension> [ ] #1 AspectdHook.runBuildDillCommand (package:flutter_tools/src/aspectd.dart:195:9) [ ] <asynchronous suspension> [ ] #2 KernelSnapshot.build (package:flutter_tools/src/build_system/targets/common.dart:219:9) [ ] <asynchronous suspension> [ ] #3 _BuildInstance._invokeInternal (package:flutter_tools/src/build_system/build_system.dart:828:9) [ ] <asynchronous suspension> [ ] #4 Future.wait.<anonymous closure> (dart:async/future.dart) [ ] <asynchronous suspension> [ ] #5 _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart:766:32) [ ] <asynchronous suspension> [ ] #6 FlutterBuildSystem.build (package:flutter_tools/src/build_system/build_system.dart:595:16) [ ] <asynchronous suspension> [ ] #7 AssembleCommand.runCommand (package:flutter_tools/src/commands/assemble.dart:318:32) [ ] <asynchronous suspension> [ ] #8 FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1043:27) [ ] <asynchronous suspension> [ ] #9 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19) [ ] <asynchronous suspension> [ ] #10 CommandRunner.runCommand (package:args/command_runner.dart:196:13) [ ] <asynchronous suspension> [ ] #11 FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:284:9) [ ] <asynchronous suspension> [ ] #12 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19) [ ] <asynchronous suspension> [ ] #13 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:232:5) [ ] <asynchronous suspension> [ ] #14 run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:9) [ ] <asynchronous suspension> [ ] #15 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19) [ ] <asynchronous suspension> [ ] #16 main (package:flutter_tools/executable.dart:91:3) [ ] <asynchronous suspension> [ ] [ +4 ms]
说 不能 Error: Cannot run with sound null safety, because the following dependencies [ ] [ +1 ms] don't support null safety: [ ] [ ] - package:aspectd
@kangwang1988 你昨天提交的 适配v2.2.2 的 with null safety 的好像不彻底啊。需要把aspectd 的 dart sdk >2.12 , 能继续 再搞下吗
还需要对应的 dart sdk 才可以,这个我想想传到网络上。
还需要对应的 dart sdk 才可以,这个我想想传到网络上。
我使用的 dart sdk 是https://github.com/XianyuTech/sdk ,branch: stable/v2.2.2 .也是不行的。dev_compiler 不支持 null safety. 错误信息如下:
[ ] /C:/Users/daihuayu/AppData/Roaming/Pub/Cache/git/dart_sdk-bb91fe038ff14f5b54415f79a8718b7312257e4a/pkg/dev_compiler/lib/dev_compiler.dart:5:1: Error: A library can't opt out of null safety by default, when using sound null safety. [ ] // @dart = 2.9 [ ] ^^^^^^^^^^^^^^ [ ] /C:/Users/daihuayu/AppData/Roaming/Pub/Cache/git/dart_sdk-bb91fe038ff14f5b54415f79a8718b7312257e4a/pkg/front_end/lib/src/api_prototype/compiler_options.dart:5:1: Error: A library can't opt out of null safety by default, when using sound null safety. [ ] // @dart = 2.9 [ ] ^^^^^^^^^^^^^^ [ ] /C:/Users/daihuayu/AppData/Roaming/Pub/Cache/git/dart_sdk-bb91fe038ff14f5b54415f79a8718b7312257e4a/pkg/front_end/lib/src/api_unstable/vm.dart:5:1: Error: A library can't opt out of null safety by default, when using sound null safety. [ ] // @dart = 2.9 [ ] ^^^^^^^^^^^^^^ [ ] /C:/Users/daihuayu/AppData/Roaming/Pub/Cache/git/dart_sdk-bb91fe038ff14f5b54415f79a8718b7312257e4a/pkg/front_end/lib/widget_cache.dart:5:1: Error: A library can'topt out of null safety by default, when using sound null safety. [ ] // @dart = 2.9 [ ] ^^^^^^^^^^^^^^ [ ] /C:/Users/daihuayu/AppData/Roaming/Pub/Cache/git/dart_sdk-bb91fe038ff14f5b54415f79a8718b7312257e4a/pkg/dev_compiler/lib/src/compiler/module_builder.dart:5:1: Error: A library can't opt out of null safety by default, when using sound null safety. [ ] // @dart = 2.9 [ ] ^^^^^^^^^^^^^^ [ ] /C:/Users/daihuayu/AppData/Roaming/Pub/Cache/git/dart_sdk-bb91fe038ff14f5b54415f79a8718b7312257e4a/pkg/dev_compiler/lib/src/compiler/shared_command.dart:5:1: Error: A library can't opt out of null safety by default, when using sound null safety. [ ] // @dart = 2.9 [ ] ^^^^^^^^^^^^^^ [ ] /C:/Users/daihuayu/AppData/Roaming/Pub/Cache/git/dart_sdk-bb91fe038ff14f5b54415f79a8718b7312257e4a/pkg/dev_compiler/lib/src/kernel/command.dart:5:1: Error: A library can't opt out of null safety by default, when using sound null safety. [ ] // @dart = 2.9 [ ] ^^^^^^^^^^^^^^ [ ] /C:/Users/daihuayu/AppData/Roaming/Pub/Cache/git/dart_sdk-bb91fe038ff14f5b54415f79a8718b7312257e4a/pkg/dev_compiler/lib/src/kernel/compiler.dart:5:1: Error: A library can't opt out of null safety by default, when using sound null safety. [ ] // @dart = 2.9 [ ] ^^^^^^^^^^^^^^ [ ] /C:/Users/daihuayu/AppData/Roaming/Pub/Cache/git/dart_sdk-bb91fe038ff14f5b54415f79a8718b7312257e4a/pkg/dev_compiler/lib/src/kernel/expression_compiler.dart:5:1: Error: A library can't opt out of null safety by default, when using sound null safety. [ ] // @dart = 2.9 [ ] ^^^^^^^^^^^^^^ [ ] /C:/Users/daihuayu/AppData/Roaming/Pub/Cache/git/dart_sdk-bb91fe038ff14f5b54415f79a8718b7312257e4a/pkg/dev_compiler/lib/src/kernel/target.dart:5:1: Error: A library can't opt out of null safety by default, when using sound null safety. [ ] // @dart = 2.9 [ ] ^^^^^^^^^^^^^^
看你这日志,dart 是不是没有切成功呢
看你这日志,dart 是不是没有切成功呢
我目前 使用的 是aspectd master 分支的代码,这个应该是 @kangwang1988 昨天提交的适配flutter v2.2.2 的。 但是 问题就是,这个提交没有完全适配 null safety .无论是 example 还是 aspectd ,都 不能把 dart sdk 指定 >2.12 .否则就会出现我上面贴的错误log.
目前项目 已升级flutter 2.2.1 ,同时 已指定dart sdk >2.12,aspectd 是否还能使用 @kangwang1988 @GvcZhang