@@ -42,25 +42,24 @@ class SdkLayout {
4242 SdkLayout .createDefault (defaultSdkDirectory);
4343
4444 final String sdkDirectory;
45+ final String summaryPath;
46+ final String dartdevcSnapshotPath;
47+
48+ @Deprecated ('Only sound null safety is supported as of Dart 3.0' )
4549 final String soundSummaryPath;
50+
51+ @Deprecated ('Only sound null safety is supported as of Dart 3.0' )
4652 final String weakSummaryPath;
47- final String dartdevcSnapshotPath;
4853
4954 SdkLayout .createDefault (String sdkDirectory)
5055 : this (
5156 sdkDirectory: sdkDirectory,
52- soundSummaryPath : p.join (
57+ summaryPath : p.join (
5358 sdkDirectory,
5459 'lib' ,
5560 '_internal' ,
5661 'ddc_outline.dill' ,
5762 ),
58- weakSummaryPath: p.join (
59- sdkDirectory,
60- 'lib' ,
61- '_internal' ,
62- 'ddc_outline_unsound.dill' ,
63- ),
6463 dartdevcSnapshotPath: p.join (
6564 sdkDirectory,
6665 'bin' ,
@@ -71,8 +70,9 @@ class SdkLayout {
7170
7271 const SdkLayout ({
7372 required this .sdkDirectory,
74- required this .soundSummaryPath,
75- required this .weakSummaryPath,
73+ required this .summaryPath,
74+ this .soundSummaryPath = '' ,
75+ this .weakSummaryPath = '' ,
7676 required this .dartdevcSnapshotPath,
7777 });
7878}
@@ -87,12 +87,18 @@ class SdkConfiguration {
8787 SdkConfiguration .fromSdkLayout (SdkLayout .defaultSdkLayout);
8888
8989 final String ? sdkDirectory;
90+ final String ? sdkSummaryPath;
91+ final String ? compilerWorkerPath;
92+
93+ @Deprecated ('Only sound null safety is supported as of Dart 3.0' )
9094 final String ? weakSdkSummaryPath;
95+
96+ @Deprecated ('Only sound null safety is supported as of Dart 3.0' )
9197 final String ? soundSdkSummaryPath;
92- final String ? compilerWorkerPath;
9398
9499 const SdkConfiguration ({
95100 this .sdkDirectory,
101+ this .sdkSummaryPath,
96102 this .weakSdkSummaryPath,
97103 this .soundSdkSummaryPath,
98104 this .compilerWorkerPath,
@@ -103,8 +109,7 @@ class SdkConfiguration {
103109 SdkConfiguration .fromSdkLayout (SdkLayout sdkLayout)
104110 : this (
105111 sdkDirectory: sdkLayout.sdkDirectory,
106- weakSdkSummaryPath: sdkLayout.weakSummaryPath,
107- soundSdkSummaryPath: sdkLayout.soundSummaryPath,
112+ sdkSummaryPath: sdkLayout.summaryPath,
108113 compilerWorkerPath: sdkLayout.dartdevcSnapshotPath,
109114 );
110115
@@ -113,7 +118,12 @@ class SdkConfiguration {
113118 path == null ? null : p.toUri (p.absolute (path));
114119
115120 Uri ? get sdkDirectoryUri => _toUri (sdkDirectory);
121+ Uri ? get sdkSummaryUri => _toUri (sdkSummaryPath);
122+
123+ @Deprecated ('Only sound null safety is supported as of Dart 3.0' )
116124 Uri ? get soundSdkSummaryUri => _toUri (soundSdkSummaryPath);
125+
126+ @Deprecated ('Only sound null safety is supported as of Dart 3.0' )
117127 Uri ? get weakSdkSummaryUri => _toUri (weakSdkSummaryPath);
118128
119129 /// Note: has to be ///file: Uri to run in an isolate.
@@ -139,28 +149,10 @@ class SdkConfiguration {
139149 }
140150
141151 void validateSummaries ({FileSystem fileSystem = const LocalFileSystem ()}) {
142- validateSoundSummaries (fileSystem: fileSystem);
143- validateWeakSummaries (fileSystem: fileSystem);
144- }
145-
146- void validateWeakSummaries ({
147- FileSystem fileSystem = const LocalFileSystem (),
148- }) {
149- if (weakSdkSummaryPath == null ||
150- ! fileSystem.file (weakSdkSummaryPath).existsSync ()) {
151- throw InvalidSdkConfigurationException (
152- 'Sdk summary $weakSdkSummaryPath does not exist' ,
153- );
154- }
155- }
156-
157- void validateSoundSummaries ({
158- FileSystem fileSystem = const LocalFileSystem (),
159- }) {
160- if (soundSdkSummaryPath == null ||
161- ! fileSystem.file (soundSdkSummaryPath).existsSync ()) {
152+ if (sdkSummaryPath == null ||
153+ ! fileSystem.file (sdkSummaryPath).existsSync ()) {
162154 throw InvalidSdkConfigurationException (
163- 'Sdk summary $soundSdkSummaryPath does not exist' ,
155+ 'Sdk summary $sdkSummaryPath does not exist' ,
164156 );
165157 }
166158 }
0 commit comments