From bab20770e93c035b9d8b699fed6376afe52a1332 Mon Sep 17 00:00:00 2001 From: Sam Rawlins Date: Fri, 9 Dec 2022 11:14:31 -0800 Subject: [PATCH 1/3] Fix remote linking in 2.18 --- .github/workflows/test.yaml | 5 ----- lib/src/dartdoc_options.dart | 5 ++++- test/end2end/dartdoc_test.dart | 3 +-- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 1d9533a56e..03f6a3d6d9 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -39,11 +39,6 @@ jobs: job: flutter - sdk: stable job: sdk-docs - # Do not run the "packages" job on "stable", until "stable" - # means >= 2.19. This is where pub switches the hosted - # directory on disk from pub.dartlang.org to pub.dev. - - sdk: stable - job: packages steps: - name: Store date diff --git a/lib/src/dartdoc_options.dart b/lib/src/dartdoc_options.dart index 7e3c15131a..cf28623c46 100644 --- a/lib/src/dartdoc_options.dart +++ b/lib/src/dartdoc_options.dart @@ -1459,7 +1459,10 @@ List createDartdocOptions( ..addAll([ DartdocOptionArgOnly>( 'hosted', - {'pub.dev': 'https://pub.dev/documentation/%n%/%v%'}, + { + 'pub.dartlang.org': 'https://pub.dev/documentation/%n%/%v%', + 'pub.dev': 'https://pub.dev/documentation/%n%/%v%', + }, resourceProvider, help: 'Specify URLs for hosted pub packages'), DartdocOptionArgOnly>( diff --git a/test/end2end/dartdoc_test.dart b/test/end2end/dartdoc_test.dart index 03273a66a9..bb992eb4ee 100644 --- a/test/end2end/dartdoc_test.dart +++ b/test/end2end/dartdoc_test.dart @@ -98,8 +98,7 @@ void main() { contains('Tool "drill" returned non-zero exit code')); }); - test('basic interlinking test', skip: Platform.version.contains('2.18'), - () async { + test('basic interlinking test', () async { var dartdoc = await buildDartdoc( ['--exclude-packages=args'], _testPackageDir, tempDir); var results = await dartdoc.generateDocs(); From 3260e37f55d34cec29a5bf991bab0d5a482847aa Mon Sep 17 00:00:00 2001 From: Sam Rawlins Date: Sat, 10 Dec 2022 14:03:07 -0800 Subject: [PATCH 2/3] More fixes --- testing/sky_engine/pubspec.yaml | 2 +- tool/grind.dart | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/testing/sky_engine/pubspec.yaml b/testing/sky_engine/pubspec.yaml index 98e839abec..e6e82519c2 100644 --- a/testing/sky_engine/pubspec.yaml +++ b/testing/sky_engine/pubspec.yaml @@ -2,4 +2,4 @@ name: sky_engine description: package with embedder yaml version: 0.0.1 environment: - sdk: '>=2.0.0 <3.0.0' + sdk: '>=2.12.0 <3.0.0' diff --git a/tool/grind.dart b/tool/grind.dart index afd83521be..33d7ed6b11 100644 --- a/tool/grind.dart +++ b/tool/grind.dart @@ -921,7 +921,9 @@ Future _buildPubPackageDocs( if (version != null) ...['-v', version], pubPackageName, ]); - var cache = Directory(p.join(env['PUB_CACHE']!, 'hosted', 'pub.dev')); + var pubHost = + Platform.version.contains('2.18') ? 'pub.dartlang.org' : 'pub.dev'; + var cache = Directory(p.join(env['PUB_CACHE']!, 'hosted', pubHost)); var pubPackageDirOrig = cache.listSync().firstWhere((e) => e.path.contains(pubPackageName)); var pubPackageDir = Directory.systemTemp.createTempSync(pubPackageName); From e65b166b98fc2fd6b656a20c7e97209691f18570 Mon Sep 17 00:00:00 2001 From: Sam Rawlins Date: Sat, 10 Dec 2022 14:12:01 -0800 Subject: [PATCH 3/3] Remove shelf_exception_handler, which is dead --- tool/ci.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/tool/ci.sh b/tool/ci.sh index 001c71e74a..919e554ca8 100755 --- a/tool/ci.sh +++ b/tool/ci.sh @@ -29,7 +29,6 @@ elif [ "$DARTDOC_BOT" = "packages" ]; then PACKAGE_NAME=access PACKAGE_VERSION=">=1.0.1+2" dart run grinder build-pub-package # Negative test for flutter_plugin_tools, make sure right error message is displayed. PACKAGE_NAME=flutter_plugin_tools PACKAGE_VERSION=">=0.0.14+1" dart run grinder build-pub-package 2>&1 | grep "warning: package:flutter_plugin_tools has no documentable libraries" - PACKAGE_NAME=shelf_exception_handler PACKAGE_VERSION=">=0.2.0" dart run grinder build-pub-package elif [ "$DARTDOC_BOT" = "sdk-analyzer" ]; then echo "Running all tests against the SDK analyzer" unset COVERAGE_TOKEN