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

Consolidate async docs away from old directories #5771

Merged
merged 2 commits into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
{ "source": "/articles/await-async", "destination": "/codelabs/async-await", "type": 301 },
{ "source": "/articles/broadcast-streams", "destination": "https://medium.com/dartlang/dart-asynchronous-programming-streams-dab952023ed7", "type": 301 },
{ "source": "/articles/converters-and-codecs", "destination": "/articles/archive/converters-and-codecs", "type": 301 },
{ "source": "/articles/creating-streams", "destination": "/articles/libraries/creating-streams", "type": 301 },
{ "source": "/articles/creating-streams", "destination": "/libraries/async/creating-streams", "type": 301 },
{ "source": "/articles/dart-unit-tests{,/**}", "destination": "https://pub.dev/packages/test#writing-tests", "type": 301 },
{ "source": "/articles/dart-vm/io", "destination": "/articles/libraries/dart-io", "type": 301 },
{ "source": "/articles/dart-vm/native-extensions", "destination": "/server/c-interop-native-extensions", "type": 301 },
Expand All @@ -46,8 +46,8 @@
{ "source": "/articles/design-decisions/why-dart-types", "destination": "/resources/faq#types", "type": 301 },
{ "source": "/articles/doc-comment-guidelines", "destination": "/effective-dart/documentation", "type": 301 },
{ "source": "/articles/event-loop", "destination": "https://medium.com/dartlang/dart-asynchronous-programming-isolates-and-event-loops-bffc3e296a6a", "type": 301 },
{ "source": "/articles/feet-wet-streams{,/**}", "destination": "/tutorials/language/streams", "type": 301 },
{ "source": "/articles/futures-and-error-handling", "destination": "/guides/libraries/futures-error-handling", "type": 301 },
{ "source": "/articles/feet-wet-streams{,/**}", "destination": "/libraries/async/using-streams", "type": 301 },
{ "source": "/articles/futures-and-error-handling", "destination": "/libraries/async/futures-error-handling", "type": 301 },
{ "source": "/articles/idiomatic-dart{,/**}", "destination": "/effective-dart", "type": 301 },
{ "source": "/articles/io", "destination": "/articles/libraries/dart-io", "type": 301 },
{ "source": "/articles/js-dart-interop", "destination": "/web/libraries#js-interop", "type": 301 },
Expand All @@ -58,8 +58,10 @@
{ "source": "/articles/language/optional-types", "destination": "/resources/faq#types", "type": 301 },
{ "source": "/articles/libraries", "destination": "/libraries", "type": 301 },
{ "source": "/articles/libraries/converters-and-codecs", "destination": "/articles/archive/converters-and-codecs", "type": 301 },
{ "source": "/articles/libraries/creating-streams", "destination": "/libraries/async/creating-streams", "type": 301 },
{ "source": "/articles/libraries/dart-io", "destination": "/libraries/dart-io", "type": 301 },
{ "source": "/articles/libraries/zones", "destination": "/articles/archive/zones", "type": 301 },
{ "source": "/articles/libraries*{,/**}", "destination": "/libraries", "type": 301 },
{ "source": "/articles/m*{,/**}", "destination": "/guides/language/evolution", "type": 301 },
{ "source": "/articles/mixins", "destination": "/language/mixins", "type": 301 },
{ "source": "/articles/mocking-with-dart", "destination": "https://pub.dev/packages/mockito", "type": 301 },
Expand Down Expand Up @@ -132,7 +134,7 @@
{ "source": "/docs/tutorials/indexeddb{,/**}", "destination": "https://api.dart.dev/stable/dart-indexed_db/dart-indexed_db-library.html", "type": 301 },
{ "source": "/docs/tutorials/remove-elements", "destination": "/library/dart-html", "type": 301 },
{ "source": "/docs/tutorials/shared-pkgs", "destination": "/guides/packages", "type": 301 },
{ "source": "/docs/tutorials/streams", "destination": "/tutorials/language/streams", "type": 301 },
{ "source": "/docs/tutorials/streams", "destination": "/libraries/async/using-streams", "type": 301 },
{ "source": "/docs/tutorials{,/**}", "destination": "/tutorials", "type": 301 },
{ "source": "/docs{,/**}", "destination": "/guides", "type": 301 },
{ "source": "/downloads{,.html,/**}", "destination": "/get-dart", "type": 301 },
Expand Down Expand Up @@ -207,6 +209,7 @@
{ "source": "/guides/language/type-system", "destination": "/language/type-system", "type": 301 },
{ "source": "/guides/libraries", "destination": "/libraries", "type": 301 },
{ "source": "/guides/libraries/create-library-packages", "destination": "/guides/libraries/create-packages", "type": 301 },
{ "source": "/guides/libraries/futures-error-handling", "destination": "/libraries/async/futures-error-handling", "type": 301 },
{ "source": "/guides/libraries/java-interop", "destination": "/interop/java-interop", "type": 301 },
{ "source": "/guides/libraries/objective-c-interop", "destination": "/interop/objective-c-interop", "type": 301 },
{ "source": "/guides/libraries/c-interop", "destination": "/interop/c-interop", "type": 301 },
Expand Down Expand Up @@ -295,7 +298,9 @@
{ "source": "/tos@(|.htm|.html)", "destination": "/terms", "type": 301 },
{ "source": "/tutorials/dart-vm", "destination": "/tutorials/server", "type": 301 },
{ "source": "/tutorials/dart-vm/:page*", "destination": "/tutorials/server/:page*", "type": 301 },
{ "source": "/tutorials/language", "destination": "/language", "type": 301 },
{ "source": "/tutorials/language/futures", "destination": "/codelabs/async-await", "type": 301 },
{ "source": "/tutorials/language/streams", "destination": "/libraries/async/using-streams", "type": 301 },
{ "source": "/tutorials/libraries", "destination": "/libraries", "type": 301 },
{ "source": "/tutorials/libraries/shared-pkgs", "destination": "/guides/packages", "type": 301 },
{ "source": "/tutorials/web", "destination": "/web/get-started", "type": 301 },
Expand Down
6 changes: 3 additions & 3 deletions src/_data/side-nav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,11 @@
permalink: /libraries/dart-html
- divider
- title: Using streams
permalink: /tutorials/language/streams
permalink: /libraries/async/using-streams
- title: Creating streams
permalink: /articles/libraries/creating-streams
permalink: /libraries/async/creating-streams
- title: Futures and error handling
permalink: /guides/libraries/futures-error-handling
permalink: /libraries/async/futures-error-handling

