Skip to content

Commit 1d423d9

Browse files
authored
Move sound problems doc out of guides/ directory (#6264)
- Move the sound-problems doc to the deprecated directory, as most of it is duplicated with diagnostic message docs. See #6265 for follow up work. - Delete the `/guides/language` index as it's not linked to from anywhere and mostly duplicates introductions from other pages. Contributes to #5767 Contributes to #6265
1 parent 4277161 commit 1d423d9

File tree

11 files changed

+14
-48
lines changed

11 files changed

+14
-48
lines changed

firebase.json

+5-2
Original file line numberDiff line numberDiff line change
@@ -210,11 +210,12 @@
210210
{ "source": "/googleapis", "destination": "https://github.com/dart-lang/googleapis", "type": 301 },
211211
{ "source": "/guides/get-started", "destination": "/overview", "type": 301 },
212212
{ "source": "/guides/google-apis", "destination": "/resources/google-apis", "type": 301 },
213+
{ "source": "/guides/language", "destination": "/language", "type": 301 },
213214
{ "source": "/guides/language/analysis-options", "destination": "/tools/analysis", "type": 301 },
214215
{ "source": "/guides/language/cheatsheet", "destination": "/language", "type": 301 },
215216
{ "source": "/guides/language/coming-from/js-to-dart", "destination": "/resources/coming-from/js-to-dart", "type": 301 },
216217
{ "source": "/guides/language/coming-from/swift-to-dart", "destination": "/resources/coming-from/swift-to-dart", "type": 301 },
217-
{ "source": "/guides/language/common-prob", "destination": "/guides/language/sound-problems", "type": 301 },
218+
{ "source": "/guides/language/common-prob", "destination": "/deprecated/sound-problems", "type": 301 },
218219
{ "source": "/guides/language/concurrency", "destination": "/language/concurrency", "type": 301 },
219220
{ "source": "/guides/language/effective-dart", "destination": "/effective-dart", "type": 301 },
220221
{ "source": "/guides/language/effective-dart/:page*", "destination": "/effective-dart/:page*", "type": 301 },
@@ -226,10 +227,12 @@
226227
{ "source": "/guides/language/numbers", "destination": "/resources/language/number-representation", "type": 301 },
227228
{ "source": "/guides/language/sound-dart", "destination": "/language/type-system", "type": 301 },
228229
{ "source": "/guides/language/sound-faq", "destination": "/language/type-system", "type": 301 },
230+
{ "source": "/guides/language/sound-problems", "destination": "/deprecated/sound-problems", "type": 301 },
229231
{ "source": "/guides/language/spec", "destination": "/resources/language/spec", "type": 301 },
230232
{ "source": "/guides/language/specifications", "destination": "/resources/language/spec", "type": 301 },
231233
{ "source": "/guides/language/specifications/:page*", "destination": "/resources/language/spec/versions/:page*", "type": 301 },
232234
{ "source": "/guides/language/type-system", "destination": "/language/type-system", "type": 301 },
235+
{ "source": "/guides/language/**", "destination": "/language", "type": 301 },
233236
{ "source": "/guides/libraries", "destination": "/libraries", "type": 301 },
234237
{ "source": "/guides/libraries/create-library-packages", "destination": "/tools/pub/create-packages", "type": 301 },
235238
{ "source": "/guides/libraries/create-packages", "destination": "/tools/pub/create-packages", "type": 301 },
@@ -263,7 +266,7 @@
263266
{ "source": "/keyword/class", "destination": "/language/classes#instance-variables", "type": 301 },
264267
{ "source": "/keyword/const", "destination": "/language/variables#final-and-const", "type": 301 },
265268
{ "source": "/keyword/continue", "destination": "/language/loops#break-and-continue", "type": 301 },
266-
{ "source": "/keyword/covariant", "destination": "/guides/language/sound-problems#the-covariant-keyword", "type": 301 },
269+
{ "source": "/keyword/covariant", "destination": "/deprecated/sound-problems#the-covariant-keyword", "type": 301 },
267270
{ "source": "/keyword/default", "destination": "/language/branches#switch", "type": 301 },
268271
{ "source": "/keyword/deferred", "destination": "/language/libraries#lazily-loading-a-library", "type": 301 },
269272
{ "source": "/keyword/do", "destination": "/language/loops#while-and-do-while", "type": 301 },

src/_data/glossary.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@
614614
- text: "Covariance and contravariance"
615615
link: "https://en.wikipedia.org/wiki/Covariance_and_contravariance_(computer_science)"
616616
- text: "The covariant keyword"
617-
link: "/guides/language/sound-problems#the-covariant-keyword"
617+
link: "/deprecated/sound-problems#the-covariant-keyword"
618618
labels:
619619
- "language"
620620
- "type system"

src/_data/keywords.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
link: /language/loops#break-and-continue
3636
type: reserved
3737
- term: 'covariant'
38-
link: /guides/language/sound-problems#the-covariant-keyword
38+
link: /deprecated/sound-problems#the-covariant-keyword
3939
type: bit
4040
- term: 'default'
4141
link: /language/branches#switch

src/_data/side-nav.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@
327327
- title: Customizing static analysis
328328
permalink: /tools/analysis
329329
- title: Fixing common type problems
330-
permalink: /guides/language/sound-problems
330+
permalink: /deprecated/sound-problems
331331
- title: Fixing type promotion failures
332332
permalink: /tools/non-promotion-reasons
333333
- title: Linter rules

src/_includes/navigation-main.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
</li>
1616
<li class="mainnav__get-started">
1717
<a href="/guides" class="nav-link
18-
{%- if page_url_path contains '/*/guides/' or page_url_path contains '/*/language/' or page_url_path contains '/*/resources/' or page_url_path contains '/*/codelabs/' or page_url_path contains '/*/samples/' or page_url_path contains '/*/tools/' or page_url_path contains '/*/tutorials/' or page_url_path contains '/*/server/' or page_url_path contains '/*/web/' or page_url_path contains '/*/effective-dart/' or page_url_path contains '/*/libraries/' %} active {%- endif -%}">
18+
{%- if page_url_path contains '/*/guides/' or page_url_path contains '/*/language/' or page_url_path contains '/*/resources/' or page_url_path contains '/*/codelabs/' or page_url_path contains '/*/deprecated/' or page_url_path contains '/*/tools/' or page_url_path contains '/*/tutorials/' or page_url_path contains '/*/server/' or page_url_path contains '/*/web/' or page_url_path contains '/*/effective-dart/' or page_url_path contains '/*/libraries/' %} active {%- endif -%}">
1919
<span>Docs</span>
2020
</a>
2121
</li>

src/content/guides/language/index.md

-37
This file was deleted.

src/content/language/extend.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ it's similar to a downcast in that it can cause a type error at runtime.
7878
Still, narrowing the type is possible
7979
if the code can guarantee that a type error won't occur.
8080
In this case, you can use the
81-
[`covariant` keyword](/guides/language/sound-problems#the-covariant-keyword)
81+
[`covariant` keyword](/deprecated/sound-problems#the-covariant-keyword)
8282
in a parameter declaration.
8383
For details, see the
8484
[Dart language specification][].

src/content/language/type-system.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ subtype of the original parameter.
179179

180180
:::note
181181
If you have a valid reason to use a subtype, you can use the
182-
[`covariant` keyword](/guides/language/sound-problems#the-covariant-keyword).
182+
[`covariant` keyword](/deprecated/sound-problems#the-covariant-keyword).
183183
:::
184184

185185
Consider the `chase(Animal)` method for the `Animal` class:
@@ -488,7 +488,7 @@ and [Use sound parameter types when overriding methods](#use-proper-param-types)
488488

489489
The following resources have further information on sound Dart:
490490

491-
* [Fixing common type problems](/guides/language/sound-problems) -
491+
* [Fixing common type problems](/deprecated/sound-problems) -
492492
Errors you may encounter when writing sound Dart code, and how to fix them.
493493
* [Fixing type promotion failures](/tools/non-promotion-reasons) -
494494
Understand and learn how to fix type promotion errors.

src/content/resources/coming-from/js-to-dart.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ consider themselves as equal.
122122
:::
123123

124124
[Built-in types]: /language/built-in-types
125-
[Dart Language Tour]: /guides/language
125+
[Dart Language Tour]: /language
126126

127127
For example:
128128
The equals operator `==` and the `identical()` method return `true`

src/content/resources/whats-new.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ we made the following changes to this site:
548548
* Added a section on customizing [`dart fix`][].
549549

550550
[Objective-C and Swift interop]: /interop/objective-c-interop
551-
[Fixing common type problems]: /guides/language/sound-problems
551+
[Fixing common type problems]: /deprecated/sound-problems
552552
[What not to commit]: /tools/pub/private-files
553553
[`dart pub get` Options]: /tools/pub/cmd/pub-get#options
554554
[`dart compile`]: /tools/dart-compile

0 commit comments

Comments
 (0)