Search Unity

"Clean Build" still loads a Library cache (but from where?)

Discussion in 'Unity Build Automation' started by DeFaler, Jan 4, 2019.

  1. DeFaler

    DeFaler

    Joined:
    Jan 31, 2017
    Posts:
    10
    Description of issue:
    Today, after fighting some weird issues where some feature would work in my editor but not on the devices we install the builds to, I decided to do a Clean Build in the Cloud Build for the project. The build was finished surprisingly fast, but also a weird mix of failure and success: the build logs said it was a failure, but a message was posted to our Slack channel stating success. It also publishes an APK to the 'Share' location.
    The real problem I have is that it did not perform a real Clean Build - it threw away a cache, but somehow loaded a different - older - one. The errors in the build log, for example, do not reflect the latest version of the code, even though the "Changes" tab in Cloud Build does.
    I am sure I have seen a message in the "compact log" about not finding the library while it was building, but that message is not in the current logs anymore. Instead, they contain a message about fetching a library.

    Unity version:
    Should be 2017.4.14f1 in Cloud Build, but loads a cache for 2017.1.1f1 (which we used to build with until recently)

    Source control:
    Git repository. Not sure what to say here. Pull seems to work fine.

    Local build platform:
    MacOS or Windows, using Unity 2017.4.14f1

    Build target:
    - Dev - Ug* Eng* Rea* 123 (Name has been trimmed because of NDA - it's a little too informative about the project - but the staff should be able to find it based on this info. If not, contact me via PM or e-mail). It's configured to build for Android, using Unity 2017.4.14f1. Build #34 was the one where we did the "Clean" build.

    Project name:
    943-w*rea*123*ug* (Name has been trimmed because of NDA-related stuff (it's a little too informative about the project) but the staff should be able to find it based on this info. If not, contact me via PM or e-mail)

    Build log (relevant chunk):
    31: Download of cache file library_2017_1_1f1 finished, size is 581233345 bytes
    [...*snip*...]
    42: [Unity] COMMAND LINE ARGUMENTS:
    43: [Unity] /UNITY_PATH/Unity/Unity-2017_1_1f1/Unity.app/Contents/MacOS/Unity
    [...*snip*...]
    65: [Unity] Initialize engine version: 2017.1.1f1 (5d30cf096e79)


    Does it build locally from a fresh checkout?
    Irrelevant to the issue at hand.
     
  2. DeFaler

    DeFaler

    Joined:
    Jan 31, 2017
    Posts:
    10
    Update: a subsequent "Clean Build" did perform a full re-import of the Library.
     
  3. sunwangshu

    sunwangshu

    Joined:
    Mar 2, 2017
    Posts:
    21
    This still happens for my recent builds, and the clean builds always fail because of Library corruption. Local builds work just fine.
    Unity version: Unity 2021.3.4f1
    XCode version: Xcode 13.2.1

    [error] [2023-02-02T07:52:04Z - Unity] Library/PackageCache/com.coffee.ui-particle@3.3.9/Scripts/BakingCamera.cs(20,35): error CS0234: The type or namespace name 'PrefabStageUtility' does not exist in the namespace 'UnityEditor.Experimental.SceneManagement' (are you missing an assembly reference?)


    It's also very weird that it includes Editor folders into the build, which shouldn't be
     
  4. Benjamin-Gooding

    Benjamin-Gooding

    Unity Technologies

    Joined:
    Apr 12, 2022
    Posts:
    300
    When we run a clean build we are skipping the fetch of the Library cache and we also ensure that the Library directory is removed prior to building with Unity. If you are not seeing this behavior then please open up a support ticket so that we can dig into this further.