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

Removing support for channel=master broke Flutter's API docs #2879

Closed
goderbauer opened this issue Feb 28, 2024 · 3 comments · May be fixed by #3015
Closed

Removing support for channel=master broke Flutter's API docs #2879

goderbauer opened this issue Feb 28, 2024 · 3 comments · May be fixed by #3015
Labels
area-dart-services type-enhancement A request for a change that isn't a bug

Comments

@goderbauer
Copy link

goderbauer commented Feb 28, 2024

In Flutter's API docs we are passing channel=master as a query param to dart pad to run sample code on the master/main branch. This broke recently when channel=master instead gave us the stable channel. Instead of master, main needs to be passed in now. We are fixing this in flutter/flutter#144329.

This breakage went undetected for some time. I am wondering if there is something we can do to avoid breaking Flutter's API docs on these kind of dart pad changes. This issue is meant as a starting point for that discussion.

@lrhn
Copy link
Member

lrhn commented Feb 29, 2024

If there are external uses of the URI-based API, then it should probably be considered an API, with "versioning" and breaking change policies.

Seeing it that way would likely have made the transition more explicit and visible:

  • A public "breaking change" notification, with a schedule and deprecation period.
  • A temporary support for channel=master where using it shows a warning banner on the page, maybe or maybe not with a HTTP redirect (say to same URI with channel=masterchanged tochannel=main&deprecation=master-channel`, or something, which could use that URI to trigger showing the warning).
    That could then allow automatic testing of URIs at the Flutter end, checking if the URIs they expose do not get a "permanent redirect" HTTP response, which would be a signal to update the URIs.

Since there is only one implementation, "versioning" isn't really the correct word. The version you get is the version that is live today. But explicit breaking changes, with public schedules and deprecations, can still work.

@parlough
Copy link
Member

parlough commented Feb 29, 2024

To note, in relation to this specific case, I think we intended to keep master working for the API docs, but missed this case. fb56528 fixes this.

For large changes, I generally verify they don't cause issues for the Flutter API docs locally, but that's not super sustainable. Perhaps we can require a more explicit consideration.

@johnpryan
Copy link
Contributor

I'm going to close this for now, since we are aliasing master to main.

DartPad doesn't have a huge API surface, we support a handful of query parameters for the Gist ID, the theme, and the UI mode (mobile or desktop). We should probably document that better in the embedding guide.

I can't think of a way for DartPad to integrate with our documentation tooling to say whether or not a snippet still compiles and runs, but I'm happy to discuss any ideas anyone might have to solve that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-dart-services type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants