Skip to content

Commit 3e3999a

Browse files
authored
Fix lints and tests. (#4070)
1 parent f1fe177 commit 3e3999a

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

.github/workflows/test.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
fail-fast: false
2323
matrix:
2424
os: [ubuntu-latest]
25-
sdk: [3.7.0, dev]
25+
sdk: [3.8.0, dev]
2626
job: [main, flutter, packages, sdk-docs]
2727
include:
2828
- os: macos-latest
@@ -35,9 +35,9 @@ jobs:
3535
# Do not try to run flutter against the "stable" sdk,
3636
# it is unlikely to work and produces uninteresting
3737
# results.
38-
- sdk: 3.7.0
38+
- sdk: 3.8.0
3939
job: flutter
40-
- sdk: 3.7.0
40+
- sdk: 3.8.0
4141
job: sdk-docs
4242

4343
steps:

lib/src/model/canonicalization.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ final class _Canonicalization {
8989
Element2? ancestor = element;
9090
while (ancestor != null) {
9191
if (ancestor is LibraryElement2) {
92-
components.insert(0, ancestor.identifier);
92+
components.insert(0, ancestor.uri.toString());
9393
} else {
9494
components.insert(0, ancestor.name3!);
9595
}

lib/src/model/model_element.dart

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -412,11 +412,12 @@ abstract class ModelElement
412412
return false;
413413
}
414414

415-
if (element case LibraryElement2(:var identifier, :var firstFragment)) {
415+
if (element case LibraryElement2(:var uri, :var firstFragment)) {
416+
final url = uri.toString();
416417
// Private Dart SDK libraries are not public.
417-
if (identifier.startsWith('dart:_') ||
418-
identifier.startsWith('dart:nativewrappers/') ||
419-
'dart:nativewrappers' == identifier) {
418+
if (url.startsWith('dart:_') ||
419+
url.startsWith('dart:nativewrappers/') ||
420+
url == 'dart:nativewrappers') {
420421
return false;
421422
}
422423
// Package-private libraries are not public.

test/end2end/dartdoc_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ void main() {
110110
expect(
111111
useSomethingInAnotherPackage.modelType.linkedName,
112112
matches(
113-
r'<a class="deprecated" href="https://pub.dev/documentation/meta/[^"]*/meta/Required-class.html">Required</a>'));
113+
r'<a class="deprecated" href="https://pub.dev/documentation/meta/[^"]*/meta/Required-class.html">Required</a>\?'));
114114
var link = RegExp('/dart-core/String-class.html">String</a>');
115115
expect(useSomethingInTheSdk.modelType.linkedName, contains(link));
116116
});

0 commit comments

Comments
 (0)