Skip to content
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
Binary file modified docfx/Docfx.App.dll
Binary file not shown.
Binary file modified docfx/Docfx.App.pdb
Binary file not shown.
Binary file modified docfx/Docfx.Build.Common.dll
Binary file not shown.
Binary file modified docfx/Docfx.Build.Common.pdb
Binary file not shown.
Binary file modified docfx/Docfx.Build.ManagedReference.dll
Binary file not shown.
Binary file modified docfx/Docfx.Build.ManagedReference.pdb
Binary file not shown.
Binary file modified docfx/Docfx.Build.OverwriteDocuments.dll
Binary file not shown.
Binary file modified docfx/Docfx.Build.OverwriteDocuments.pdb
Binary file not shown.
Binary file modified docfx/Docfx.Build.RestApi.dll
Binary file not shown.
Binary file modified docfx/Docfx.Build.RestApi.pdb
Binary file not shown.
Binary file modified docfx/Docfx.Build.SchemaDriven.dll
Binary file not shown.
Binary file modified docfx/Docfx.Build.SchemaDriven.pdb
Binary file not shown.
Binary file modified docfx/Docfx.Build.UniversalReference.dll
Binary file not shown.
Binary file modified docfx/Docfx.Build.UniversalReference.pdb
Binary file not shown.
Binary file modified docfx/Docfx.Build.dll
Binary file not shown.
Binary file modified docfx/Docfx.Build.pdb
Binary file not shown.
Binary file modified docfx/Docfx.Common.dll
Binary file not shown.
Binary file modified docfx/Docfx.Common.pdb
Binary file not shown.
Binary file modified docfx/Docfx.DataContracts.Common.dll
Binary file not shown.
Binary file modified docfx/Docfx.DataContracts.Common.pdb
Binary file not shown.
Binary file modified docfx/Docfx.DataContracts.RestApi.dll
Binary file not shown.
Binary file modified docfx/Docfx.DataContracts.RestApi.pdb
Binary file not shown.
Binary file modified docfx/Docfx.DataContracts.UniversalReference.dll
Binary file not shown.
Binary file modified docfx/Docfx.DataContracts.UniversalReference.pdb
Binary file not shown.
Binary file modified docfx/Docfx.Dotnet.dll
Binary file not shown.
Binary file modified docfx/Docfx.Dotnet.pdb
Binary file not shown.
Binary file modified docfx/Docfx.Glob.dll
Binary file not shown.
Binary file modified docfx/Docfx.Glob.pdb
Binary file not shown.
Binary file modified docfx/Docfx.MarkdigEngine.Extensions.dll
Binary file not shown.
Binary file modified docfx/Docfx.MarkdigEngine.Extensions.pdb
Binary file not shown.
Binary file modified docfx/Docfx.MarkdigEngine.dll
Binary file not shown.
Binary file modified docfx/Docfx.MarkdigEngine.pdb
Binary file not shown.
Binary file modified docfx/Docfx.Plugins.dll
Binary file not shown.
Binary file modified docfx/Docfx.Plugins.pdb
Binary file not shown.
Binary file modified docfx/Docfx.YamlSerialization.dll
Binary file not shown.
Binary file modified docfx/Docfx.YamlSerialization.pdb
Binary file not shown.
Binary file modified docfx/Microsoft.Build.Framework.dll
Binary file not shown.
Binary file modified docfx/Microsoft.Build.dll
Binary file not shown.
Binary file modified docfx/Microsoft.NET.StringTools.dll
Binary file not shown.
Binary file modified docfx/Microsoft.Playwright.dll
Binary file not shown.
39 changes: 23 additions & 16 deletions docfx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,37 @@ happened to win. See <https://github.com/dotnet/docfx/issues/8966>.

`source/docfx.json` therefore uses:

- **`assemblyUidPrefixes`** — maps assembly name to UID prefix, at the top level of `docfx.json` next to
`metadata`. It is a project level setting because every metadata entry has to agree on the prefixes: an
entry mints UIDs for the APIs it references as well as the ones it documents.
- **`uidPrefixOverride`** — a per entry prefix, for the assemblies that entry documents. The four
- **`assemblyUids`** — the assemblies whose APIs carry the assembly they are declared in as a component of
their UID, as in `linq2db.Tools::LinqToDB.Tools.Activity.ActivityStatistics`. It sits at the top level of
`docfx.json` next to `metadata`, because every metadata entry has to agree: an entry mints UIDs for the
APIs it references as well as the ones it documents.
- **`assemblyUidOverride`** — the component to use for the assemblies one entry documents. The four
Entity Framework Core entries all build an assembly named `linq2db.EntityFrameworkCore` (see
`LinqToDB.EntityFrameworkCore.props`), so they cannot be keyed by assembly name and this is the only
`LinqToDB.EntityFrameworkCore.props`), so they cannot be told apart by assembly name and this is the only
thing that separates them.

The assembly is a component of the identity, not a namespace segment: `LinqToDB` still reads as `LinqToDB`
in titles, breadcrumbs and links, and only the UID and the file name carry the assembly (`::` becomes `--`
in file names, as `:` is not legal there).

This replaces the older `globalPrefix` hack, which produced a malformed `commentId`, unprefixed
namespace and type hrefs, and ~1200 dead in-page anchors.
namespace and type hrefs, and ~1200 dead in-page anchors, and the `assemblyUidPrefixes` /
`uidPrefixOverride` pair before it, which spelled the assembly as a leading namespace segment and so
surfaced in page titles and the table of contents as a namespace that does not exist.

## How this build is produced

Branch: [`custom/linq2db-uidprefix`](https://github.com/MaceWindu/docfx/tree/custom/linq2db-uidprefix)
in <https://github.com/MaceWindu/docfx>, currently `91955d98a`. It is
[`fix/8966-uid-prefixes`](https://github.com/MaceWindu/docfx/pull/2) — the branch proposed for upstream
— plus one commit bumping Roslyn to 5.6.0.
Branch: [`fix/8966-uid-prefixes`](https://github.com/MaceWindu/docfx/pull/2) in
<https://github.com/MaceWindu/docfx>, currently `9907932d6` — the branch proposed for upstream, with
nothing added on top.

The Roslyn bump is required, not cosmetic: with Roslyn 5.0.0 and the .NET 10 SDK, opening the linq2db
projects fails with `System.TimeoutException` from `MSBuildProjectLoader`'s BuildHost. It is kept off the
upstream branch because it would churn docfx's snapshot tests.
The previous build needed one extra commit bumping Roslyn to 5.6.0, because with Roslyn 5.0.0 and the
.NET 10 SDK opening the linq2db projects failed with `System.TimeoutException` from
`MSBuildProjectLoader`'s BuildHost. Upstream has since taken that bump (dotnet/docfx#11047), so no custom
commit is required any more.

```powershell
git clone https://github.com/MaceWindu/docfx -b custom/linq2db-uidprefix
git clone https://github.com/MaceWindu/docfx -b fix/8966-uid-prefixes
cd docfx/templates; npm ci; npm run build; cd ..
dotnet build src/docfx/docfx.csproj -c Release -f net10.0

Expand All @@ -48,11 +55,11 @@ dotnet build src/docfx/docfx.csproj -c Release -f net10.0
`docfx.exe --version` prints the source commit, so the vendored build can always be traced back:

```
1.0.0+91955d98af242864651de19b5f94f40d1ba47ad2
1.0.0+9907932d6be6ad503885fc5c3c166ae4ce952be9
```

## When can this go away

Once `assemblyUidPrefixes` and `uidPrefixOverride` ship in a released docfx, drop this folder and switch
Once `assemblyUids` and `assemblyUidOverride` ship in a released docfx, drop this folder and switch
`build.ps1` back to the `docfx` global tool. The `source/docfx.json` options themselves do not need to
change.
Binary file added docfx/Spectre.Console.Ansi.dll
Binary file not shown.
Binary file modified docfx/Spectre.Console.Cli.dll
Binary file not shown.
Binary file modified docfx/Spectre.Console.dll
Binary file not shown.
Binary file modified docfx/System.Configuration.ConfigurationManager.dll
Binary file not shown.
Binary file modified docfx/System.Reflection.MetadataLoadContext.dll
Binary file not shown.
Binary file modified docfx/System.Security.Cryptography.ProtectedData.dll
Binary file not shown.
Loading