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

Add code excerpts to new type promotion failures #5359

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

MaryaBelanger
Copy link
Contributor

@MaryaBelanger MaryaBelanger commented Nov 17, 2023

Excerpts added in #5246

Fixes #5350

@MaryaBelanger MaryaBelanger marked this pull request as ready for review November 17, 2023 23:57
@MaryaBelanger
Copy link
Contributor Author

I'm still not sure how to implement the excerpts for the {:.bad} examples, tbd. Maybe the file just has a bunch of ignore_for_file conditions?

I know there's a way to print the actual error from the excerpts too (I think the Fixing common type problems page does it), so tbd on that too.

```dart
import 'dart:math';

abstract class C {
// ···
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not huge fan of how this is automatically added anywhere the docregions end/restart in the excerpts file

Copy link
Member

Choose a reason for hiding this comment

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

You can disable this by adding <?code-excerpt plaster="none"?> to the top of the file or in the excerpt you don't want to have it:

<?code-excerpt "file.dart (region)" plaster="none"?>

@parlough parlough self-requested a review November 18, 2023 02:19
@parlough parlough added the review.tech Awaiting Technical Review label Nov 18, 2023
@MaryaBelanger MaryaBelanger self-assigned this Dec 1, 2023
@parlough parlough removed the request for review from craiglabenz January 23, 2024 20:36
@parlough parlough assigned parlough and unassigned MaryaBelanger Jan 23, 2024
@dart-github-bot
Copy link
Collaborator

dart-github-bot commented Feb 4, 2024

Visit the preview URL for this PR (updated for commit 19f966e):

https://dart-dev--pr5359-promo-code-exc-ejj5cxix.web.app

@dart-lang dart-lang deleted a comment from github-actions bot Feb 11, 2024
@atsansone atsansone assigned MaryaBelanger and unassigned parlough Mar 6, 2024
@atsansone atsansone added review.await-update Awaiting Updates after Edits and removed review.tech Awaiting Technical Review labels Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review.await-update Awaiting Updates after Edits
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[3.2] Add code excerpts to non-promotion-reasons
4 participants