Skip to content

FIX: warnings / failures with CI#2425

Open
Darren-Kelly-Unity wants to merge 3 commits into
developfrom
bugfix/fix-ci-failure-due-to-warnings
Open

FIX: warnings / failures with CI#2425
Darren-Kelly-Unity wants to merge 3 commits into
developfrom
bugfix/fix-ci-failure-due-to-warnings

Conversation

@Darren-Kelly-Unity
Copy link
Copy Markdown
Collaborator

@Darren-Kelly-Unity Darren-Kelly-Unity commented Jun 2, 2026

Purpose of this PR

Fixes CI build warnings by replacing #if UNITY_EDITOR || DEVELOPMENT_BUILD / #if DEVELOPMENT_BUILD preprocessor guards with #if DEBUG across multiple runtime files. Also adds [NonSerialized] to fields in HID.HIDDeviceDescriptorDeviceEntry and HID.HIDElementDescriptor that were triggering serialization warnings. One case in InputSystem.cs uses a more precise fix: replaces #if DEVELOPMENT_BUILD with a #if !UNITY_EDITOR block and a runtime Debug.isDebugBuild check to preserve the original development-build-only remoting behaviour.

Release Notes

None (internal CI / build-warning fixes only — no user-facing behaviour change).

Functional Testing status

No new tests added. Changes are limited to conditional-compilation guards and serialization attributes; existing automated test suite and CI pipeline cover the affected paths. Manual verification that remoting still activates correctly in development player builds is recommended.

Performance Testing Status

No performance impact. All changes are compile-time guards or serialization metadata attributes.

Overall Product Risks

Technical Risk: 1

Replacing UNITY_EDITOR || DEVELOPMENT_BUILD with DEBUG is semantically equivalent in the Unity editor and standard debug builds, but could differ in edge-case build configurations. The InputSystem.cs remoting path uses a runtime Debug.isDebugBuild guard to avoid any behavioural regression.

Halo Effect: 1

Changes are spread across 11 files in the runtime layer but are confined to debug/development-only code paths — no release-build behaviour is altered.

Class diagram

Types touched by origin/develop...HEAD — no structural changes, all modifications are preprocessor guards or serialization attributes.

classDiagram
  direction TB

  class InputControlExtensions {
    <<static>>
  }

  class ControlBuilder {
    <<struct>>
    +At() ControlBuilder
    +WithParent() ControlBuilder
    +WithName() ControlBuilder
    +WithLayout() ControlBuilder
    +WithUsages() ControlBuilder
    +WithChildren() ControlBuilder
  }

  class DeviceBuilder {
    <<struct>>
    +WithName() DeviceBuilder
    +WithLayout() DeviceBuilder
    +WithChildren() DeviceBuilder
    +WithControlUsage() DeviceBuilder
    +WithControlAlias() DeviceBuilder
  }

  class InputControlList {
    <<struct>>
    +Count int
  }

  class InputControlListDebugView {
    <<struct>>
  }

  class InputEventBuffer {
    <<struct>>
  }

  class InputManager {
  }

  class DeviceState {
    <<struct>>
  }

  class InputSystem {
    <<static>>
  }

  class RemoteInputPlayerConnection {
  }

  class InputRemoting {
  }

  class InputSystemState {
  }

  class EnhancedTouchSupport {
    <<static>>
    +CheckEnabled()
  }

  class HID {
  }

  class HIDDeviceDescriptorDeviceEntry {
    <<struct>>
    +deviceType Type
    +displayName string
  }

  class HIDElementDescriptor {
    <<struct>>
    +usageMin int
    +usageMax int
    +flags HIDElementFlags
  }

  class PlayerInputManager {
  }

  class InputStateBuffers {
  }

  InputControlExtensions --> ControlBuilder : creates
  InputControlExtensions --> DeviceBuilder : creates
  InputControlList --> InputControlListDebugView : debug view
  InputManager --> DeviceState : contains
  InputSystem --> RemoteInputPlayerConnection : owns
  InputSystem --> InputRemoting : uses
  HID --> HIDDeviceDescriptorDeviceEntry : contains
  HID --> HIDElementDescriptor : contains
Loading

@Darren-Kelly-Unity Darren-Kelly-Unity changed the title Fix warnings / failures with CI Fix: warnings / failures with CI Jun 2, 2026
Copy link
Copy Markdown
Contributor

@u-pr u-pr Bot left a comment

Choose a reason for hiding this comment

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

May require changes

While the update refactors the input remoting setup, a compilation error in player builds needs to be addressed. Ensuring preprocessor guards are aligned across definition and usage sites will resolve this.

🤖 Helpful? 👍/👎

Comment thread Packages/com.unity.inputsystem/InputSystem/Runtime/InputSystem.cs Outdated
@codecov-github-com
Copy link
Copy Markdown

codecov-github-com Bot commented Jun 2, 2026

Codecov Report

Attention: Patch coverage is 66.66667% with 5 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...tem/InputSystem/Runtime/Utilities/MemoryHelpers.cs 66.66% 5 Missing ⚠️
@@             Coverage Diff             @@
##           develop    #2425      +/-   ##
===========================================
+ Coverage    78.13%   78.90%   +0.77%     
===========================================
  Files          483      762     +279     
  Lines        98770   139248   +40478     
===========================================
+ Hits         77169   109872   +32703     
- Misses       21601    29376    +7775     
Flag Coverage Δ
inputsystem_MacOS_6000.0 5.32% <0.00%> (+0.01%) ⬆️
inputsystem_MacOS_6000.0_project 77.28% <66.66%> (-0.02%) ⬇️
inputsystem_MacOS_6000.3 5.32% <0.00%> (+0.01%) ⬆️
inputsystem_MacOS_6000.3_project 77.28% <66.66%> (+<0.01%) ⬆️
inputsystem_MacOS_6000.4 5.33% <0.00%> (+0.01%) ⬆️
inputsystem_MacOS_6000.4_project 77.29% <66.66%> (+<0.01%) ⬆️
inputsystem_MacOS_6000.5 5.32% <0.00%> (+0.01%) ⬆️
inputsystem_MacOS_6000.5_project 77.33% <66.66%> (+0.01%) ⬆️
inputsystem_MacOS_6000.6 5.32% <0.00%> (+0.01%) ⬆️
inputsystem_MacOS_6000.6_project 77.33% <66.66%> (+0.01%) ⬆️
inputsystem_Ubuntu_6000.0 5.33% <0.00%> (+0.01%) ⬆️
inputsystem_Ubuntu_6000.0_project 77.19% <66.66%> (-0.02%) ⬇️
inputsystem_Ubuntu_6000.3 5.33% <0.00%> (+0.01%) ⬆️
inputsystem_Ubuntu_6000.3_project 77.19% <66.66%> (+0.01%) ⬆️
inputsystem_Ubuntu_6000.4 5.33% <0.00%> (+0.01%) ⬆️
inputsystem_Ubuntu_6000.4_project 77.20% <66.66%> (+0.01%) ⬆️
inputsystem_Ubuntu_6000.5 5.32% <0.00%> (+0.01%) ⬆️
inputsystem_Ubuntu_6000.5_project 77.23% <66.66%> (+0.01%) ⬆️
inputsystem_Ubuntu_6000.6 5.32% <0.00%> (+0.01%) ⬆️
inputsystem_Ubuntu_6000.6_project 77.23% <66.66%> (+0.01%) ⬆️
inputsystem_Windows_6000.0 5.32% <0.00%> (+0.01%) ⬆️
inputsystem_Windows_6000.0_project 77.41% <66.66%> (-0.02%) ⬇️
inputsystem_Windows_6000.3 5.32% <0.00%> (+0.01%) ⬆️
inputsystem_Windows_6000.3_project 77.40% <66.66%> (+<0.01%) ⬆️
inputsystem_Windows_6000.4 5.33% <0.00%> (+0.01%) ⬆️
inputsystem_Windows_6000.4_project 77.41% <66.66%> (+<0.01%) ⬆️
inputsystem_Windows_6000.5 5.32% <0.00%> (+0.01%) ⬆️
inputsystem_Windows_6000.5_project 77.46% <66.66%> (+0.01%) ⬆️
inputsystem_Windows_6000.6 5.32% <0.00%> (+0.01%) ⬆️
inputsystem_Windows_6000.6_project 77.46% <66.66%> (+0.01%) ⬆️

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

Files with missing lines Coverage Δ
...tSystem/Runtime/Controls/InputControlExtensions.cs 76.12% <ø> (ø)
...m/InputSystem/Runtime/Controls/InputControlList.cs 74.31% <ø> (ø)
...nputSystem/Runtime/Devices/Remote/InputRemoting.cs 81.32% <ø> (ø)
...tem/InputSystem/Runtime/Events/InputEventBuffer.cs 73.61% <ø> (ø)
...ty.inputsystem/InputSystem/Runtime/InputManager.cs 89.04% <ø> (ø)
...ity.inputsystem/InputSystem/Runtime/InputSystem.cs 82.14% <ø> (ø)
...time/Plugins/EnhancedTouch/EnhancedTouchSupport.cs 91.66% <ø> (ø)
...inputsystem/InputSystem/Runtime/Plugins/HID/HID.cs 69.98% <ø> (ø)
.../Runtime/Plugins/PlayerInput/PlayerInputManager.cs 70.90% <ø> (ø)
...tem/InputSystem/Runtime/State/InputStateBuffers.cs 96.11% <ø> (ø)
... and 1 more

... and 202 files with indirect coverage changes

ℹ️ Need help interpreting these results?

@Darren-Kelly-Unity Darren-Kelly-Unity changed the title Fix: warnings / failures with CI FIX: warnings / failures with CI Jun 2, 2026
@Darren-Kelly-Unity
Copy link
Copy Markdown
Collaborator Author

/review

Copy link
Copy Markdown
Contributor

@u-pr u-pr Bot left a comment

Choose a reason for hiding this comment

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

Perfect

All verified findings are already addressed by existing comments on this Pull Request. The changes are otherwise clean and well-aligned with the target codebase.

🤖 Helpful? 👍/👎

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.

1 participant