Skip to content

Compilation error fix in player build #33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 19, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"overrideReferences": true,
"precompiledReferences": [
"NSubstitute.dll"
"nunit.framework.dll"
],
"autoReferenced": false,
"defineConstraints": [
"UNITY_INCLUDE_TESTS"
],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}
4 changes: 3 additions & 1 deletion Assets/_PackageRoot/Tests/Base/Utils/TestUtils.LoadFail.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ public static IEnumerator LoadFail(string url, FutureLoadingFrom? expectedLoadin
futureListener.Assert_Events_Contains(expectedLoadingFrom.Value.ToEventName());

var task1 = future.AsTask();

if (expectedLoadingFrom.HasValue && expectedLoadingFrom.Value == FutureLoadingFrom.Source) // exception should be thrown only if ONLY loading from Source
LogAssert.Expect(LogType.Error, $"[ImageLoader] Future[id={future.Id}] Timeout ({timeout}): {url}");
LogAssert.Expect(LogType.Error, $"[ImageLoader] Future[id={future.Id}] Timeout ({timeout}): {url}"); // compilation error in player build

yield return TestUtils.WaitWhile(() => future.IsInProgress, TimeSpan.FromSeconds(10));
var task2 = future.AsTask();

Expand Down
7 changes: 5 additions & 2 deletions Assets/_PackageRoot/Tests/Base/Utils/TestUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,17 @@ public static IEnumerator ClearEverything(string message)
{
if (message != null)
Debug.Log(message.PadRight(50, '-'));
LogAssert.ignoreFailingMessages = true;

LogAssert.ignoreFailingMessages = true; // compilation error in player build

UniTaskScheduler.UnobservedExceptionWriteLogType = LogType.Exception;
ImageLoader.ClearSpriteRef();
ImageLoader.ClearTextureRef();
yield return ImageLoader.ClearCacheAll().TimeoutCoroutine(TimeSpan.FromSeconds(10));

WaitForGCFast();
LogAssert.ignoreFailingMessages = false;

LogAssert.ignoreFailingMessages = false; // compilation error in player build
}
public static void WaitForGCFast()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"overrideReferences": true,
"precompiledReferences": [
"NSubstitute.dll"
"nunit.framework.dll"
],
"autoReferenced": false,
"defineConstraints": [
"UNITY_INCLUDE_TESTS"
],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"overrideReferences": true,
"precompiledReferences": [
"NSubstitute.dll"
"nunit.framework.dll"
],
"autoReferenced": false,
"defineConstraints": [
"UNITY_INCLUDE_TESTS"
],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}
2 changes: 1 addition & 1 deletion Assets/_PackageRoot/Tests/Runtime/TestConcurrency.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
using System.Collections;
using NUnit.Framework;
using Cysharp.Threading.Tasks;
using UnityEngine.TestTools;
using UnityEngine;
using System.Threading.Tasks;
using Extensions.Unity.ImageLoader.Tests.Utils;
using UnityEngine.TestTools;

namespace Extensions.Unity.ImageLoader.Tests
{
Expand Down
2 changes: 1 addition & 1 deletion Assets/_PackageRoot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/IvanMurzak"
},
"license": "MIT",
"version": "7.0.0",
"version": "7.0.1",
"unity": "2019.4",
"description": "Asynchronous image loading from remote or local destination. It has two layers of configurable Memory and Disk cache systems.",
"keywords": [
Expand Down
Loading