Skip to content

Commit

Permalink
Upgrading to 3.6 SDK and preparing dartdoc 8.13 use. (#1421)
Browse files Browse the repository at this point in the history
  • Loading branch information
isoos authored Nov 25, 2024
1 parent 3e079fb commit 42bd80c
Show file tree
Hide file tree
Showing 42 changed files with 610 additions and 646 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/test-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
fail-fast: false
matrix:
sdk: [3.5.0]
sdk: [3.6.0-334.4.beta]
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
Expand Down Expand Up @@ -49,8 +49,8 @@ jobs:
# TODO(sigurdm): our end2end test creates longer filenames than we can
# handle on windows. See https://github.com/dart-lang/sdk/issues/42416
os: [ubuntu-latest, macos-latest]
sdk: [3.5.0]
flutter: [3.24.0]
sdk: [3.6.0-334.4.beta]
flutter: [3.27.0-0.2.pre]
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
with:
sdk: '3.6.0-122.0.dev' # TODO: switch back to rolling 'dev' channel after it gets updated.
sdk: '3.7.0-164.0.dev' # TODO: switch back to rolling 'dev' channel after it gets updated.
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
with:
# flutter-version: '3.4.0-34.1.pre'
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.22.16

- Fixed deprecated API use.
- Preparing to use with `dartdoc 8.3.0`.

## 0.22.15

- Detect support for Swift Package Manager for ios/macos plugins.
Expand Down
22 changes: 7 additions & 15 deletions lib/src/batch/batch_model.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 8 additions & 7 deletions lib/src/code_problem.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ import 'internal_model.dart';
import 'tool/run_constrained.dart' show ToolException;

// ignore: prefer_interpolation_to_compose_strings
final _regexp = RegExp('^' + // beginning of line
'([\\w_\\.]+)\\|' * 3 + // first three error notes
'([^\\|]+)\\|' + // file path
'([\\w_\\.]+)\\|' * 3 + // line, column, length
'(.*?)' + // rest is the error message
'\$' // end of line
);
final _regexp = RegExp([
'^', // beginning of line
'([\\w_\\.]+)\\|' * 3, // first three error notes
'([^\\|]+)\\|', // file path
'([\\w_\\.]+)\\|' * 3, // line, column, length
'(.*?)', // rest is the error message
'\$', // end of line
].join());

CodeProblem? parseCodeProblem(String content, {String? projectDir}) {
if (content.isEmpty) {
Expand Down
8 changes: 6 additions & 2 deletions lib/src/dartdoc/dartdoc_index.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,12 @@ class DartdocIndexEntry {

Map<String, dynamic> toJson() => _$DartdocIndexEntryToJson(this);

/// Whether the entry is a top-level library.
bool get isLibrary => href != null && href!.endsWith('-library.html');
/// Weather the entry is a top-level library:
/// - pre-8.3.0 the file ended with `-library.html`
/// - with 8.3.0 the reference is a top-level directory with no slash in it
late final isLibrary = href != null &&
href!.isNotEmpty &&
(href!.endsWith('-library.html') || !href!.contains('/'));

/// Whether the entry is a class declaration.
bool get isClass => href != null && href!.endsWith('-class.html');
Expand Down
52 changes: 18 additions & 34 deletions lib/src/dartdoc/dartdoc_index.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 10 additions & 3 deletions lib/src/dartdoc/pub_dartdoc_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,16 @@ class ApiElement {

String get qualifiedName => parent == null ? name : '$parent.$name';

/// Weather the entry is a top-level library.
late final isLibrary = href != null && href!.endsWith('-library.html');
late final isClass = href != null && href!.endsWith('-class.html');
/// Weather the entry is a top-level library:
/// - pre-8.3.0 the file ended with `-library.html`
/// - with 8.3.0 the reference is a top-level directory with no slash in it
late final isLibrary = href != null &&
href!.isNotEmpty &&
(href!.endsWith('-library.html') || !href!.contains('/'));

/// Whether the entry is a class declaration.
late final isClass =
href != null && href!.isNotEmpty && href!.endsWith('-class.html');
}

/// The documentation coverage numbers and the derived scores.
Expand Down
68 changes: 21 additions & 47 deletions lib/src/dartdoc/pub_dartdoc_data.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 13 additions & 29 deletions lib/src/internal_model.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 42bd80c

Please sign in to comment.