Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to Null-Safety #91

Merged
merged 25 commits into from
Mar 17, 2021
Merged

Migrate to Null-Safety #91

merged 25 commits into from
Mar 17, 2021

Conversation

wasabeef
Copy link
Member

@wasabeef wasabeef commented Mar 4, 2021

What does this change?

  • You can choose to enable or disable null safety mode.
flutter_gen:
  output: lib/gen/
  line_length: 80
  null_safety: true # Optional (default: true) ⭐️⭐️⭐️

What is the value of this and can you measure success?

  • Pass CI.

@wasabeef wasabeef added this to the 3.0.0 milestone Mar 4, 2021
@@ -34,5 +34,5 @@ void main(List<String> args) {
}

final pubspecPath = safeCast<String>(results['config']);
FlutterGenerator(File(pubspecPath).absolute).build();
FlutterGenerator(File(pubspecPath!).absolute).build();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️

@@ -97,7 +98,7 @@ class _Color {

_Color.fromXmlElement(XmlElement element)
: this(
element.getAttribute('name'),
element.getAttribute('name')!,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️

@wasabeef
Copy link
Member Author

wasabeef commented Mar 4, 2021

📝

% dart packages/command/bin/flutter_gen_command.dart --config example/pubspec.yaml
Error: Cannot run with sound null safety, because the following dependencies
don't support null safety:

 - package:dart_style
 - package:merge_map
 - package:analyzer
 - package:pub_semver
 - package:color
 - package:_fe_analyzer_shared
 - package:watcher
 - package:cli_util
 - package:convert
 - package:pedantic
 - package:glob
 - package:async
 - package:package_config

For solutions, see https://dart.dev/go/unsound-null-safety

@codecov
Copy link

codecov bot commented Mar 5, 2021

Codecov Report

Merging #91 (fdde71a) into main (abf1e53) will decrease coverage by 45.96%.
The diff coverage is 54.56%.

❗ Current head fdde71a differs from pull request most recent head 620799b. Consider uploading reports for the commit 620799b to get more accurate results
Impacted file tree graph

@@             Coverage Diff             @@
##             main      #91       +/-   ##
===========================================
- Coverage   98.02%   52.05%   -45.97%     
===========================================
  Files          16       43       +27     
  Lines         506     3694     +3188     
===========================================
+ Hits          496     1923     +1427     
- Misses         10     1771     +1761     
Impacted Files Coverage Δ
packages/core/lib/generators/fonts_generator.dart 100.00% <ø> (ø)
packages/core/lib/utils/dart_style/src/debug.dart 0.00% <0.00%> (ø)
...ages/core/lib/utils/dart_style/src/exceptions.dart 0.00% <0.00%> (ø)
...core/lib/utils/dart_style/src/rule/combinator.dart 0.00% <0.00%> (ø)
.../core/lib/utils/dart_style/src/source_visitor.dart 36.37% <ø> (ø)
...ages/core/lib/utils/dart_style/src/whitespace.dart 11.11% <11.11%> (ø)
...s/core/lib/utils/dart_style/src/rule/metadata.dart 12.50% <12.50%> (ø)
...ges/core/lib/utils/dart_style/src/source_code.dart 18.18% <18.18%> (ø)
...e/lib/utils/dart_style/src/rule/type_argument.dart 36.36% <36.36%> (ø)
.../core/lib/utils/dart_style/src/dart_formatter.dart 40.35% <40.35%> (ø)
... and 57 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update abf1e53...620799b. Read the comment docs.

@wasabeef wasabeef changed the title [WIP] Migrate to Null-Safety Migrate to Null-Safety Mar 15, 2021
@wasabeef wasabeef merged commit 91c152e into main Mar 17, 2021
@wasabeef wasabeef deleted the v3-migrate-nnbd branch March 17, 2021 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant