Skip to content

Fix remote linking in 2.18 and 3.0.0 #3267

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion lib/src/dartdoc_options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1459,7 +1459,10 @@ List<DartdocOption> createDartdocOptions(
..addAll([
DartdocOptionArgOnly<Map<String, String>>(
'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<Map<String, String>>(
Expand Down
3 changes: 1 addition & 2 deletions test/end2end/dartdoc_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion testing/sky_engine/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
1 change: 0 additions & 1 deletion tool/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion tool/grind.dart
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,9 @@ Future<String> _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);
Expand Down