@@ -42,25 +42,24 @@ class SdkLayout {
42
42
SdkLayout .createDefault (defaultSdkDirectory);
43
43
44
44
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' )
45
49
final String soundSummaryPath;
50
+
51
+ @Deprecated ('Only sound null safety is supported as of Dart 3.0' )
46
52
final String weakSummaryPath;
47
- final String dartdevcSnapshotPath;
48
53
49
54
SdkLayout .createDefault (String sdkDirectory)
50
55
: this (
51
56
sdkDirectory: sdkDirectory,
52
- soundSummaryPath : p.join (
57
+ summaryPath : p.join (
53
58
sdkDirectory,
54
59
'lib' ,
55
60
'_internal' ,
56
61
'ddc_outline.dill' ,
57
62
),
58
- weakSummaryPath: p.join (
59
- sdkDirectory,
60
- 'lib' ,
61
- '_internal' ,
62
- 'ddc_outline_unsound.dill' ,
63
- ),
64
63
dartdevcSnapshotPath: p.join (
65
64
sdkDirectory,
66
65
'bin' ,
@@ -71,8 +70,9 @@ class SdkLayout {
71
70
72
71
const SdkLayout ({
73
72
required this .sdkDirectory,
74
- required this .soundSummaryPath,
75
- required this .weakSummaryPath,
73
+ required this .summaryPath,
74
+ this .soundSummaryPath = '' ,
75
+ this .weakSummaryPath = '' ,
76
76
required this .dartdevcSnapshotPath,
77
77
});
78
78
}
@@ -87,12 +87,18 @@ class SdkConfiguration {
87
87
SdkConfiguration .fromSdkLayout (SdkLayout .defaultSdkLayout);
88
88
89
89
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' )
90
94
final String ? weakSdkSummaryPath;
95
+
96
+ @Deprecated ('Only sound null safety is supported as of Dart 3.0' )
91
97
final String ? soundSdkSummaryPath;
92
- final String ? compilerWorkerPath;
93
98
94
99
const SdkConfiguration ({
95
100
this .sdkDirectory,
101
+ this .sdkSummaryPath,
96
102
this .weakSdkSummaryPath,
97
103
this .soundSdkSummaryPath,
98
104
this .compilerWorkerPath,
@@ -103,8 +109,7 @@ class SdkConfiguration {
103
109
SdkConfiguration .fromSdkLayout (SdkLayout sdkLayout)
104
110
: this (
105
111
sdkDirectory: sdkLayout.sdkDirectory,
106
- weakSdkSummaryPath: sdkLayout.weakSummaryPath,
107
- soundSdkSummaryPath: sdkLayout.soundSummaryPath,
112
+ sdkSummaryPath: sdkLayout.summaryPath,
108
113
compilerWorkerPath: sdkLayout.dartdevcSnapshotPath,
109
114
);
110
115
@@ -113,7 +118,12 @@ class SdkConfiguration {
113
118
path == null ? null : p.toUri (p.absolute (path));
114
119
115
120
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' )
116
124
Uri ? get soundSdkSummaryUri => _toUri (soundSdkSummaryPath);
125
+
126
+ @Deprecated ('Only sound null safety is supported as of Dart 3.0' )
117
127
Uri ? get weakSdkSummaryUri => _toUri (weakSdkSummaryPath);
118
128
119
129
/// Note: has to be ///file: Uri to run in an isolate.
@@ -139,28 +149,10 @@ class SdkConfiguration {
139
149
}
140
150
141
151
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 ()) {
162
154
throw InvalidSdkConfigurationException (
163
- 'Sdk summary $soundSdkSummaryPath does not exist' ,
155
+ 'Sdk summary $sdkSummaryPath does not exist' ,
164
156
);
165
157
}
166
158
}
0 commit comments