Nate
fa9992eff6
switch
statement cleanup (#148382 )
...
This PR is step 12 in the journey to solve issue #136139 and make the
entire Flutter repo more readable.
Most of it involves implementing switch expressions, and there's also a
few other random things that I wanted to clean up a bit.
2024-05-16 17:16:06 -07:00
Christopher Fujino
730d6d44b7
Don't pin package:macros ( #148087 )
...
Full context https://github.com/flutter/flutter/issues/148004
TL;DR
1. Because `package:macros` depends on `package:_macros` via [a Dart SDK
dependency](https://github.com/dart-lang/sdk/blob/main/pkg/macros/pubspec.yaml#L13 );
and
2. `package:macros` exactly pins `package:_macros`; and
3. Each new version of `package:macros` will increment its exact pin of
`package:_macros`
([comment](https://github.com/flutter/flutter/issues/148004#issuecomment-2103099893 ));
and
4. The [flutter/flutter](https://github.com/flutter/flutter ) repository
exactly pins the Dart SDK (via its exact pin on the
[flutter/engine](https://github.com/flutter/engine ) repository
Therefore, the [flutter/flutter](https://github.com/flutter/flutter )
repository effectively pins both `package:macros` and `package:_macros`
already (as in, there exists only a single version of each that pub will
successfully be able to solve within the context of a particular Flutter
SDK).
Therefore, it is safe for
[flutter/flutter](https://github.com/flutter/flutter ) repository to
*not* pin `package:macros`, which will allow engine -> framework rolls
that contain a new Dart SDK that contains a new `package:_macros`
version to land automatically, provided all tests pass.
2024-05-09 16:28:49 -07:00
Danny Tuppeny
cea1d6f055
Unpin DDS and roll pub packages ( #147925 )
...
DDS was temporarily pinned to 4.1.0 because 4.2.0 triggered some test
failures (see https://github.com/flutter/flutter/pull/147250 ). Those
failures should be fixed by vm_service 14.2.2, so this unpins DDS and
rolls both of these packages (along with devtools_shared, which is a DDS
dependency).
(If the bot updates vm_service before this is done, I can rebase over
that will reduce the size of this PR to just a few files)
2024-05-08 10:35:28 +01:00
Greg Spencer
8a7c18c12a
Fix document generation, eliminate template support from snippets tool. ( #147893 )
...
## Description
This fixes the API doc generation that I broke when I moved the snippets tool into the framework.
It removes the last of the template support (properly this time), and makes sure all of the tests pass.
## Related Issues
- https://github.com/flutter/flutter/issues/144408
- https://github.com/flutter/flutter/issues/147609
- https://github.com/flutter/flutter/pull/147645
## Tests
- Fixed tests, including smoke test of doc generation.
2024-05-07 02:13:54 +00:00
flutter-pub-roller-bot
c0ed9f6ff4
Roll pub packages ( #147896 )
...
This PR was generated by `flutter update-packages --force-upgrade`.
2024-05-06 23:36:21 +00:00
flutter-pub-roller-bot
d4b2e5d705
Roll pub packages ( #147891 )
...
This PR was generated by `flutter update-packages --force-upgrade`.
2024-05-06 22:39:58 +00:00
Greg Spencer
183bc15816
Move snippets package back into flutter repo ( #147690 )
...
## Description
This moves the snippets package back into the Flutter repo so that API documentation generation can happen without the use of `dart pub global run` because `pub run` doesn't handle concurrency well.
The change modifies the dartdoc building process to include building an executable from the snippets tool and installing that in the cache directory for use during docs generation.
The snippets tool will reside in dev/snippets, where it originally resided before being moved to https://github.com/flutter/assets-for-api-docs .
The snippets code itself is unchanged from the code that is in https://github.com/flutter/assets-for-api-docs/packages/snippets .
## Related Issues
- https://github.com/flutter/flutter/issues/144408
- https://github.com/flutter/flutter/issues/147609
- https://github.com/flutter/flutter/pull/147645
## Tests
- Added snippets tests to the overall testing build.
2024-05-03 06:09:03 +00:00
Pierre-Louis
4a65a76279
Reland: Update link branches to main
( #146882 )
...
Reland https://github.com/flutter/flutter/pull/146558 , reverted in https://github.com/flutter/flutter/pull/146880 due to an outdated test result
## Original description
- Update CS and googlesource.com link branches
- Update GitHub /blob/ and /tree/ links
Tested links manually and fixes a few broken or deprecated links
Added a test that validates that `master` isn't used, except for specified repos.
Part of https://github.com/flutter/flutter/issues/121564
2024-04-17 13:16:33 +00:00
Pierre-Louis
33a9643b5d
Revert "Update link branches to main
" ( #146880 )
...
Reverts flutter/flutter#146558
Causes failure
2024-04-17 13:25:18 +02:00
Pierre-Louis
072b8874a0
Update link branches to main
( #146558 )
...
- Update CS and googlesource.com link branches
- Update GitHub /blob/ and /tree/ links
Tested links manually and fixes a few broken or deprecated links
Added a test that validates that `master` isn't used, except for
specified repos.
Part of https://github.com/flutter/flutter/issues/121564
## Pre-launch Checklist
- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
If you need help, consider asking for advice on the #hackers-new channel
on [Discord].
<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
[Data Driven Fixes]:
https://github.com/flutter/flutter/wiki/Data-driven-Fixes
2024-04-17 09:44:23 +02:00
Michael Goderbauer
e41ffcb742
Reland "Use dartpad's main channel for master/main docs ( #144329 )" ( #144431 )
...
Fix is in the second commit. The logic here went out of sync with the logic in the snippets generator from https://github.com/flutter/assets-for-api-docs , whose version was bumped as part of this change.
2024-02-29 23:10:53 +00:00
auto-submit[bot]
b099bf0b4c
Reverts "Use dartpad's main channel for master/main docs ( #144329 )" ( #144429 )
...
Reverts flutter/flutter#144329
Initiated by: goderbauer
Reason for reverting: broke postsubmit doc generation.
Original PR Author: goderbauer
Reviewed By: {devoncarew, HansMuller, gspencergoog}
This change reverts the following previous change:
Original Description:
Dartpad doesn't have a "master" channel anymore, it got renamed to "main". Sadly, specifying "master" is now falling back to "stable" which breaks some of our examples in the docs that require a more current Flutter version, e.g. https://main-api.flutter.dev/flutter/material/TextButton-class.html
2024-02-29 21:57:18 +00:00
Michael Goderbauer
41eeb2bb8c
Use dartpad's main channel for master/main docs ( #144329 )
...
Dartpad doesn't have a "master" channel anymore, it got renamed to "main". Sadly, specifying "master" is now falling back to "stable" which breaks some of our examples in the docs that require a more current Flutter version, e.g. https://main-api.flutter.dev/flutter/material/TextButton-class.html
2024-02-29 19:08:25 +00:00
Parker Lougheed
c313083a88
Remove null-safety argument from DartPad doc samples ( #127345 )
...
Removes the `null_safety=true` query parameter from DartPad samples in the API docs, since all DartPad channels only support null safety now and the parameter does nothing.
## Test
Removing code, but updates the check in the dartdoc tool for the removal.
2023-05-23 00:10:11 +00:00
Greg Spencer
d4e1209cc0
Update the copy icon in snippets and samples to use the standard one ( #123651 )
...
## Description
This updates the copy icon for copying sample code to use `content_copy` instead of `assignment`.
Before:
<img width="369" alt="223876418-2470c4c5-abfc-4511-9762-1fd0b6e05903" src="https://user-images.githubusercontent.com/8867023/228396142-450125ee-d8cf-4ede-8545-5920eb0da99d.png ">
After:
<img width="408" alt="image" src="https://user-images.githubusercontent.com/8867023/228395959-8531704a-77aa-43af-9dcf-7456bb2ed090.png ">
## Related Issues
- Fixes https://github.com/flutter/flutter/issues/122246
## Tests
- No tests needed.
2023-04-18 17:38:13 +00:00
Greg Spencer
d0491dcf15
Add the channel
parameter to the Dartpad samples ( #115018 )
...
* Add the channel paramter to the Dartpad samples
* Add sanity check test
* Make sample_id more generic
2022-11-09 23:47:05 +00:00
Greg Spencer
1f0760a1cc
Fix API docs CSS files so dark mode works ( #112023 )
2022-09-21 18:33:08 +00:00
Ian Hickson
de938e508c
Fix HTML in skeletons (ampersands must be escaped) ( #109360 )
2022-08-11 15:39:17 +00:00
Ian Hickson
9b2668a451
Minor fix compendium ( #107874 )
2022-08-11 02:33:07 +00:00
Michael Goderbauer
9ee566beb4
Remove sample templates ( #103575 )
2022-05-12 10:27:11 -07:00
Greg Spencer
c7643cf54e
Fix samples so that they present properly in the docs ( #97224 )
2022-02-24 18:51:22 -08:00
Greg Spencer
bbc21fe3ed
Fix some issues with samples ( #95044 )
2021-12-13 09:29:09 -08:00
Greg Spencer
983cbb273b
Add example test, update example READMEs ( #91130 )
2021-10-04 13:53:02 -07:00
Greg Spencer
ab2b0851a2
Add smoke tests for all the examples, fix 17 broken examples. ( #89021 )
...
This adds a smoke test for every single API example. It also fixes 17 tests that had bugs in them, or were otherwise broken, and even fixes one actual bug in the framework, and one limitation in the framework.
The bug in the framework is that NetworkImage's _loadAsync method had await response.drain<List<int>>();, but if the response is null, it will throw a cryptic exception saying that Null can't be assigned to List<int>. The fix was just to use await response.drain<void>(); instead.
The limitation is that RelativePositionedTransition takes an Animation<Rect> rect parameter, and if you want to use a RectTween with it, the value emitted there is Rect?, and one of the examples was just casting from Animation<Rect> to Animation<Rect?>, which is invalid, so I modified RelativePositionedTransition to take a Rect? and just use Rect.zero if the rect is null.
2021-09-28 09:32:06 -07:00
Greg Spencer
10e4b04010
Switch document generation to use the snippets package ( #87231 )
...
Switch document generation to use the snippets package instead of the snippets code in the Flutter repo. In the process, some bugs in sample code analysis have been fixed, and I've fixed some more errors in the samples.
This will allow the snippets package to be developed separately from the Flutter repo, and reduce the code in the Flutter repo.
The snippets code is deleted in this PR.
I also converted some comments in the snippet templates to be regular comments instead of doc comments, because having a doc comment block before the imports causes the Dart import sorter to lose the comment. They should have been regular comments in the first place.
The snippets package resides in the assets-for-api-docs repo.
The sample analysis has also been converted to be run in parallel, and I've bumped the Dartdoc version to 1.0.2.
2021-08-11 19:48:29 -07:00
Anna Gringauze
cc63c81408
Update all packages ( #87579 )
...
- Update dwds and and the rest of the packages
Closes: https://github.com/flutter/flutter/issues/87100
2021-08-03 16:37:48 -07:00
Jacob MacDonald
fdb80f916d
update packages to the latest ( #86880 )
2021-07-22 13:26:05 -07:00
Anna Gringauze
84c3b56877
Update dwds (and other packages) ( #86832 )
...
* Upgrade all packages
In particular, bring in dwds with latest fixes for flakes.
Closes: https://github.com/flutter/flutter/issues/85043
Related: https://github.com/flutter/flutter/issues/85575
* Re-enable fixed tests
* Disable failing test due to DDS issue
2021-07-21 21:47:10 -07:00
Christopher Fujino
2108fbd78d
add a check for env variable RELEASE_CHANNEL while generating docs ( #86501 )
...
* add a check for env variable RELEASE_CHANNEL in dev/snippets/lib/main.dart during doc generation
* update to LUCI_BRANCH, which is already populated
* validate env variable is either master or stable
2021-07-16 15:59:54 -07:00
Eng Zer Jun
57a4b023f1
build: update dependencies ( #86433 )
2021-07-14 13:46:04 -07:00
Yegor
78e06e716b
[web] move e2e tests from flutter/engine to flutter/flutter ( #86119 )
...
* [web] move e2e tests from flutter/engine to flutter/flutter
* flutter update-packages --force-upgrade
2021-07-09 15:31:49 -07:00
Filip Hracek
76d5e62f42
Add a more complete app template for Flutter (skeleton) ( #83530 )
2021-06-28 15:26:04 -07:00
Jonah Williams
03d14a30c8
[versions] remove mockito ( #85076 )
2021-06-22 17:41:03 -07:00
Phil Quitslund
875b420cc8
remove deprecated author
fields ( #84997 )
2021-06-22 06:06:03 -07:00
Hans Muller
ab9df83645
Retry dev/snippets git status, deflake snippets generator ( #84728 )
2021-06-16 15:39:02 -07:00
Jonah Williams
cd13c91119
[versions] update dependencies ( #84639 )
2021-06-15 11:08:57 -07:00
Michael Goderbauer
14b2e7ffee
flutter update-packages --force-upgrade ( #83911 )
2021-06-03 10:50:11 -07:00
Greg Spencer
bb40270069
Add more debug output to snippet git failures ( #83806 )
2021-06-02 15:34:28 -07:00
Jonah Williams
025a3a7da3
[versions] roll package test redux ( #83367 )
2021-05-26 17:22:28 -07:00
Jenn Magder
d7e49e559b
Run update packages, pick up file 6.1.1 ( #82770 )
2021-05-18 13:09:03 -07:00
Chris Bracken
3445cb86f2
Update dependency versions ( #82577 )
...
shelf 1.1.2 -> 1.1.4
flutter_template_images 1.0.2 -> 3.0.0
2021-05-14 16:51:36 -07:00
Abhishek Ghaskata
b554f893bd
Enable unnecessary_null_checks lint ( #82084 )
2021-05-14 10:44:03 -07:00
Kenzie Schmoll
766b4509c6
Add 'v' hotkey to open DevTools in the browser ( #82227 )
...
* Add 'v' hotkey to open DevTools in the browser
2021-05-13 09:54:10 -07:00
Michael Goderbauer
b8a2456737
Enable library_private_types_in_public_api lint ( #81578 )
2021-05-10 16:26:16 -07:00
Greg Spencer
59b406c760
Sort imports when interpolating sample templates ( #81873 )
2021-05-07 15:34:04 -07:00
Greg Spencer
7bff366b96
Convert snippets tool to null safety ( #78646 )
2021-04-29 22:34:04 -07:00
Jonah Williams
2b0d09dd81
[versions] roll versions and add ffi dep ( #81403 )
2021-04-28 11:19:03 -07:00
Jonah Williams
7d6e581f61
[versions] roll in latest shelf ( #81099 )
2021-04-23 20:39:02 -07:00
Jenn Magder
0f899f2b64
Roll packages ( #80989 )
2021-04-22 15:01:49 -07:00
Greg Spencer
b33c7891c1
Fix the sample analyzer to analyze dart:ui and make the analyzer null safe ( #80742 )
2021-04-22 12:14:02 -07:00