File tree Expand file tree Collapse file tree 5 files changed +15
-8
lines changed Expand file tree Collapse file tree 5 files changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ class _Builder {
106106 Reference .root (),
107107 );
108108
109- var linkResult = await link2 (elementFactory, inputLibraries);
109+ var linkResult = await link (elementFactory, inputLibraries);
110110
111111 var bundleBuilder = PackageBundleBuilder ();
112112 for (var library in inputLibraries) {
Original file line number Diff line number Diff line change @@ -206,9 +206,7 @@ class LibraryContext {
206206 link2.LinkResult linkResult;
207207 try {
208208 timerLinking.start ();
209- // TODO(scheglov) Migrate when we are ready to switch to async.
210- // ignore: deprecated_member_use_from_same_package
211- linkResult = await link2.link2 (elementFactory, inputLibraries);
209+ linkResult = await link2.link (elementFactory, inputLibraries);
212210 librariesLinked += cycle.libraries.length;
213211 counterLinkedLibraries += inputLibraries.length;
214212 timerLinking.stop ();
Original file line number Diff line number Diff line change @@ -889,7 +889,7 @@ class _LibraryContext {
889889 }
890890 inputsTimer.stop ();
891891
892- var linkResult = await link2.link2 (elementFactory, inputLibraries);
892+ var linkResult = await link2.link (elementFactory, inputLibraries);
893893 librariesLinked += cycle.libraries.length;
894894
895895 resolutionBytes = linkResult.resolutionBytes;
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ import 'package:analyzer/src/summary2/variance_builder.dart';
2626var timerLinkingLinkingBundle = Stopwatch ();
2727
2828/// Note that AST units and tokens of [inputLibraries] will be damaged.
29- Future <LinkResult > link2 (
29+ Future <LinkResult > link (
3030 LinkedElementFactory elementFactory,
3131 List <LinkInputLibrary > inputLibraries,
3232) async {
@@ -37,6 +37,15 @@ Future<LinkResult> link2(
3737 );
3838}
3939
40+ /// Note that AST units and tokens of [inputLibraries] will be damaged.
41+ @Deprecated ('Use link() instead' )
42+ Future <LinkResult > link2 (
43+ LinkedElementFactory elementFactory,
44+ List <LinkInputLibrary > inputLibraries,
45+ ) async {
46+ return link (elementFactory, inputLibraries);
47+ }
48+
4049class Linker {
4150 final LinkedElementFactory elementFactory;
4251
Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ abstract class ElementsBaseTest with ResourceProviderMixin {
102102 Reference .root (),
103103 );
104104
105- var sdkLinkResult = await link2 (elementFactory, inputLibraries);
105+ var sdkLinkResult = await link (elementFactory, inputLibraries);
106106
107107 return _sdkBundle = _SdkBundle (
108108 resolutionBytes: sdkLinkResult.resolutionBytes,
@@ -160,7 +160,7 @@ abstract class ElementsBaseTest with ResourceProviderMixin {
160160 ),
161161 );
162162
163- var linkResult = await link2 (elementFactory, inputLibraries);
163+ var linkResult = await link (elementFactory, inputLibraries);
164164
165165 if (! keepLinkingLibraries) {
166166 elementFactory.removeBundle (
You can’t perform that action at this time.
0 commit comments