Skip to content

Commit bede500

Browse files
authored
Fix remote linking in 2.18 and 3.0.0 (#3267)
1 parent f2bb6e9 commit bede500

File tree

6 files changed

+9
-11
lines changed

6 files changed

+9
-11
lines changed

.github/workflows/test.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,6 @@ jobs:
3939
job: flutter
4040
- sdk: stable
4141
job: sdk-docs
42-
# Do not run the "packages" job on "stable", until "stable"
43-
# means >= 2.19. This is where pub switches the hosted
44-
# directory on disk from pub.dartlang.org to pub.dev.
45-
- sdk: stable
46-
job: packages
4742

4843
steps:
4944
- name: Store date

lib/src/dartdoc_options.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1459,7 +1459,10 @@ List<DartdocOption> createDartdocOptions(
14591459
..addAll([
14601460
DartdocOptionArgOnly<Map<String, String>>(
14611461
'hosted',
1462-
{'pub.dev': 'https://pub.dev/documentation/%n%/%v%'},
1462+
{
1463+
'pub.dartlang.org': 'https://pub.dev/documentation/%n%/%v%',
1464+
'pub.dev': 'https://pub.dev/documentation/%n%/%v%',
1465+
},
14631466
resourceProvider,
14641467
help: 'Specify URLs for hosted pub packages'),
14651468
DartdocOptionArgOnly<Map<String, String>>(

test/end2end/dartdoc_test.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,7 @@ void main() {
9898
contains('Tool "drill" returned non-zero exit code'));
9999
});
100100

101-
test('basic interlinking test', skip: Platform.version.contains('2.18'),
102-
() async {
101+
test('basic interlinking test', () async {
103102
var dartdoc = await buildDartdoc(
104103
['--exclude-packages=args'], _testPackageDir, tempDir);
105104
var results = await dartdoc.generateDocs();

testing/sky_engine/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ name: sky_engine
22
description: package with embedder yaml
33
version: 0.0.1
44
environment:
5-
sdk: '>=2.0.0 <3.0.0'
5+
sdk: '>=2.12.0 <3.0.0'

tool/ci.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ elif [ "$DARTDOC_BOT" = "packages" ]; then
2929
PACKAGE_NAME=access PACKAGE_VERSION=">=1.0.1+2" dart run grinder build-pub-package
3030
# Negative test for flutter_plugin_tools, make sure right error message is displayed.
3131
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"
32-
PACKAGE_NAME=shelf_exception_handler PACKAGE_VERSION=">=0.2.0" dart run grinder build-pub-package
3332
elif [ "$DARTDOC_BOT" = "sdk-analyzer" ]; then
3433
echo "Running all tests against the SDK analyzer"
3534
unset COVERAGE_TOKEN

tool/grind.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,9 @@ Future<String> _buildPubPackageDocs(
921921
if (version != null) ...['-v', version],
922922
pubPackageName,
923923
]);
924-
var cache = Directory(p.join(env['PUB_CACHE']!, 'hosted', 'pub.dev'));
924+
var pubHost =
925+
Platform.version.contains('2.18') ? 'pub.dartlang.org' : 'pub.dev';
926+
var cache = Directory(p.join(env['PUB_CACHE']!, 'hosted', pubHost));
925927
var pubPackageDirOrig =
926928
cache.listSync().firstWhere((e) => e.path.contains(pubPackageName));
927929
var pubPackageDir = Directory.systemTemp.createTempSync(pubPackageName);

0 commit comments

Comments
 (0)