Skip to content

CHANGE: docs tools update - #2460

Open
ritamerkl wants to merge 21 commits into
developfrom
update-docs-tooling
Open

CHANGE: docs tools update#2460
ritamerkl wants to merge 21 commits into
developfrom
update-docs-tooling

Conversation

@ritamerkl

Copy link
Copy Markdown
Collaborator

Description

Upgrading docs package tools. DocFX is no longer part of the package and needs to be installed separately.

Testing status & QA

None.

Overall Product Risks

  • Complexity: Low
  • Halo Effect: Low

Comments to reviewers

Checklist

Before review:

  • Changelog entry added.
    • Explains the change in Changed, Fixed, Added sections.
    • For API change contains an example snippet and/or migration example.
    • JIRA ticket linked, example (case %%). If it is a private issue, just add the case ID without a link.
    • Jira port for the next release set as "Resolved".
  • Tests added/changed, if applicable.
    • Functional tests Area_CanDoX, Area_CanDoX_EvenIfYIsTheCase, Area_WhenIDoX_AndYHappens_ThisIsTheResult.
    • Performance tests.
    • Integration tests.
  • Docs for new/changed API's.
    • Xmldoc cross references are set correctly.
    • Added explanation how the API works.
    • Usage code examples added.
    • The manual is updated, if needed.

During merge:

  • Commit message for squash-merge is prefixed with one of the list:
    • NEW: ___.
    • FIX: ___.
    • DOCS: ___.
    • CHANGE: ___.
    • RELEASE: 1.1.0-preview.3.

@u-pr u-pr Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Harness Review

Needs changes

The recipe source update is directionally fine, but the checked-in Yamato configuration has not been regenerated, so the CI jobs this repository actually runs still use the old docs tooling.

P1

The recipe changes here do not take effect until the generated .yamato/input-system-*.yml files are refreshed and committed. The checked-in job definitions that Yamato consumes still contain the old commands (git clone --branch "2.3.0-preview" ... everywhere, plus %GSUDO% choco install netfx-4.7.1-devpack ... on Windows; see .yamato/input-system-editor-functional-tests.yml / .yamato/input-system-standalone-functional-tests.yml), and .yamato/triggers.yml points at those generated files directly. As committed, this PR will merge without actually switching CI to PMDT 3.14 or installing DocFX 2.70 anywhere. Please regenerate the job YAML and include the updated .yamato/input-system-*.yml outputs in the PR.

Reviewed commit 7efc128

🤖 Helpful? 👍/👎

@codecov-github-com

codecov-github-com Bot commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

@@           Coverage Diff            @@
##           develop    #2460   +/-   ##
========================================
  Coverage    78.95%   78.96%           
========================================
  Files          767      767           
  Lines       140780   140811   +31     
========================================
+ Hits        111153   111187   +34     
+ Misses       29627    29624    -3     
Flag Coverage Δ
inputsystem_MacOS_6000.0 5.31% <ø> (-0.01%) ⬇️
inputsystem_MacOS_6000.0_project 77.49% <0.00%> (-0.01%) ⬇️
inputsystem_MacOS_6000.3 5.31% <ø> (-0.01%) ⬇️
inputsystem_MacOS_6000.3_project 77.48% <0.00%> (-0.01%) ⬇️
inputsystem_MacOS_6000.5 5.30% <ø> (-0.01%) ⬇️
inputsystem_MacOS_6000.5_project 77.54% <0.00%> (-0.01%) ⬇️
inputsystem_MacOS_6000.6 5.30% <ø> (-0.01%) ⬇️
inputsystem_MacOS_6000.6_project 77.55% <0.00%> (+<0.01%) ⬆️
inputsystem_MacOS_6000.7 5.30% <ø> (-0.01%) ⬇️
inputsystem_MacOS_6000.7_project 77.54% <0.00%> (-0.01%) ⬇️
inputsystem_Ubuntu_6000.0 5.31% <ø> (-0.01%) ⬇️
inputsystem_Ubuntu_6000.0_project 77.40% <0.00%> (-0.01%) ⬇️
inputsystem_Ubuntu_6000.3 5.31% <ø> (-0.01%) ⬇️
inputsystem_Ubuntu_6000.3_project 77.39% <0.00%> (-0.01%) ⬇️
inputsystem_Ubuntu_6000.5 5.30% <ø> (-0.01%) ⬇️
inputsystem_Ubuntu_6000.5_project 77.45% <0.00%> (-0.01%) ⬇️
inputsystem_Ubuntu_6000.6 5.30% <ø> (-0.01%) ⬇️
inputsystem_Ubuntu_6000.6_project 77.45% <0.00%> (-0.01%) ⬇️
inputsystem_Ubuntu_6000.7 5.30% <ø> (-0.01%) ⬇️
inputsystem_Ubuntu_6000.7_project 77.46% <0.00%> (-0.01%) ⬇️
inputsystem_Windows_6000.0 5.31% <ø> (-0.01%) ⬇️
inputsystem_Windows_6000.0_project 77.62% <100.00%> (+0.05%) ⬆️
inputsystem_Windows_6000.3 5.31% <ø> (-0.01%) ⬇️
inputsystem_Windows_6000.3_project 77.61% <100.00%> (+0.04%) ⬆️
inputsystem_Windows_6000.5 5.30% <ø> (-0.01%) ⬇️
inputsystem_Windows_6000.5_project 77.67% <100.00%> (+0.04%) ⬆️
inputsystem_Windows_6000.6 5.30% <ø> (-0.01%) ⬇️
inputsystem_Windows_6000.6_project 77.67% <100.00%> (+0.04%) ⬆️
inputsystem_Windows_6000.7 5.30% <ø> (-0.01%) ⬇️
inputsystem_Windows_6000.7_project 77.67% <100.00%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...putSystem/DocumentationBasedAPIVerficationTests.cs 50.21% <100.00%> (-1.79%) ⬇️
...ity.inputsystem/InputSystem/Runtime/InputSystem.cs 82.14% <ø> (ø)

