Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
cb534057
Unverified
Commit
cb534057
authored
Oct 26, 2022
by
Jackson Gardner
Committed by
GitHub
Oct 26, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't specify libraries-spec argument if we are passing a platform dill. (#114045)
parent
7d037f2c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
1 deletion
+42
-1
compile.dart
packages/flutter_tools/lib/src/compile.dart
+3
-1
compile_incremental_test.dart
...er_tools/test/general.shard/compile_incremental_test.dart
+39
-0
No files found.
packages/flutter_tools/lib/src/compile.dart
View file @
cb534057
...
...
@@ -763,7 +763,9 @@ class DefaultResidentCompiler implements ResidentCompiler {
'--output-dill'
,
outputPath
,
],
if
(
librariesSpec
!=
null
)
...<
String
>[
// If we have a platform dill, we don't need to pass the libraries spec,
// since the information is embedded in the .dill file.
if
(
librariesSpec
!=
null
&&
platformDill
==
null
)
...<
String
>[
'--libraries-spec'
,
librariesSpec
!,
],
...
...
packages/flutter_tools/test/general.shard/compile_incremental_test.dart
View file @
cb534057
...
...
@@ -22,6 +22,7 @@ import '../src/fakes.dart';
void
main
(
)
{
late
ResidentCompiler
generator
;
late
ResidentCompiler
generatorWithScheme
;
late
ResidentCompiler
generatorWithPlatformDillAndLibrariesSpec
;
late
MemoryIOSink
frontendServerStdIn
;
late
BufferLogger
testLogger
;
late
StdoutHandler
generatorStdoutHandler
;
...
...
@@ -76,6 +77,18 @@ void main() {
fileSystem:
MemoryFileSystem
.
test
(),
stdoutHandler:
generatorWithSchemeStdoutHandler
,
);
generatorWithPlatformDillAndLibrariesSpec
=
DefaultResidentCompiler
(
'sdkroot'
,
buildMode:
BuildMode
.
debug
,
logger:
testLogger
,
processManager:
fakeProcessManager
,
artifacts:
Artifacts
.
test
(),
platform:
FakePlatform
(),
fileSystem:
MemoryFileSystem
.
test
(),
stdoutHandler:
generatorStdoutHandler
,
platformDill:
'/foo/platform.dill'
,
librariesSpec:
'/bar/libraries.json'
,
);
});
testWithoutContext
(
'incremental compile single dart compile'
,
()
async
{
...
...
@@ -431,6 +444,32 @@ void main() {
expect
(
output
?.
outputFilename
,
equals
(
'/path/to/main.dart.dill'
));
expect
(
fakeProcessManager
,
hasNoRemainingExpectations
);
});
testWithoutContext
(
'compile does not pass libraries-spec when using a platform dill'
,
()
async
{
fakeProcessManager
.
addCommand
(
FakeCommand
(
command:
const
<
String
>[
...
frontendServerCommand
,
'--platform'
,
'/foo/platform.dill'
,
'--verbosity=error'
],
stdout:
'result abc
\n
line1
\n
line2
\n
abc
\n
abc /path/to/main.dart.dill 0'
,
stdin:
frontendServerStdIn
,
));
final
CompilerOutput
?
output
=
await
generatorWithPlatformDillAndLibrariesSpec
.
recompile
(
Uri
.
parse
(
'/path/to/main.dart'
),
null
/* invalidatedFiles */
,
outputPath:
'/build/'
,
packageConfig:
PackageConfig
.
empty
,
fs:
MemoryFileSystem
(),
projectRootPath:
''
,
);
expect
(
frontendServerStdIn
.
getAndClear
(),
'compile /path/to/main.dart
\n
'
);
expect
(
testLogger
.
errorText
,
equals
(
'line1
\n
line2
\n
'
));
expect
(
output
?.
outputFilename
,
equals
(
'/path/to/main.dart.dill'
));
expect
(
fakeProcessManager
,
hasNoRemainingExpectations
);
});
}
Future
<
void
>
_recompile
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment