Skip to content

Comments

Compilation error fix in player build#33

Merged
IvanMurzak merged 5 commits intomainfrom
32-build-is-getting-failed-after-the-last-update
Mar 19, 2025
Merged

Compilation error fix in player build#33
IvanMurzak merged 5 commits intomainfrom
32-build-is-getting-failed-after-the-last-update

Conversation

@IvanMurzak
Copy link
Owner

No description provided.

@IvanMurzak IvanMurzak linked an issue Mar 17, 2025 that may be closed by this pull request
@IvanMurzak IvanMurzak requested a review from Copilot March 17, 2025 16:02
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@IvanMurzak IvanMurzak requested a review from Copilot March 17, 2025 16:51
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request fixes code compilation errors in player builds by conditionally compiling test assertions and flags with UNITY_EDITOR preprocessor directives.

  • Wrapped LogAssert calls with UNITY_EDITOR directives to prevent compilation errors in player builds.
  • Added TODO comments indicating that a solution for player builds is needed.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
Assets/_PackageRoot/Tests/Base/Utils/TestUtils.LoadFail.cs Wrapped LogAssert.Expect in UNITY_EDITOR to avoid compilation errors in player builds.
Assets/_PackageRoot/Tests/Base/Utils/TestUtils.cs Wrapped LogAssert.ignoreFailingMessages assignments in UNITY_EDITOR blocks to fix player build compilation errors.

@IvanMurzak IvanMurzak requested a review from Copilot March 19, 2025 07:49
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a compilation error in player builds by updating references to UnityEngine.TestTools.LogAssert across several test files. The changes ensure that test builds using player runtimes no longer fail due to missing using directives for LogAssert.

  • Removed the generic using directive for UnityEngine.TestTools from test files where it caused build issues.
  • Replaced unqualified LogAssert calls with fully qualified UnityEngine.TestTools.LogAssert calls in TestUtils.LoadFail.cs and TestUtils.cs.
  • Adjusted the ordering of using directives in TestConcurrency.cs for consistency.

Reviewed Changes

Copilot reviewed 3 out of 7 changed files in this pull request and generated no comments.

File Description
Assets/_PackageRoot/Tests/Base/Utils/TestUtils.LoadFail.cs Updated LogAssert usage to resolve compilation error in player build.
Assets/_PackageRoot/Tests/Runtime/TestConcurrency.cs Moved UnityEngine.TestTools directive to improve consistency.
Assets/_PackageRoot/Tests/Base/Utils/TestUtils.cs Updated LogAssert.ignoreFailingMessages usage with full namespace for player build compatibility.
Files not reviewed (4)
  • Assets/_PackageRoot/Tests/Base/Extensions.Unity.ImageLoader.Tests.asmdef: Language not supported
  • Assets/_PackageRoot/Tests/Editor/Extensions.Unity.ImageLoader.Tests.Editor.asmdef: Language not supported
  • Assets/_PackageRoot/Tests/Runtime/Extensions.Unity.ImageLoader.Tests.Runtime.asmdef: Language not supported
  • Assets/_PackageRoot/package.json: Language not supported

@IvanMurzak IvanMurzak self-assigned this Mar 19, 2025
@IvanMurzak IvanMurzak added the bug Something isn't working label Mar 19, 2025
@IvanMurzak IvanMurzak merged commit c8b4ab5 into main Mar 19, 2025
14 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build is getting failed after the last update

1 participant