Search Issue Tracker
Won't Fix
Votes
0
Found in
6000.0.23f1
6000.3.0a6
6000.4.0a1
Issue ID
UUM-114951
Regression
No
[CI/CD]Build cache not invalidated when building targets with different defines
Steps to reproduce:
- Download unity project "[^Build Test.zip]
- Run CLI build in sequence:
{code:java}
<unity.app> -batchmode -quit -projectPath <path> -executeMethod BuildScript.BuildRetail → OK
{code}
{code:java}
<unity.app> -batchmode -quit -projectPath <path> -executeMethod BuildScript.BuildDemo → FAIL{code}
{code:java}
<unity.app> -batchmode -quit -projectPath <path> -executeMethod BuildScript.BuildRetail → FAIL {code}
Actual results: The second Retail build commands fail.
Expected results: The second Retail build should succeed even after a failing build, as a result of switching defines.
Reproducible with versions: 6000.0.23f1, 6000.3.0a5
Tested on (OS): macOS
Notes:
- The build fails due to an error in code compilation from the previous "BuildDemo" failure.
- Adding {{BuildOptions.CleanBuildCache}} to the options does not resolve the issue.
- Using the {{-rebuildLibrary}} CLI argument also does not "fix" the third build. To reset the state, the library folder must be manually deleted.
*
Deleting Library/EditorUserBuildSettings.asset, fixes the issue.
(tracks the build configuration for Player or AssetBundles builds.)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Editor crash on "PPtr<Shader>::operator Shader*() const" when checking in changes with a very long comment in Unity Version Control window
- [Ubuntu] Toolbar and menu items for Version Control lack spaces in text on Linux
- Unity Version Control window Pending Changes tab’s Item checkbox is unresponsive when clicked and the item list is empty
- Audio stuttering occurs when heavy processing is performed while OnAudioFilterRead is in use
- Inconsistent Node search results in VFX Graph
Resolution Note:
tl;dr when switching bps, user need to wait for a domain reload. Otherwise, the build pipeline would stop the building due the the editor errored out from last build. A domain reload would recompile the scripts so when building from failed to success scripts, the scripts would get recompiled to clear the previous error state.
2 workarounds available around this use case.
1. from CLI, use -activeBuildProfile to build.
2. from the editor, surround the profile switching code with EditorApplication.delayCall += () +> {}