Skip to content

Commit

Permalink
Version 3.2.0-136.0.dev
Browse files Browse the repository at this point in the history
Merge c121db2 into dev
  • Loading branch information
Dart CI committed Sep 6, 2023
2 parents aca5b84 + c121db2 commit a2fce9c
Show file tree
Hide file tree
Showing 242 changed files with 4,056 additions and 1,030 deletions.
57 changes: 32 additions & 25 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -118,16 +118,16 @@ vars = {
# EOL comment after a dependency to disable this and pin it at its current
# revision.

"args_rev": "da56b18ebcb600e050bf57b9c1103b1d2a9fb2ff",
"args_rev": "5a4e16f1e4c08b01498a9dce8aeda1a60161cd52",
"async_rev": "75efa6cc08b2fc906fac4b6fdfdbcf6da7d0a2da",
"bazel_worker_rev": "f950bbfa4ccb0fe196bd031fae9b824bff25c287",
"benchmark_harness_rev": "fde73cb8810b1f8efed41e1994bc7b8327047379",
"bazel_worker_rev": "159e67182044b2d5edd89d12a873487d1d1343c1",
"benchmark_harness_rev": "7d0d28e7946702db34ae121543774f60bf8cf03c",
"boolean_selector_rev": "f255921c7155da2167e8c96e04e527180787aafb",
"browser_launcher_rev": "1f69393d63a2f8d36d00b86cdd20df70c347af82",
"characters_rev": "ec844db851b940d9013719f8474f064e35a01d0f",
"characters_rev": "7633a16a22c626e19ca750223237396315268a06",
"cli_util_rev": "44118e35e55c75f84fbc5ead051424ee1e73e406",
"clock_rev": "1e75f08d3428bcd6f4b7cf70e788f24fc9b661e1",
"collection_rev": "1a9b7eb64be10a8ba4ced7eb36b4b265a49d5d41",
"collection_rev": "91afde43f488eef618454b896301c6ff59af72e0",
"convert_rev": "c058c8f4ebfdc09a5122db7988acd9e117a7da48",
"crypto_rev": "1e26879c8f166850288e8722c590a465b4461f1f",
"csslib_rev": "bd30a1a773ec66d3e435dfc53fc140f1967716da",
Expand All @@ -142,55 +142,56 @@ vars = {
#
# For more details, see https://github.com/dart-lang/sdk/issues/30164.
"dart_style_rev": "2956b1a705953f880a5dae9d3a0969df0fc45e99", # disable rev_sdk_deps.dart
"dartdoc_rev": "695b218c50dd17a58afa7613da7f0daae3b7f55b",
"ecosystem_rev": "89e58de5f1838eb52cc7dcb3efb7fc01718b5e21",
"dartdoc_rev": "a32ba3a16baba6d4c785b0424a1cc3a0e83124ff",
"ecosystem_rev": "2e6c3ecc5f43327e615d912c19c2169d1ff5a227",
"ffi_rev": "d36e05af55293bcc511d6b3a99ea4b8cb69f6323",
"file_rev": "5d9a6027756b5846e8f5380f983390f61f564a75",
"file_rev": "a18ad1ce88eaeb5a11a13ef8fc25d1e78b546c59",
"fixnum_rev": "87ed0658f32f992dc7360b77513eadfa7056aa9d",
"flute_rev": "f42b09f77132210499ec8ed819a60c260af03db6",
"glob_rev": "5b243935154daf53c54981b98f625bace90b2112",
"html_rev": "4060496b0443451c38f8b789db2e44c0d7966171",
"glob_rev": "9c1996f9f9326d776fe151f292912113b8b64aa3",
"html_rev": "a1b193e95f13c995e7f7200ce0d363de5952e383",
"http_rev": "7fb6fd686f6ce60af300be71a84defcc336d272e",
"http_multi_server_rev": "aa128cfaf6ef1c9c1ace962ca2dcf6e5dddad441",
"http_parser_rev": "c14fbf6aa7ada5e8912eab4581eb26ff4d101452",
"http_multi_server_rev": "9d62ea396d7d282592edf994378f67fcde982ce8",
"http_parser_rev": "d2d03e7dfa3b7a99515b16f827650d6e210799b5",
"intl_rev": "5d65e3808ce40e6282e40881492607df4e35669f",
"json_rpc_2_rev": "509f71eef90ec5afb5486b69dab7fed97b9f1eef",
"json_rpc_2_rev": "50a37863be221f43ef07533c0c154ae676fc5df0",
"leak_tracker_rev": "098bafcf99a5220e3c352d895d991e163568ee03", # b/292240713
"lints_rev": "da44af3d262d6747a4e700a0916a4e0fd535e305",
"logging_rev": "bcaad0f781a889d6e5cf8fc564fd0722c446b96e",
"markdown_rev": "6cfd6f17651a8ba31b5a268f1139bb2c039dd4d4",
"matcher_rev": "80910d6698576ba486ace6e5fdf0e27324f138db",
"material_color_utilities_rev": "799b6ba2f3f1c28c67cc7e0b4f18e0c7d7f3c03e",
"mime_rev": "37ef637c35896e289fdd37c0ea4680df4ab9f543",
"mockito_rev": "f5abf11f8e21e61eebc2081e322bdfcab057e988",
"mockito_rev": "412c0beb51a12ed4a8833db7f542558ab92c0c65",
"native_rev": "a2dfedc35960711eb24cb04dcb906793d2222295",
"package_config_rev": "981c49dfec1e3e3e90f336dcd7c225923d2fd321",
"package_config_rev": "ae7ad83de97aba507fd05e97cc372bc6695c1759",
"path_rev": "96d9183ad4f9e48109fa8d4b8269cf75f13922dd",
"pool_rev": "a5bee3540a2b5b3a3c34038667e7cd7bb514dc62",
"protobuf_rev": "5e8f36b48f015532cd1165b47686b659fc8870da",
"protobuf_rev": "c16bc891978a1764f0d6d8eca54f420242c78a6a",
"pub_rev": "be6868ba132c782d9835b1638a634ecb73428579", # disable rev_sdk_deps.dart
"pub_semver_rev": "028b43506a3f7ec7f7b4673a78ba3da3d5fb138d",
"pub_semver_rev": "f0be74a446f971db478e68b59ea62e393d6df3bd",
"shelf_rev": "2926f76dc0f713b46ba5d9dbc391e29c6d1521a9",
"source_map_stack_trace_rev": "196d7bfa58ef307687907c323ab8e5fb1f382afa",
"source_maps_rev": "97c4833100b1bd8ea7e4a2fa1808383007e2d1e8",
"source_span_rev": "37735aecc5d8c0fb75ed61691bae056510b357bb",
"source_maps_rev": "eb3d40a6193adc63da958ed9451e3218bd6e95a0",
"source_span_rev": "48d0f574ee0a92a241c865d47f461803a664b5ba",
"sse_rev": "eeb2588ce56a5b2f1e4bbd88c2b35c910c505b71",
"stack_trace_rev": "bcf2a0b1b7d4abaeedcb8b18ff41e4994aea1b17",
"stream_channel_rev": "0ce7ab69c3a2ab83cdeb9dc60e1bacbb83abc165",
"string_scanner_rev": "da9142cf9809e7e1364144b8193ec60d87f0a4b8",
"sync_http_rev": "c3d6ad48ec997c56b7f076bc9f8b4134c4a9225c",
"sync_http_rev": "8233f74cd8a87707c13beceb59b56bca41b52966",
"term_glyph_rev": "1b28285a7e818b8e87c4d2119d968c5b36d73c7a",
"test_rev": "27dcae11f6630c0d980f521cf372e962d286e9d3",
"test_descriptor_rev": "030193dfdfbf85930eae8536909c546151da9e9c",
"test_process_rev": "2a6ee23fc2550fa466105819f5335fcfbab14035",
"test_reflective_loader_rev": "0bfaad91ed308ce9da11b48395c8210d7542c16b",
"test_reflective_loader_rev": "45c57d62fb08471681cd0b0a1c3b131bf0122929",
"tools_rev": "2c8cbd63b96d94ef4fbc0c7df6fd5eff65fc9a85",
"typed_data_rev": "80e8943524a627f7ff421ace824f38105983e89a",
"usage_rev": "09bb8472fdafff2c48a19aabbcf57b3af0f43934",
"vector_math_rev": "88bada3c32ba3f1d53073a003085131d60b09213",
"usage_rev": "7b12d510b5abde8a216437b8430ccfd02273625c",
"vector_math_rev": "d54af8a2b8b8d935a475a4da6ea5a1b343f29562",
"watcher_rev": "1aed03e2a8005f45083fdb38cbd4b684cd23082f",
"web_socket_channel_rev": "4d1b5438d1bdfc6317bf99fd9d9c6e4edb7e9ec5",
"web_socket_channel_rev": "af945f1ad3ac4193ed70b4ebfbdcba3b9f0198bc",
"webdev_rev": "fc876cb0de59526160ed17efaa920557a6e2ba32", # https://github.com/dart-lang/webdev/issues/2201
"webdriver_rev": "20ec47f1976c5deaf5106f85f5bf4a025d2afb1e",
"webdriver_rev": "21976d657e6505ad113f714bd104420aee23faac",
"webkit_inspection_protocol_rev": "39a3c297ff573635e7936b015ce4f3466e4739d6",
"yaml_rev": "ae001879aa377afee2e70cf11b8716d6cc3e2658",
"yaml_edit_rev": "4a9734dda12f63ef9eee4121f87ff4401e25a607",
Expand Down Expand Up @@ -419,6 +420,12 @@ deps = {
Var("dart_git") + "markdown.git" + "@" + Var("markdown_rev"),
Var("dart_root") + "/third_party/pkg/matcher":
Var("dart_git") + "matcher.git" + "@" + Var("matcher_rev"),
Var("dart_root") + "/third_party/pkg/material_color_utilities": {
"url": Var("dart_git") +
"external/github.com/material-foundation/material-color-utilities.git" +
"@" + Var("material_color_utilities_rev"),
"condition": "checkout_flute",
},
Var("dart_root") + "/third_party/pkg/mime":
Var("dart_git") + "mime.git" + "@" + Var("mime_rev"),
Var("dart_root") + "/third_party/pkg/mockito":
Expand Down
9 changes: 4 additions & 5 deletions build/config/BUILDCONFIG.gn
Original file line number Diff line number Diff line change
Expand Up @@ -264,11 +264,10 @@ if (is_win) {
]
}
if (is_posix) {
_native_compiler_configs += [ "//build/config/gcc:relative_paths" ]
if (is_product) {
_native_compiler_configs +=
[ "//build/config/gcc:symbol_visibility_hidden" ]
}
_native_compiler_configs += [
"//build/config/gcc:relative_paths",
"//build/config/gcc:symbol_visibility_hidden",
]
}
if (is_fuchsia) {
_native_compiler_configs += [
Expand Down
5 changes: 4 additions & 1 deletion build/toolchain/fuchsia/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -137,18 +137,21 @@ toolchain("fuchsia") {
exename = "{{target_output_name}}{{output_extension}}"
outfile = "{{root_out_dir}}/$exename"
rspfile = "$outfile.rsp"
symfile = "$outfile.sym"
symbolizer_script = rebase_path("//runtime/tools/dart_profiler_symbols.py")

# Note that the unstripped_outfile is in the exe.stripped folder.
# We should probably clean this up, but changing this and dart.cmx
# to point ./dart instead of ./exe.stripped/dart makes the build
# fail because ./dart does not end up in the manifest file.
unstripped_outfile = "{{root_out_dir}}/exe.stripped/$exename"
command = "$compiler_prefix $ld $target_triple_flags $sysroot_flags $lto_flags {{ldflags}} -o $unstripped_outfile -Wl,--build-id -Wl,--start-group @$rspfile {{solibs}} -Wl,--end-group {{libs}} && ${strip} -o $outfile $unstripped_outfile"
command = "$compiler_prefix $ld $target_triple_flags $sysroot_flags $lto_flags {{ldflags}} -o $unstripped_outfile -Wl,--build-id -Wl,--start-group @$rspfile {{solibs}} -Wl,--end-group {{libs}} && ${strip} -o $outfile $unstripped_outfile && $symbolizer_script --nm $nm --output $symfile --binary $unstripped_outfile"
description = "LINK $outfile"
rspfile_content = "{{inputs}}"
outputs = [
unstripped_outfile,
outfile,
symfile,
]
}

Expand Down
13 changes: 12 additions & 1 deletion build/toolchain/gcc_toolchain.gni
Original file line number Diff line number Diff line change
Expand Up @@ -191,12 +191,20 @@ template("gcc_toolchain") {
exename = "{{target_output_name}}{{output_extension}}"
outfile = "{{root_out_dir}}/$exename"
rspfile = "$outfile.rsp"
symfile = "$outfile.sym"

if (defined(invoker.strip) || defined(invoker.llvm_objcopy)) {
stripped_outfile = "{{root_out_dir}}/exe.stripped/$exename"
}

command = "$ld {{ldflags}} -o $outfile -Wl,--start-group @$rspfile {{solibs}} -Wl,--end-group $libs_section_prefix {{libs}} $libs_section_postfix"

symbolizer_script =
rebase_path("//runtime/tools/dart_profiler_symbols.py")
symbolize_command =
"$symbolizer_script --nm $nm --output $symfile --binary $outfile"
command += " && $symbolize_command"

if (defined(invoker.strip)) {
strip = invoker.strip
strip_command =
Expand All @@ -212,7 +220,10 @@ template("gcc_toolchain") {
}
description = "LINK $outfile"
rspfile_content = "{{inputs}}"
outputs = [ outfile ]
outputs = [
outfile,
symfile,
]
if (defined(invoker.strip) || defined(invoker.llvm_objcopy)) {
outputs += [ stripped_outfile ]
}
Expand Down
16 changes: 15 additions & 1 deletion build/toolchain/mac/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ template("mac_toolchain") {
cxx = invoker.cxx
ar = invoker.ar
ld = invoker.ld
nm = invoker.nm

# Make these apply to all tools below.
lib_switch = "-l"
Expand Down Expand Up @@ -175,12 +176,20 @@ template("mac_toolchain") {
exename = "{{target_output_name}}{{output_extension}}"
outfile = "{{root_out_dir}}/$exename"
rspfile = "$outfile.rsp"
symfile = "$outfile.sym"

if (defined(invoker.strip)) {
stripped_outfile = "{{root_out_dir}}/exe.stripped/$exename"
}

command = "$ld $sysroot_flags $toolchain_flags {{ldflags}} -Xlinker -rpath -Xlinker @executable_path/Frameworks -o $outfile -Wl,-filelist,$rspfile {{solibs}} {{libs}} {{frameworks}}"

symbolizer_script =
rebase_path("//runtime/tools/dart_profiler_symbols.py")
symbolize_command =
"$symbolizer_script --nm $nm --output $symfile --binary $outfile"
command += " && $symbolize_command"

if (defined(invoker.strip)) {
strip = invoker.strip
strip_command = "${strip} -x -o $stripped_outfile $outfile"
Expand All @@ -189,7 +198,10 @@ template("mac_toolchain") {

description = "LINK $outfile"
rspfile_content = "{{inputs_newline}}"
outputs = [ outfile ]
outputs = [
outfile,
symfile,
]
if (defined(invoker.strip)) {
outputs += [ stripped_outfile ]
}
Expand Down Expand Up @@ -229,6 +241,7 @@ mac_toolchain("clang_x64") {
ar = "${prefix}/llvm-ar"
ld = cxx
strip = "${prefix}/llvm-strip"
nm = "${prefix}/llvm-nm"
is_clang = true
if (mac_enable_relative_sdk_path) {
mac_sdk_path = rebase_path(mac_sdk_path, root_build_dir)
Expand All @@ -245,6 +258,7 @@ mac_toolchain("clang_arm64") {
ar = "${prefix}/llvm-ar"
ld = cxx
strip = "${prefix}/llvm-strip"
nm = "${prefix}/llvm-nm"
is_clang = true
if (mac_enable_relative_sdk_path) {
mac_sdk_path = rebase_path(mac_sdk_path, root_build_dir)
Expand Down
19 changes: 12 additions & 7 deletions pkg/_fe_analyzer_shared/lib/src/field_promotability.dart
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,16 @@ abstract class FieldPromotability<Class extends Object> {
/// instance field with the given [name].
///
/// [isFinal] indicates whether the field is a final field. [isAbstract]
/// indicates whether the field is abstract.
/// indicates whether the field is abstract. [isExternal] indicates whether
/// the field is external.
///
/// A return value of `true` indicates that this field *might* wind up being
/// promotable; a return value of `false` indicates that it *definitely* isn't
/// promotable.
bool addField(ClassInfo<Class> classInfo, String name,
{required bool isFinal, required bool isAbstract}) {
{required bool isFinal,
required bool isAbstract,
required bool isExternal}) {
// Public fields are never promotable, so we may safely ignore fields with
// public names.
if (!name.startsWith('_')) {
Expand All @@ -149,14 +152,16 @@ abstract class FieldPromotability<Class extends Object> {
classInfo._implementedNode._directNames.add(name);
}

if (!isFinal) {
// The field isn't final, so it isn't promotable, nor is any other field
// in the library with the same name.
if (isExternal || !isFinal) {
// The field isn't promotable, nor is any other field in the library with
// the same name.
_unpromotableFieldNames.add(name);
return false;
}

// If the field is final, it might wind up being promotable.
return isFinal;
// The field is final and not external, so it might wind up being
// promotable.
return true;
}

/// Records that the [Class] described by [classInfo] contains a non-synthetic
Expand Down
15 changes: 13 additions & 2 deletions pkg/_fe_analyzer_shared/test/field_promotability_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ main() {
check(f.isPossiblyPromotable).isFalse();
});

test('external private final field is not promotable', () {
var f = Field('_f', isFinal: true, isExternal: true);
var c = Class(fields: [f]);
check(_TestFieldPromotability().run([c])).unorderedEquals({'_f'});
check(f.isPossiblyPromotable).isFalse();
});

group('concrete getter renders a private field non-promotable:', () {
test('in a concrete class', () {
var c = Class(fields: [Field('_f', isFinal: true)]);
Expand Down Expand Up @@ -154,9 +161,11 @@ class Field {
final String name;
final bool isFinal;
final bool isAbstract;
final bool isExternal;
late final bool isPossiblyPromotable;

Field(this.name, {this.isFinal = false, this.isAbstract = false});
Field(this.name,
{this.isFinal = false, this.isAbstract = false, this.isExternal = false});
}

class Getter {
Expand Down Expand Up @@ -184,7 +193,9 @@ class _TestFieldPromotability extends FieldPromotability<Class> {
var classInfo = addClass(class_, isAbstract: class_.isAbstract);
for (var field in class_.fields) {
field.isPossiblyPromotable = addField(classInfo, field.name,
isFinal: field.isFinal, isAbstract: field.isAbstract);
isFinal: field.isFinal,
isAbstract: field.isAbstract,
isExternal: field.isExternal);
}
for (var getter in class_.getters) {
addGetter(classInfo, getter.name, isAbstract: getter.isAbstract);
Expand Down
18 changes: 18 additions & 0 deletions pkg/analysis_server/lib/src/computer/computer_outline.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ class DartUnitOutlineComputer {
} else if (unitMember is ExtensionDeclaration) {
unitContents.add(_newExtensionOutline(
unitMember, _outlinesForMembers(unitMember.members)));
} else if (unitMember is ExtensionTypeDeclaration) {
unitContents.add(_newExtensionTypeOutline(
unitMember, _outlinesForMembers(unitMember.members)));
} else if (unitMember is TopLevelVariableDeclaration) {
var fieldDeclaration = unitMember;
var fields = fieldDeclaration.variables;
Expand Down Expand Up @@ -195,6 +198,21 @@ class DartUnitOutlineComputer {
return _nodeOutline(node, element, extensionContents);
}

Outline _newExtensionTypeOutline(
ExtensionTypeDeclaration node, List<Outline> extensionContents) {
var nameToken = node.name;
var name = nameToken.lexeme;
var element = Element(
ElementKind.EXTENSION_TYPE,
name,
Element.makeFlags(
isPrivate: Identifier.isPrivateName(name),
isDeprecated: _isDeprecated(node)),
location: _getLocationToken(nameToken),
typeParameters: _getTypeParametersStr(node.typeParameters));
return _nodeOutline(node, element, extensionContents);
}

Outline _newFunctionOutline(FunctionDeclaration function, bool isStatic) {
var returnType = function.returnType;
var nameToken = function.name;
Expand Down
2 changes: 2 additions & 0 deletions pkg/analysis_server/lib/src/lsp/mapping.dart
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,8 @@ lsp.SymbolKind elementKindToSymbolKind(
return const [lsp.SymbolKind.EnumMember, lsp.SymbolKind.Enum];
case server.ElementKind.EXTENSION:
return const [lsp.SymbolKind.Namespace];
case server.ElementKind.EXTENSION_TYPE:
return const [lsp.SymbolKind.Namespace];
case server.ElementKind.FIELD:
return const [lsp.SymbolKind.Field];
case server.ElementKind.FILE:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,7 @@ class RemoveUnnecessaryLate extends ResolvedCorrectionProducer {

@override
Future<void> compute(ChangeBuilder builder) async {
final declaration = node;
if (declaration is! VariableDeclaration) {
return;
}
final declarationList = declaration.parent;
final declarationList = node;
if (declarationList is! VariableDeclarationList) {
return;
}
Expand Down
Loading

0 comments on commit a2fce9c

Please sign in to comment.