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
03d72562
Unverified
Commit
03d72562
authored
Apr 19, 2023
by
godofredoc
Committed by
GitHub
Apr 19, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Update helper message for `--suppress-analytics`" (#125141)
Reverts flutter/flutter#124810
parent
3476b966
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
7 deletions
+39
-7
runner.dart
packages/flutter_tools/lib/runner.dart
+10
-6
flutter_command_runner.dart
.../flutter_tools/lib/src/runner/flutter_command_runner.dart
+1
-1
runner_test.dart
.../flutter_tools/test/general.shard/runner/runner_test.dart
+28
-0
No files found.
packages/flutter_tools/lib/runner.dart
View file @
03d72562
...
...
@@ -88,6 +88,14 @@ Future<int> run(
await
globals
.
analytics
.
setTelemetry
(
value
);
}
// If the user has opted out of legacy analytics, we will continue
// to opt them out of unified analytics and inform them
if
(!
globals
.
flutterUsage
.
enabled
&&
globals
.
analytics
.
telemetryEnabled
)
{
await
globals
.
analytics
.
setTelemetry
(
false
);
globals
.
logger
.
printStatus
(
'Please note that analytics reporting was already disabled, and will continue to be disabled.
\n
'
);
}
await
runner
.
run
(
args
);
// Triggering [runZoned]'s error callback does not necessarily mean that
...
...
@@ -277,11 +285,6 @@ Future<int> _exit(int code, {required ShutdownHooks shutdownHooks}) async {
// Ensure that the consent message has been displayed for unified analytics
if
(
globals
.
analytics
.
shouldShowMessage
)
{
globals
.
logger
.
printStatus
(
globals
.
analytics
.
getConsentMessage
);
if
(!
globals
.
flutterUsage
.
enabled
)
{
globals
.
printStatus
(
'Please note that analytics reporting was already disabled, '
'and will continue to be disabled.
\n
'
);
}
// Because the legacy analytics may have also sent a message,
// the conditional below will print additional messaging informing
...
...
@@ -293,7 +296,8 @@ Future<int> _exit(int code, {required ShutdownHooks shutdownHooks}) async {
'the flutter tool is migrating to a new analytics system. '
'Disabling analytics collection will disable both the legacy '
'and new analytics collection systems. '
'You can disable analytics reporting by running `flutter --disable-telemetry`
\n
'
);
'You can disable analytics reporting by running either `flutter --disable-telemetry` '
'or `flutter config --no-analytics
\n
'
);
}
// Invoking this will onboard the flutter tool onto
...
...
packages/flutter_tools/lib/src/runner/flutter_command_runner.dart
View file @
03d72562
...
...
@@ -77,7 +77,7 @@ class FlutterCommandRunner extends CommandRunner<void> {
help:
'Allow Flutter to check for updates when this command runs.'
);
argParser
.
addFlag
(
'suppress-analytics'
,
negatable:
false
,
help:
'Suppress analytics reporting
for the current CLI invocation
.'
);
help:
'Suppress analytics reporting
when this command runs
.'
);
argParser
.
addFlag
(
'disable-telemetry'
,
negatable:
false
,
help:
'Disable telemetry reporting when this command runs.'
);
...
...
packages/flutter_tools/test/general.shard/runner/runner_test.dart
View file @
03d72562
...
...
@@ -346,6 +346,34 @@ void main() {
ProcessManager:
()
=>
FakeProcessManager
.
any
(),
},
);
testUsingContext
(
'legacy analytics disabled will disable new analytics'
,
()
async
{
io
.
setExitFunctionForTests
((
int
exitCode
)
{});
await
runner
.
run
(
<
String
>[],
()
=>
<
FlutterCommand
>[],
// This flutterVersion disables crash reporting.
flutterVersion:
'[user-branch]/'
,
shutdownHooks:
ShutdownHooks
(),
);
expect
(
globals
.
flutterUsage
.
enabled
,
false
);
expect
(
globals
.
analytics
.
telemetryEnabled
,
false
);
expect
(
testLogger
.
statusText
.
contains
(
'Please note that analytics '
'reporting was already disabled'
),
true
);
},
overrides:
<
Type
,
Generator
>{
Analytics:
()
=>
FakeAnalytics
(),
FileSystem:
()
=>
MemoryFileSystem
.
test
(),
ProcessManager:
()
=>
FakeProcessManager
.
any
(),
Usage:
()
=>
legacyAnalytics
,
},
);
});
}
...
...
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