-
Notifications
You must be signed in to change notification settings - Fork 879
Description
Describe the bug
We are using DocFX to generate markdown API documentation based on two projects. The generation is run through a GitHub Action running on ubuntu-latest. It's been discovered that when running on Ubuntu, the dotnet docfx metadata command will skip all except the last glob listed in the metadata.src.files array.
For example, here is the docfx.json configuration file.
{
"metadata": [
{
"outputFormat": "markdown",
"src": [
{
"src": ".",
"files": [
"external/MonoGame/MonoGame.Framework/MonoGame.Framework.DesktopGL.csproj",
"external/MonoGame/MonoGame.Framework.Content.Pipeline/MonoGame.Framework.Content.Pipeline.csproj"
]
}
],
"dest": "./content/api",
"includePrivateMembers": false,
"disableGitFeatures": false,
"disableDefaultFilter": false,
"noRestore": false,
"namespaceLayout": "flattened",
"memberLayout": "samePage",
"EnumSortOrder": "alphabetic"
}
]
}With this configuration file, when run on windows-latest and macOS-latest GitHub runners, the following is output
dotnet docfx metadata
Using .NET Core SDK 8.0.100
Loading project /Users/aristurtle/Desktop/monogame-11ty/external/MonoGame/MonoGame.Framework/MonoGame.Framework.DesktopGL.csproj
Determining projects to restore...
Restored /Users/aristurtle/Desktop/monogame-11ty/external/MonoGame/MonoGame.Framework/MonoGame.Framework.DesktopGL.csproj (in 1.08 sec).
Loading project /Users/aristurtle/Desktop/monogame-11ty/external/MonoGame/MonoGame.Framework.Content.Pipeline/MonoGame.Framework.Content.Pipeline.csproj
Determining projects to restore...
Restored /Users/aristurtle/Desktop/monogame-11ty/external/MonoGame/MonoGame.Framework.Content.Pipeline/MonoGame.Framework.Content.Pipeline.csproj (in 443 ms).
1 of 2 projects are up-to-date for restore.
...
Export succeed: 460 items
However on ubunutu-latest the following is output
dotnet docfx metadata
Using .NET Core SDK 8.0.100
Loading project /Users/aristurtle/Desktop/monogame-11ty/external/MonoGame/MonoGame.Framework.Content.Pipeline/MonoGame.Framework.Content.Pipeline.csproj
Determining projects to restore...
Restored /Users/aristurtle/Desktop/monogame-11ty/external/MonoGame/MonoGame.Framework.Content.Pipeline/MonoGame.Framework.Content.Pipeline.csproj (in 443 ms).
1 of 2 projects are up-to-date for restore.
...
Export succeed: 275 items
As you can see it skips the first file listed in the metadata.src.files array and only runs the last file listed.
Note:
If the configuration is updated so that it only contains theMonoGame.Framework.DesktopGL.csprojin themetadata.src.filesarray, then it will generate the metadata for that project correctly on theubuntu-latestrunner. However, if both csproj files are listed, no matter the order they are listed, it only executes theMonoGame.Framework.Content.Pipeline.csproj
To Reproduce
A minimal example repository has been created at https://github.com/AristurtleDev/docfx-ubuntu-issue
The following steps should be performed in a windows, mac, and ubuntu environment to see the difference in how it runs in ubuntu vs mac/windows.
Steps to reproduce the behavior:
- Clone the minimal example repository
git clone https://github.com/AristurtleDev/docfx-ubuntu-issue.git cdinto directory- Restore dotnet tools
dotnet tool restore - Run the DocFX metadata command
dotnet docfx metadata
Expected behavior
Metadata documentation is generated for both csproj files listed in the metadata.src.files array in docfx.json.
Actual behavior
Metadata documentation is only generated for one csproj when running on the ubuntu-latest GitHub runner.
Context (please complete the following information):
- OS: Windows, Mac, Ubuntu
- Docfx version: [e.g. 2.74.1]
Additional context
You can view the output of the minimal sample repo for each operating system at the following links
- Windows: https://github.com/AristurtleDev/docfx-ubuntu-issue/actions/runs/7552372225/job/20561129343
- MacOS: https://github.com/AristurtleDev/docfx-ubuntu-issue/actions/runs/7552372222/job/20561129355
- Ubuntu: https://github.com/AristurtleDev/docfx-ubuntu-issue/actions/runs/7552372224/job/20561129340
This is also in reference to the following issue MonoGame/monogame.github.io#58