From 74c43a01e7d6c0b3488369e768c2a14baf3ccc5b Mon Sep 17 00:00:00 2001 From: Parker Lougheed Date: Wed, 9 Oct 2024 18:40:28 -0500 Subject: [PATCH 1/4] Clean up gitignore and mono_repo setup --- .github/workflows/dart.yml | 68 ++++++++++++++++---- .gitignore | 14 ++-- doc/README.md | 16 ++++- doc/index.md | 15 ----- mono_repo.yaml | 2 +- pkgs/analysis_defaults/.gitignore | 14 ---- pkgs/analysis_defaults/analysis_options.yaml | 1 + pkgs/analysis_defaults/mono_pkg.yaml | 12 ++++ pkgs/excerpter/.gitignore | 2 - pkgs/excerpter/mono_pkg.yaml | 2 +- pkgs/inject_dartpad/.gitignore | 11 ---- pkgs/inject_dartpad/mono_pkg.yaml | 2 +- 12 files changed, 96 insertions(+), 63 deletions(-) mode change 120000 => 100644 doc/README.md delete mode 100644 doc/index.md delete mode 100644 pkgs/analysis_defaults/.gitignore create mode 100644 pkgs/analysis_defaults/analysis_options.yaml create mode 100644 pkgs/analysis_defaults/mono_pkg.yaml delete mode 100644 pkgs/excerpter/.gitignore delete mode 100644 pkgs/inject_dartpad/.gitignore diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index f3be550..86d163a 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -39,16 +39,16 @@ jobs: - name: mono_repo self validate run: dart pub global run mono_repo generate --validate job_002: - name: "analyzer_and_format; Dart 3.5.0; PKGS: pkgs/excerpter, pkgs/inject_dartpad; `dart format --output=none --set-exit-if-changed .`, `dart analyze --fatal-infos .`" + name: "analyzer_and_format; Dart 3.5.0; PKGS: pkgs/analysis_defaults, pkgs/excerpter, pkgs/inject_dartpad; `dart format --output=none --set-exit-if-changed .`, `dart analyze --fatal-infos .`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0;packages:pkgs/excerpter-pkgs/inject_dartpad;commands:format-analyze" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0;packages:pkgs/analysis_defaults-pkgs/excerpter-pkgs/inject_dartpad;commands:format-analyze" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0;packages:pkgs/excerpter-pkgs/inject_dartpad + os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0;packages:pkgs/analysis_defaults-pkgs/excerpter-pkgs/inject_dartpad os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest @@ -59,6 +59,19 @@ jobs: - id: checkout name: Checkout repository uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 + - id: pkgs_analysis_defaults_pub_upgrade + name: pkgs/analysis_defaults; dart pub upgrade + run: dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/analysis_defaults + - name: "pkgs/analysis_defaults; dart format --output=none --set-exit-if-changed ." + run: "dart format --output=none --set-exit-if-changed ." + if: "always() && steps.pkgs_analysis_defaults_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/analysis_defaults + - name: "pkgs/analysis_defaults; dart analyze --fatal-infos ." + run: dart analyze --fatal-infos . + if: "always() && steps.pkgs_analysis_defaults_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/analysis_defaults - id: pkgs_excerpter_pub_upgrade name: pkgs/excerpter; dart pub upgrade run: dart pub upgrade @@ -86,16 +99,16 @@ jobs: if: "always() && steps.pkgs_inject_dartpad_pub_upgrade.conclusion == 'success'" working-directory: pkgs/inject_dartpad job_003: - name: "analyzer_and_format; Dart dev; PKGS: pkgs/excerpter, pkgs/inject_dartpad; `dart format --output=none --set-exit-if-changed .`, `dart analyze --fatal-infos .`" + name: "analyzer_and_format; Dart dev; PKGS: pkgs/analysis_defaults, pkgs/excerpter, pkgs/inject_dartpad; `dart format --output=none --set-exit-if-changed .`, `dart analyze --fatal-infos .`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/excerpter-pkgs/inject_dartpad;commands:format-analyze" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/analysis_defaults-pkgs/excerpter-pkgs/inject_dartpad;commands:format-analyze" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/excerpter-pkgs/inject_dartpad + os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/analysis_defaults-pkgs/excerpter-pkgs/inject_dartpad os:ubuntu-latest;pub-cache-hosted;sdk:dev os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest @@ -106,6 +119,19 @@ jobs: - id: checkout name: Checkout repository uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 + - id: pkgs_analysis_defaults_pub_upgrade + name: pkgs/analysis_defaults; dart pub upgrade + run: dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/analysis_defaults + - name: "pkgs/analysis_defaults; dart format --output=none --set-exit-if-changed ." + run: "dart format --output=none --set-exit-if-changed ." + if: "always() && steps.pkgs_analysis_defaults_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/analysis_defaults + - name: "pkgs/analysis_defaults; dart analyze --fatal-infos ." + run: dart analyze --fatal-infos . + if: "always() && steps.pkgs_analysis_defaults_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/analysis_defaults - id: pkgs_excerpter_pub_upgrade name: pkgs/excerpter; dart pub upgrade run: dart pub upgrade @@ -133,16 +159,16 @@ jobs: if: "always() && steps.pkgs_inject_dartpad_pub_upgrade.conclusion == 'success'" working-directory: pkgs/inject_dartpad job_004: - name: "unit_test; Dart 3.5.0; PKG: pkgs/excerpter; `dart test`" + name: "unit_test; Dart 3.5.0; PKGS: pkgs/analysis_defaults, pkgs/excerpter; `dart test`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0;packages:pkgs/excerpter;commands:test" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0;packages:pkgs/analysis_defaults-pkgs/excerpter;commands:test" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0;packages:pkgs/excerpter + os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0;packages:pkgs/analysis_defaults-pkgs/excerpter os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest @@ -153,6 +179,15 @@ jobs: - id: checkout name: Checkout repository uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 + - id: pkgs_analysis_defaults_pub_upgrade + name: pkgs/analysis_defaults; dart pub upgrade + run: dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/analysis_defaults + - name: pkgs/analysis_defaults; dart test + run: dart test + if: "always() && steps.pkgs_analysis_defaults_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/analysis_defaults - id: pkgs_excerpter_pub_upgrade name: pkgs/excerpter; dart pub upgrade run: dart pub upgrade @@ -167,16 +202,16 @@ jobs: - job_002 - job_003 job_005: - name: "unit_test; Dart dev; PKG: pkgs/excerpter; `dart test`" + name: "unit_test; Dart dev; PKGS: pkgs/analysis_defaults, pkgs/excerpter; `dart test`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/excerpter;commands:test" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/analysis_defaults-pkgs/excerpter;commands:test" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/excerpter + os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/analysis_defaults-pkgs/excerpter os:ubuntu-latest;pub-cache-hosted;sdk:dev os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest @@ -187,6 +222,15 @@ jobs: - id: checkout name: Checkout repository uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 + - id: pkgs_analysis_defaults_pub_upgrade + name: pkgs/analysis_defaults; dart pub upgrade + run: dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/analysis_defaults + - name: pkgs/analysis_defaults; dart test + run: dart test + if: "always() && steps.pkgs_analysis_defaults_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/analysis_defaults - id: pkgs_excerpter_pub_upgrade name: pkgs/excerpter; dart pub upgrade run: dart pub upgrade diff --git a/.gitignore b/.gitignore index c085ac2..37223d2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,12 +1,16 @@ +# Dart-related files +.dart_tool +build +doc/api/ +pubspec.lock + +# IDE-related files *.iml .idea .vscode -.DS_Store -.dart_tool -build/ - -build +# Platform-related files +.DS_Store # We want to ignore our StylesPath *except* for our local # `vocabularies/Base` directory. diff --git a/doc/README.md b/doc/README.md deleted file mode 120000 index dd0ea36..0000000 --- a/doc/README.md +++ /dev/null @@ -1 +0,0 @@ -index.md \ No newline at end of file diff --git a/doc/README.md b/doc/README.md new file mode 100644 index 0000000..3bae730 --- /dev/null +++ b/doc/README.md @@ -0,0 +1,15 @@ +--- +title: Site-shared docs +description: Site-shared docs +--- + +# Site-shared docs + +- [Infrastructure](infrastructure.md): shared site infrastructure. +- [Examples](examples.md): how to organize site example code. +- [Code excerpts](code-excerpts.md): how to use the code-excerpt feature + and its associated tooling. +- [Markdown](markdown.md) is an _Effective markdown_ guide. +- [images](images.md) +- [mobile friendly pages](mobile-friendly-pages.md) +- [writing for dart and flutter websites](writing-for-dart-and-flutter-websites.md) diff --git a/doc/index.md b/doc/index.md deleted file mode 100644 index 3bae730..0000000 --- a/doc/index.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: Site-shared docs -description: Site-shared docs ---- - -# Site-shared docs - -- [Infrastructure](infrastructure.md): shared site infrastructure. -- [Examples](examples.md): how to organize site example code. -- [Code excerpts](code-excerpts.md): how to use the code-excerpt feature - and its associated tooling. -- [Markdown](markdown.md) is an _Effective markdown_ guide. -- [images](images.md) -- [mobile friendly pages](mobile-friendly-pages.md) -- [writing for dart and flutter websites](writing-for-dart-and-flutter-websites.md) diff --git a/mono_repo.yaml b/mono_repo.yaml index 9b76889..190d853 100644 --- a/mono_repo.yaml +++ b/mono_repo.yaml @@ -1,4 +1,4 @@ -# See https://github.com/google/mono_repo.dart for details on this file +# Reference https://pub.dev/packages/mono_repo for help with this file. self_validate: analyzer_and_format github: diff --git a/pkgs/analysis_defaults/.gitignore b/pkgs/analysis_defaults/.gitignore deleted file mode 100644 index fdc2120..0000000 --- a/pkgs/analysis_defaults/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -# Files and directories created by pub -.dart_tool -.pub/ -build/ -packages -# Remove the following pattern if you wish to check in your lock file -pubspec.lock - -# Directory created by dartdoc -doc/api/ - -# IDEs -.idea/ -.vscode/ diff --git a/pkgs/analysis_defaults/analysis_options.yaml b/pkgs/analysis_defaults/analysis_options.yaml new file mode 100644 index 0000000..b9bdf80 --- /dev/null +++ b/pkgs/analysis_defaults/analysis_options.yaml @@ -0,0 +1 @@ +include: package:analysis_defaults/analysis.yaml diff --git a/pkgs/analysis_defaults/mono_pkg.yaml b/pkgs/analysis_defaults/mono_pkg.yaml new file mode 100644 index 0000000..513be8c --- /dev/null +++ b/pkgs/analysis_defaults/mono_pkg.yaml @@ -0,0 +1,12 @@ +# Reference https://pub.dev/packages/mono_repo for help with this file. +sdk: + - pubspec + - dev + +stages: + - analyzer_and_format: + - group: + - format + - analyze: --fatal-infos . + - unit_test: + - test: diff --git a/pkgs/excerpter/.gitignore b/pkgs/excerpter/.gitignore deleted file mode 100644 index 05d0295..0000000 --- a/pkgs/excerpter/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -.dart_tool/ -pubspec.lock diff --git a/pkgs/excerpter/mono_pkg.yaml b/pkgs/excerpter/mono_pkg.yaml index d4e257b..89187bb 100644 --- a/pkgs/excerpter/mono_pkg.yaml +++ b/pkgs/excerpter/mono_pkg.yaml @@ -1,4 +1,4 @@ -# See https://github.com/google/mono_repo.dart for details on this file +# Reference https://pub.dev/packages/mono_repo for help with this file. sdk: - pubspec - dev diff --git a/pkgs/inject_dartpad/.gitignore b/pkgs/inject_dartpad/.gitignore deleted file mode 100644 index 34d49b3..0000000 --- a/pkgs/inject_dartpad/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -# Dart-related files -.dart_tool -pubspec.lock - -# IDE-related files -*.iml -.idea/ -.vscode/ - -# Platform-related files -.DS_Store diff --git a/pkgs/inject_dartpad/mono_pkg.yaml b/pkgs/inject_dartpad/mono_pkg.yaml index aaf4a6a..ccb958a 100644 --- a/pkgs/inject_dartpad/mono_pkg.yaml +++ b/pkgs/inject_dartpad/mono_pkg.yaml @@ -1,4 +1,4 @@ -# See https://github.com/google/mono_repo.dart for details on this file +# Reference https://pub.dev/packages/mono_repo for help with this file. sdk: - pubspec - dev From 9da7b9d2eed8c062d3f85158254a088bfc7dc1df Mon Sep 17 00:00:00 2001 From: Parker Lougheed Date: Wed, 9 Oct 2024 21:11:44 -0500 Subject: [PATCH 2/4] Don't test analysis_defaults --- pkgs/analysis_defaults/mono_pkg.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkgs/analysis_defaults/mono_pkg.yaml b/pkgs/analysis_defaults/mono_pkg.yaml index 513be8c..09c48c6 100644 --- a/pkgs/analysis_defaults/mono_pkg.yaml +++ b/pkgs/analysis_defaults/mono_pkg.yaml @@ -7,6 +7,4 @@ stages: - analyzer_and_format: - group: - format - - analyze: --fatal-infos . - - unit_test: - - test: + - analyze: --fatal-infos . \ No newline at end of file From 17635975c42c5bd4a91aa7ef767014471eca2c3f Mon Sep 17 00:00:00 2001 From: Parker Lougheed Date: Wed, 9 Oct 2024 21:15:16 -0500 Subject: [PATCH 3/4] Add missing new line at EOF --- pkgs/analysis_defaults/mono_pkg.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/analysis_defaults/mono_pkg.yaml b/pkgs/analysis_defaults/mono_pkg.yaml index 09c48c6..424d75f 100644 --- a/pkgs/analysis_defaults/mono_pkg.yaml +++ b/pkgs/analysis_defaults/mono_pkg.yaml @@ -7,4 +7,4 @@ stages: - analyzer_and_format: - group: - format - - analyze: --fatal-infos . \ No newline at end of file + - analyze: --fatal-infos . From 6cfed234a523081689ef15fb512b17580cf26c6a Mon Sep 17 00:00:00 2001 From: Parker Lougheed Date: Wed, 9 Oct 2024 21:15:46 -0500 Subject: [PATCH 4/4] Regenerate after not testing analysis_defaults --- .github/workflows/dart.yml | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 86d163a..a203978 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -159,16 +159,16 @@ jobs: if: "always() && steps.pkgs_inject_dartpad_pub_upgrade.conclusion == 'success'" working-directory: pkgs/inject_dartpad job_004: - name: "unit_test; Dart 3.5.0; PKGS: pkgs/analysis_defaults, pkgs/excerpter; `dart test`" + name: "unit_test; Dart 3.5.0; PKG: pkgs/excerpter; `dart test`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0;packages:pkgs/analysis_defaults-pkgs/excerpter;commands:test" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0;packages:pkgs/excerpter;commands:test" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0;packages:pkgs/analysis_defaults-pkgs/excerpter + os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0;packages:pkgs/excerpter os:ubuntu-latest;pub-cache-hosted;sdk:3.5.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest @@ -179,15 +179,6 @@ jobs: - id: checkout name: Checkout repository uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 - - id: pkgs_analysis_defaults_pub_upgrade - name: pkgs/analysis_defaults; dart pub upgrade - run: dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: pkgs/analysis_defaults - - name: pkgs/analysis_defaults; dart test - run: dart test - if: "always() && steps.pkgs_analysis_defaults_pub_upgrade.conclusion == 'success'" - working-directory: pkgs/analysis_defaults - id: pkgs_excerpter_pub_upgrade name: pkgs/excerpter; dart pub upgrade run: dart pub upgrade @@ -202,16 +193,16 @@ jobs: - job_002 - job_003 job_005: - name: "unit_test; Dart dev; PKGS: pkgs/analysis_defaults, pkgs/excerpter; `dart test`" + name: "unit_test; Dart dev; PKG: pkgs/excerpter; `dart test`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/analysis_defaults-pkgs/excerpter;commands:test" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/excerpter;commands:test" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/analysis_defaults-pkgs/excerpter + os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/excerpter os:ubuntu-latest;pub-cache-hosted;sdk:dev os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest @@ -222,15 +213,6 @@ jobs: - id: checkout name: Checkout repository uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 - - id: pkgs_analysis_defaults_pub_upgrade - name: pkgs/analysis_defaults; dart pub upgrade - run: dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: pkgs/analysis_defaults - - name: pkgs/analysis_defaults; dart test - run: dart test - if: "always() && steps.pkgs_analysis_defaults_pub_upgrade.conclusion == 'success'" - working-directory: pkgs/analysis_defaults - id: pkgs_excerpter_pub_upgrade name: pkgs/excerpter; dart pub upgrade run: dart pub upgrade