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

Suggest null-check patterns for type promo #5679

Merged
merged 11 commits into from
Apr 8, 2024
Merged

Suggest null-check patterns for type promo #5679

merged 11 commits into from
Apr 8, 2024

Conversation

MaryaBelanger
Copy link
Contributor

@MaryaBelanger MaryaBelanger commented Apr 2, 2024

@dart-github-bot
Copy link
Collaborator

dart-github-bot commented Apr 2, 2024

Visit the preview URL for this PR (updated for commit 77dbf0c):

https://dart-dev--pr5679-null-check-wujb9sng.web.app

@MaryaBelanger
Copy link
Contributor Author

MaryaBelanger commented Apr 2, 2024

@parlough the effective dart toc isn't updating, something to do with style.md?

PathNotFoundException: Cannot open file, path = 'src/effective-dart/style.md' (OS Error: No such file or directory, errno = 2)
#0      _File.throwIfError (dart:io/file_impl.dart:675:7)
#1      _File.openSync (dart:io/file_impl.dart:490:5)
#2      _File.readAsBytesSync (dart:io/file_impl.dart:574:18)
#3      _File.readAsStringSync (dart:io/file_impl.dart:624:18)
#4      _File.readAsLinesSync (dart:io/file_impl.dart:630:36)
#5      _generateToc (package:dart_site/src/commands/generate_effective_dart_toc.dart:52:10)
#6      GenerateEffectiveDartToc.run (package:dart_site/src/commands/generate_effective_dart_toc.dart:36:36)
#7      CommandRunner.runCommand (package:args/command_runner.dart:212:27)
#8      CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:122:25)
#9      new Future.sync (dart:async/future.dart:305:31)
#10     CommandRunner.run (package:args/command_runner.dart:122:14)
#11     main (file:///Users/mbelanger/Projects/dart.dev/dart-3/tool/dart_site/bin/dart_site.dart:23:22)
#12     _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295:33)
#13     _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)

I tried removing the path-base command on line 12 of style.md but still got the error (in case that's related)

Edit (by parlough): Fixed in 3dc225f :)

@atsansone
Copy link
Contributor

@parlough the effective dart toc isn't updating, something to do with style.md?

PathNotFoundException: Cannot open file, path = 'src/effective-dart/style.md' (OS Error: No such file or directory, errno = 2)
#0      _File.throwIfError (dart:io/file_impl.dart:675:7)
#1      _File.openSync (dart:io/file_impl.dart:490:5)
#2      _File.readAsBytesSync (dart:io/file_impl.dart:574:18)
#3      _File.readAsStringSync (dart:io/file_impl.dart:624:18)
#4      _File.readAsLinesSync (dart:io/file_impl.dart:630:36)
#5      _generateToc (package:dart_site/src/commands/generate_effective_dart_toc.dart:52:10)
#6      GenerateEffectiveDartToc.run (package:dart_site/src/commands/generate_effective_dart_toc.dart:36:36)
#7      CommandRunner.runCommand (package:args/command_runner.dart:212:27)
#8      CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:122:25)
#9      new Future.sync (dart:async/future.dart:305:31)
#10     CommandRunner.run (package:args/command_runner.dart:122:14)
#11     main (file:///Users/mbelanger/Projects/dart.dev/dart-3/tool/dart_site/bin/dart_site.dart:23:22)
#12     _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295:33)
#13     _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)

I tried removing the path-base command on line 12 of style.md but still got the error (in case that's related)

IIRC, all of the code is under src/content/<path>. The code for this command points there, so maybe your local copy doesn't have the latest version of the command? Just a thought.

@MaryaBelanger MaryaBelanger requested a review from munificent April 3, 2024 19:44
Copy link
Contributor

@atsansone atsansone left a comment

Choose a reason for hiding this comment

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

@MaryaBelanger : I would recommend a few updates to meet Google style. I note style guide entries as reference.

Thanks for this!

@MaryaBelanger MaryaBelanger merged commit 988f0ce into main Apr 8, 2024
9 checks passed
@kevmoo kevmoo deleted the null-check branch August 20, 2024 22:42
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.

Suggest using null-check patterns for working with nullable fields or expressions that can't be promoted
5 participants