- title: Effective Dart
expanded: false
Expand Down
2 changes: 1 addition & 1 deletion src/content/articles/archive/zones.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ This article discusses zone-related APIs in the [dart:async][] library,
with a focus on the top-level [`runZoned()`][]
and [`runZonedGuarded()`][] functions.
Review the techniques covered in
[Futures and Error Handling](/guides/libraries/futures-error-handling)
[Futures and Error Handling](/libraries/async/futures-error-handling)
before reading this article.

[dart:async]: ({{site.dart-api}}/{{site.sdkInfo.channel}}/dart-async/dart-async-library.html)
Expand Down
2 changes: 1 addition & 1 deletion src/content/guides/language/coming-from/swift-to-dart.md
Original file line number Diff line number Diff line change
Expand Up @@ -2689,7 +2689,7 @@ You can also create a stream using the
`StreamController` API. For more information,
see [Using a StreamController][].

[Using a StreamController]: /articles/libraries/creating-streams#using-a-streamcontroller
[Using a StreamController]: /libraries/async/creating-streams#using-a-streamcontroller

## Doc comments

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ This article shows the code for each approach
and gives tips to help you implement your stream correctly.

For help on using streams, see
[Asynchronous Programming: Streams](/tutorials/language/streams).
[Asynchronous Programming: Streams](/libraries/async/using-streams).


## Transforming an existing stream
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -391,9 +391,9 @@ error event, and when the stream is closed.
Read the following documentation for more details on using streams
and asynchronous programming in Dart.

* [Creating Streams in Dart](/articles/libraries/creating-streams),
* [Creating Streams in Dart](/libraries/async/creating-streams),
an article about creating your own streams
* [Futures and Error Handling](/guides/libraries/futures-error-handling),
* [Futures and Error Handling](/libraries/async/futures-error-handling),
an article that explains how to handle errors using the Future API
* [Asynchrony support](/language/async),
a section in the [language tour](/language)
Expand Down
4 changes: 2 additions & 2 deletions src/content/libraries/dart-async.md
Original file line number Diff line number Diff line change
Expand Up @@ -456,9 +456,9 @@ check out the [dart:io documentation][].
Also see these articles, codelabs, and tutorials:

- [Asynchronous programming: futures, async, await](/codelabs/async-await)
- [Futures and error handling](/guides/libraries/futures-error-handling)
- [Futures and error handling](/libraries/async/futures-error-handling)
- [Asynchronous programming: streams](/tutorials/language/streams)
- [Creating streams in Dart](/articles/libraries/creating-streams)
- [Creating streams in Dart](/libraries/async/creating-streams)
- [Dart asynchronous programming: Isolates and event loops](/language/concurrency)


Expand Down
2 changes: 1 addition & 1 deletion src/content/tutorials/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ which are fundamental to most Dart programs.

<div class="card-grid no_toc_section">
<div class="card">
<h3><a href="/tutorials/language/streams">Asynchronous programming:
<h3><a href="/libraries/async/using-streams">Asynchronous programming:
streams</a></h3>
<p>Use streams to manage sequences of data.</p>
</div>
Expand Down
17 changes: 0 additions & 17 deletions src/content/tutorials/language/index.md

This file was deleted.