Skip to content

Commit 3735231

Browse files
authored
Cleanup old Dart SDK layout compatibility (#118819)
The changes to the Dart SDK have rolled so the backward compatibility is no longer needed.
1 parent c35efda commit 3735231

File tree

2 files changed

+14
-50
lines changed

2 files changed

+14
-50
lines changed

packages/flutter_tools/lib/src/isolated/devfs_web.dart

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -926,31 +926,13 @@ class WebDevFS implements DevFS {
926926
}
927927

928928
@visibleForTesting
929-
final File requireJS = (() {
930-
// TODO(nshahan): Remove the initilizing function once the file location
931-
// change in the Dart SDK has landed and rolled to the engine
932-
// and flutter repos. There is no long-term need for the
933-
// fallback logic.
934-
// See https://github.com/flutter/flutter/issues/118119
935-
final File oldFile = globals.fs.file(globals.fs.path.join(
936-
globals.artifacts!.getArtifactPath(Artifact.engineDartSdkPath, platform: TargetPlatform.web_javascript),
937-
'lib',
938-
'dev_compiler',
939-
'kernel',
940-
'amd',
941-
'require.js',
942-
));
943-
944-
return oldFile.existsSync()
945-
? oldFile
946-
: globals.fs.file(globals.fs.path.join(
947-
globals.artifacts!.getArtifactPath(Artifact.engineDartSdkPath, platform: TargetPlatform.web_javascript),
948-
'lib',
949-
'dev_compiler',
950-
'amd',
951-
'require.js',
952-
));
953-
})();
929+
final File requireJS = globals.fs.file(globals.fs.path.join(
930+
globals.artifacts!.getArtifactPath(Artifact.engineDartSdkPath, platform: TargetPlatform.web_javascript),
931+
'lib',
932+
'dev_compiler',
933+
'amd',
934+
'require.js',
935+
));
954936

955937
@visibleForTesting
956938
final File stackTraceMapper = globals.fs.file(globals.fs.path.join(

packages/flutter_tools/lib/src/test/flutter_web_platform.dart

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -187,31 +187,13 @@ class FlutterWebPlatform extends PlatformPlugin {
187187
));
188188

189189
/// The require js binary.
190-
File get _requireJs {
191-
// TODO(nshahan): Remove the initializing function once the file location
192-
// change in the Dart SDK has landed and rolled to the engine
193-
// and flutter repos. There is no long-term need for the
194-
// fallback logic.
195-
// See https://github.com/flutter/flutter/issues/118119
196-
final File oldFile = _fileSystem.file(_fileSystem.path.join(
197-
_artifacts!.getArtifactPath(Artifact.engineDartSdkPath, platform: TargetPlatform.web_javascript),
198-
'lib',
199-
'dev_compiler',
200-
'kernel',
201-
'amd',
202-
'require.js',
203-
));
204-
205-
return oldFile.existsSync()
206-
? oldFile
207-
: _fileSystem.file(_fileSystem.path.join(
208-
_artifacts!.getArtifactPath(Artifact.engineDartSdkPath, platform: TargetPlatform.web_javascript),
209-
'lib',
210-
'dev_compiler',
211-
'amd',
212-
'require.js',
213-
));
214-
}
190+
File get _requireJs => _fileSystem.file(_fileSystem.path.join(
191+
_artifacts!.getArtifactPath(Artifact.engineDartSdkPath, platform: TargetPlatform.web_javascript),
192+
'lib',
193+
'dev_compiler',
194+
'amd',
195+
'require.js',
196+
));
215197

216198
/// The ddc to dart stack trace mapper.
217199
File get _stackTraceMapper => _fileSystem.file(_fileSystem.path.join(

0 commit comments

Comments
 (0)