Skip to content

No formatting #3240

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

Open
eernstg opened this issue Apr 7, 2025 · 2 comments
Open

No formatting #3240

eernstg opened this issue Apr 7, 2025 · 2 comments

Comments

@eernstg
Copy link
Member

eernstg commented Apr 7, 2025

DartPad seems to have stopped performing a formatting when the formatting button is clicked, or the keyboard shortcut is pressed.

What happened?

DartPad does not format as expected. It seems to occur with the 'main' channel, and not with others.

Steps to reproduce problem

Enter the following program (or anything that needs formatting) into the source code pane of DartPad, running in the 'main' channel:

void main() {
  var _ = switch (1) {
    1 => 0,
              _ => 1,
  };

    print( 'Hello!');
}

Click the formatting button (nothing happens) and press the keyboard shortcut (Command-S on this laptop -- again, nothing happens).

Additional info

DartPad shows this: "Based on Dart SDK 3.8.0-250.0.dev and Flutter SDK 3.31.0-1.0.pre.363."

Browser

Browser: Chrome

Version: 135.0.7049.41 (Official Build) (arm64)

Are you using any extensions/plugins that affect website behavior
(particularly those that affect iframes, such as ad blockers)? Nothing that should change the behavior of this website. Also, no extensions were installed or removed since the time where DartPad did format the code when requested.

Are there any warnings or errors in your browser's JavaScript console? No.

Machine

Operating system: MacOS
Version: 15.3.2

Your code

(see 'Steps to reproduce' where the code is shown.)

DartPad's output

Did DartPad print anything to the console pane? No.

@eernstg
Copy link
Member Author

eernstg commented Apr 7, 2025

Perhaps DartPad was just updated? Anyway, the issue is gone. Closing.

@eernstg eernstg closed this as completed Apr 7, 2025
@eernstg
Copy link
Member Author

eernstg commented Apr 7, 2025

It looks like this behavior is being turned on and off every few minutes ... now I've seen the formatting working and not working several times.

Once, I got this message in the output pane:

Formatting issue: ClientException: Failed to fetch, uri=https://master.api.dartpad.dev/api/v3/format

and this one in the messages area of the source code pattern (at the bottom):

ClientException: Failed to fetch, uri=https://master.api.dartpad.dev/api/v3/analyze

Taking the same actions again, there are no messages, but also no formatting.

@eernstg eernstg reopened this Apr 7, 2025
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

No branches or pull requests

1 participant