... and 3 files with indirect coverage changes

ℹ️ Need help interpreting these results?

@jfreire-unity jfreire-unity left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The change looks like it upgrades the PMDT but CI still fails, so we should circle back to the docs engineering team and let us know it's not fixing the problem.

Also, have you tried locally if this change generates the documentation?

Comment thread Tools/CI/Settings/InputSystemSettings.cs Outdated
@ritamerkl
ritamerkl requested a review from jfreire-unity August 4, 2026 11:19
Comment on lines +52 to +95
if (!File.Exists($"{projectName}.sln"))
{
var assemblies = UnityEditor.Compilation.CompilationPipeline.GetAssemblies(
UnityEditor.Compilation.AssembliesType.Editor);
foreach (var asm in assemblies)
{
if (asm.sourceFiles.Length == 0 ||
!asm.sourceFiles.Any(f => f.Replace("\\", "/").Contains("Packages/com.unity.inputsystem/")))
continue;
var csprojPath = $"{asm.name}.csproj";
if (File.Exists(csprojPath))
continue;
var csprojContent = new StringBuilder();
csprojContent.AppendLine("<?xml version=\"1.0\" encoding=\"utf-8\"?>");
csprojContent.AppendLine("<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" " +
"xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">");
// DefineConstants must be in an unconditional PropertyGroup so DocFX reads them
// regardless of whether MSBuild's Platform property is set.
csprojContent.AppendLine(" <PropertyGroup>");
csprojContent.AppendLine($" <DefineConstants>{string.Join(";", asm.defines)}</DefineConstants>");
csprojContent.AppendLine(" </PropertyGroup>");
csprojContent.AppendLine(" <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">");
csprojContent.AppendLine($" <AssemblyName>{asm.name}</AssemblyName>");
csprojContent.AppendLine(" <TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>");
csprojContent.AppendLine(" <OutputType>Library</OutputType>");
csprojContent.AppendLine(" <AllowUnsafeBlocks>True</AllowUnsafeBlocks>");
csprojContent.AppendLine(" <LangVersion>9.0</LangVersion>");
csprojContent.AppendLine(" <NoConfig>true</NoConfig>");
csprojContent.AppendLine(" <NoStdLib>true</NoStdLib>");
csprojContent.AppendLine(" </PropertyGroup>");
csprojContent.AppendLine(" <ItemGroup>");
foreach (var src in asm.sourceFiles)
csprojContent.AppendLine($" <Compile Include=\"{src}\" />");
csprojContent.AppendLine(" </ItemGroup>");
csprojContent.AppendLine(" <ItemGroup>");
foreach (var refPath in asm.compiledAssemblyReferences)
csprojContent.AppendLine(
$" <Reference Include=\"{Path.GetFileNameWithoutExtension(refPath)}\">" +
$"<HintPath>{refPath}</HintPath></Reference>");
csprojContent.AppendLine(" </ItemGroup>");
csprojContent.AppendLine("</Project>");
File.WriteAllText(csprojPath, csprojContent.ToString(), Encoding.UTF8);
}
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is this strictly necessary? Is there no better way to avoid this or generate this XML without essentially concatenating strings of XML together? I'd report this to the docs engineering team if this is the only because it feels bad one if one has to do this to make docs work on CI.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

To my knowledge state it is necessary because the .csproj file is needed for the doc tooling in version 3x. It's generated by code for two main reasons:

  1. DefineConstants — includes Unity version defines (UNITY_6000_0_52),
    platform defines (PLATFORM_STANDALONE_OSX), and project-specific feature
    flags. These change per Unity version, OS, and project. DocFX needs accurate
    defines to parse #if blocks correctly, so hardcoding them would cause wrong
    API members to be included/excluded.
  2. Reference HintPaths (lines 87-90) — the compiled assembly references use
    absolute paths to the machine's Library/ScriptAssemblies/ folder. Inherently
    machine-specific.

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.

2 participants