You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Several Flutter tools doesn't use Dart language versioning #70084
Discovered while doing #70078: The logic in flutter updates-packages calculates package versions by writing a temporary pubspec.yaml file. This file doesn't have an SDK constraint, so it's language version is undefined.
/// Generates the source of a fake pubspec.yaml file given a list of/// dependencies.String_generateFakePubspec(Iterable<PubspecDependency> dependencies) {
finalStringBuffer result =StringBuffer();
finalStringBuffer overrides =StringBuffer();
result.writeln('name: flutter_update_packages');
result.writeln('dependencies:');
overrides.writeln('dependency_overrides:');
changed the title [-]flutter updates-packages doesn't use Dart language versioning[/-][+]Several Flutter tools doesn't use Dart language versioning[/+]on Nov 9, 2020
I think this might be causing the doc generation script (dev/bots/docs.sh) to fail:
output
dartdoc:stderr: , from material.DataTable: (file:///Users/ryjohn/code/tmp/flutter/packages/flutter/lib/src/material/data_table.dart:384:7)
dartdoc:stderr: error: tool execution failed: Tool "snippet" returned non-zero exit code (64) when run as "/Users/ryjohn/code/tmp/flutter/bin/cache/dart-sdk/bin/dart /var/folders/3q/2gm34ftd37n43w9sxr09h0d000m6cw/T/dartdoc_snapshot_cache_WAZpHV/snapshot_0 --type=snippet" from /Users/ryjohn/code/tmp/flutter/dev/docs
dartdoc:stderr: Input to snippet was:
dartdoc:stderr:
dartdoc:stderr: This sample creates a [MaterialApp] widget that stores `ThemeData` and
dartdoc:stderr: passes the `ThemeData` to descendant widgets. The [AppBar] widget uses the
dartdoc:stderr: [primaryColor] to create a blue background. The [Text] widget uses the
dartdoc:stderr: [TextTheme.bodyText2] to create purple text. The [FloatingActionButton] widget
dartdoc:stderr: uses the [accentColor] to create a green background.
dartdoc:stderr:
dartdoc:stderr: 
dartdoc:stderr:
dartdoc:stderr: ```dart
dartdoc:stderr: MaterialApp(
dartdoc:stderr: theme: ThemeData(
dartdoc:stderr: primaryColor: Colors.blue,
dartdoc:stderr: accentColor: Colors.green,
dartdoc:stderr: textTheme: TextTheme(bodyText2: TextStyle(color: Colors.purple)),
dartdoc:stderr: ),
dartdoc:stderr: home: Scaffold(
dartdoc:stderr: appBar: AppBar(
dartdoc:stderr: title: const Text('ThemeData Demo'),
dartdoc:stderr: ),
dartdoc:stderr: floatingActionButton: FloatingActionButton(
dartdoc:stderr: child: const Icon(Icons.add),
dartdoc:stderr: onPressed: () {},
dartdoc:stderr: ),
dartdoc:stderr: body: Center(
dartdoc:stderr: child: Text(
dartdoc:stderr: 'Button pressed 0 times',
dartdoc:stderr: ),
dartdoc:stderr: ),
dartdoc:stderr: ),
dartdoc:stderr: )
dartdoc:stderr: ```
dartdoc:stderr: Stderr output was:
dartdoc:stderr: Could not find an option named "type".
dartdoc:stderr:
dartdoc:stderr: Usage: dart [<vm-flags>] <command|dart-file> [<arguments>]
dartdoc:stderr:
dartdoc:stderr: Global options:
dartdoc:stderr: -h, --help Print this usage information.
dartdoc:stderr: -v, --verbose Show additional command output.
dartdoc:stderr: --version Print the Dart SDK version.
dartdoc:stderr: --enable-analytics Enable anonymous analytics.
dartdoc:stderr: --disable-analytics Disable anonymous analytics.
dartdoc:stderr:
dartdoc:stderr: Available commands:
dartdoc:stderr: analyze Analyze the project's Dart code.
dartdoc:stderr: compile Compile Dart to various formats.
dartdoc:stderr: create Create a new project.
dartdoc:stderr: format Idiomatically format Dart source code.
dartdoc:stderr: migrate Perform a null safety migration on a project or package.
dartdoc:stderr: pub Work with packages.
dartdoc:stderr: run Run a Dart program.
dartdoc:stderr: test Run tests in this package.
dartdoc:stderr:
dartdoc:stderr: Run "dart help <command>" for more information about a command.
dartdoc:stderr: See https://dart.dev/tools/dart-tool for detailed documentation.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
[-]flutter updates-packages doesn't use Dart language versioning[/-][+]Several Flutter tools doesn't use Dart language versioning[/+]mit-mit commentedon Nov 9, 2020
dev/tool/dartdoc.dartis another instance of this:https://github.com/flutter/flutter/blob/master/dev/tools/dartdoc.dart#L53
johnpryan commentedon Nov 9, 2020
I think this might be causing the doc generation script (
dev/bots/docs.sh) to fail:output
jmagman commentedon Nov 10, 2020
I split the dartdoc request out to #70239 \cc @johnpryan. @jonahwilliams is looking into the
flutter updates-packagespiece.jonahwilliams commentedon Nov 11, 2020
Looks like this one was fixed with 168ad5d, closing.
Thanks @mit-mit !
github-actions commentedon Aug 10, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.