Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

UnityYAMLMerge: "File is not a valid text serialization YAML file"

Discussion in 'Editor & General Support' started by Martinomat, May 8, 2016.

  1. Martinomat

    Martinomat

    Joined:
    May 6, 2016
    Posts:
    12
    Hey everyone,

    I tried to set up the UnityYAMLMerge tool in conjunction with Git. I changed the Asset Serialization mode to "Force text" and everything is in a neat YAML format now (i.e. I can open all asset files in a text editor). I set up everything according to the documentation page (http://docs.unity3d.com/Manual/SmartMerge.html). However, I still get the following error message when trying to merge the files:

    And I am very sure that both remote and local Workstation.unity files are YAML files. Could different line endings have anything to do with the error message?

    My Git-config files looks like this:

    Code (Boo):
    1. [merge]                                                                            
    2.     tool = unityyamlmerge                                                          
    3. [mergetool "unityyamlmerge"]                                                        
    4.     trustExitCode = false                                                          
    5.     cmd = /Applications/Unity/Unity.app/Contents/Tools/UnityYAMLMerge merge -p "$BASE" "$REMOTE" "$LOCAL" "$MERGED"
     
  2. jdrewsen

    jdrewsen

    Unity Technologies

    Joined:
    Mar 28, 2011
    Posts:
    201
    Hi... sorry about the late reply... all Unity devs has just been away on hackweek :)

    No.. different line endings should be handled just fine. Even though remote and local files are valid yaml the base file could still be binary format. That would fit well with the error message you get stating that ./Assets/World/Workstation_BASE_43921.unity is the one causing trouble... not the "BASE" in the file name.

    Can you verify this?
     
  3. Martinomat

    Martinomat

    Joined:
    May 6, 2016
    Posts:
    12
    Sorry for my late reply as well!

    That was indeed what happened. The common 'BASE' file was still a binary. So after fixing that one merge conflict, all the subsequent merge conflicts resolved automagically (which is really kinda scary, cause I have no idea what your UnityYAMLTool really does under the hood and the merge output is rather scarce :) ).
     
  4. jgol

    jgol

    Joined:
    Aug 16, 2020
    Posts:
    6
    Could you please elaborate on how this can happen? My BASE version is indeed not text (actually, in my case it is actually empty, zero bytes), but why? LOCAL and REMOTE are fine.