Skip to content

Conversation

@sigurdm
Copy link
Contributor

@sigurdm sigurdm commented Jul 10, 2025

Attempt at fixing #4075, flutter/flutter#170868

Before dartdoc would canonicalize Future to dart:async when generating sdk docs, but not when generating a link from package docs.

@sigurdm sigurdm requested review from isoos and srawlins July 10, 2025 11:19
Copy link
Member

@srawlins srawlins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Impl looks good to me.

@sigurdm
Copy link
Contributor Author

sigurdm commented Oct 28, 2025

Sorry for the long delay on this one.

The tests seem to fail on windows only. Not sure what is going on.

@srawlins do you understand why we get this? Is it because the file system on windows is not case-sensitive?
https://github.com/dart-lang/dartdoc/actions/runs/18772999367/job/53561163122?pr=4076#step:10:673

@srawlins
Copy link
Member

Very strange, the PR is so simple, and the affected test is dartdoc_test.dart, I believe, which is looking at the testing/ packages. My guess is the backslashes: in HTML all of the links should be forward slashes. Maybe there is logic somewhere in there that is using filepaths, with backslashes, in a way that was not used before this PR.

@srawlins
Copy link
Member

Ah this code suspiciously looks at slashes and has the word remote 🤣

late final String baseHref = documentedWhere == DocumentLocation.remote
? (_remoteBaseHref.endsWith('/') ? _remoteBaseHref : '$_remoteBaseHref/')
: (config.useBaseHref ? '' : htmlBasePlaceholder);

ModelElement.href uses this getter, and ModelElement.href is how each element is linked to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants