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 removed docfx/BuildHost-net472/System.ValueTuple.dll
Binary file not shown.
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/Jint.dll
Binary file not shown.
Binary file modified docfx/Markdig.dll
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.CodeAnalysis.CSharp.Workspaces.dll
Binary file not shown.
Binary file modified docfx/Microsoft.CodeAnalysis.CSharp.dll
Binary file not shown.
Binary file modified docfx/Microsoft.CodeAnalysis.ExternalAccess.RazorCompiler.dll
Binary file not shown.
Binary file modified docfx/Microsoft.CodeAnalysis.VisualBasic.Workspaces.dll
Binary file not shown.
Binary file modified docfx/Microsoft.CodeAnalysis.VisualBasic.dll
Binary file not shown.
Binary file modified docfx/Microsoft.CodeAnalysis.Workspaces.MSBuild.dll
Binary file not shown.
Binary file modified docfx/Microsoft.CodeAnalysis.Workspaces.dll
Binary file not shown.
Binary file modified docfx/Microsoft.CodeAnalysis.dll
Binary file not shown.
Binary file not shown.
Binary file removed docfx/Microsoft.Extensions.DependencyInjection.dll
Binary file not shown.
Binary file removed docfx/Microsoft.Extensions.Logging.Abstractions.dll
Binary file not shown.
Binary file removed docfx/Microsoft.Extensions.Logging.dll
Binary file not shown.
Binary file removed docfx/Microsoft.Extensions.Options.dll
Binary file not shown.
Binary file removed docfx/Microsoft.Extensions.Primitives.dll
Binary file not shown.
Binary file modified docfx/Microsoft.NET.StringTools.dll
Binary file not shown.
58 changes: 58 additions & 0 deletions docfx/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Vendored docfx build

`build.ps1` runs `./docfx/docfx` rather than the `docfx` global tool, because this site needs two
options that are not in released docfx yet.

## Why

linq2db documents 17 assemblies in one docfx project and many of them declare the same namespaces, most
of all `LinqToDB`. A docfx UID is derived from the fully qualified name of an API alone, so those APIs
collide: pages overwrite each other, `DuplicateUids` is reported and links resolve to whichever assembly
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
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
thing that separates them.

This replaces the older `globalPrefix` hack, which produced a malformed `commentId`, unprefixed
namespace and type hrefs, and ~1200 dead in-page anchors.

## 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.

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.

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

# then copy into this folder, replacing every tracked file:
# src/docfx/bin/Release/net10.0/*.{dll,exe,pdb,json,ps1,TXT}
# src/docfx/bin/Release/net10.0/{BuildHost-net472,BuildHost-netcore,templates}
# `.playwright` is not tracked, leave it alone.
```

`docfx.exe --version` prints the source commit, so the vendored build can always be traced back:

```
1.0.0+91955d98af242864651de19b5f94f40d1ba47ad2
```

## When can this go away

Once `assemblyUidPrefixes` and `uidPrefixOverride` 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 modified docfx/Spectre.Console.dll
Binary file not shown.
Binary file removed docfx/System.Collections.Immutable.dll
Binary file not shown.
Binary file modified docfx/System.Composition.AttributedModel.dll
Binary file not shown.
Binary file modified docfx/System.Composition.Convention.dll
Binary file not shown.
Binary file modified docfx/System.Composition.Hosting.dll
Binary file not shown.
Binary file modified docfx/System.Composition.Runtime.dll
Binary file not shown.
Binary file modified docfx/System.Composition.TypedParts.dll
Binary file not shown.
Binary file removed docfx/System.Diagnostics.DiagnosticSource.dll
Binary file not shown.
Binary file removed docfx/System.IO.Pipelines.dll
Binary file not shown.
Binary file removed docfx/System.Reflection.Metadata.dll
Binary file not shown.
Binary file modified docfx/System.Security.Cryptography.ProtectedData.dll
Binary file not shown.
Loading