• Bruce Dawson's avatar
    Shorten hash to avoid MAX_PATH limits · 7872beb4
    Bruce Dawson authored
    The Windows SDK contains some very long paths. When those are added to
    the 40-character hash directory and the other path components it is easy
    to hit the Windows 260-character MAX_PATH limit. In addition, the 40
    character hash makes paths unwieldy in VsChromium search results and
    elsewhere.
    
    A ten character hash should be more than enough to avoid collisions - if
    we upload a million toolchain packages then there will be about a 50%
    chance of a name collision - we won't upload more than a thousand.
    
    This was tested by copying the current toolchain file on Google storage
    to a truncated name and then changing to that hash in vs_toolchain.py.
    It was also necessary to copy the updates from depot_tools to
    third_party\depot_tools. This means that we can't actually start using
    short hashes until depot_tools has rolled.
    
    We probably won't use a shorter hash until we next roll the toolchain,
    just because changing the toolchain hash is mildly disruptive.
    
    Bug: 1120785
    Change-Id: I878b058857cbe9cb72a72b535864404eede33f3f
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2376030Reviewed-by: 's avatarSébastien Marchand <sebmarchand@chromium.org>
    Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
    7872beb4
get_toolchain_if_necessary.py 22.7 KB