<commit_before># Installs and updates Xcode.
# https://developer.apple.com/downloads/
#
# Sequencing
# - After: rubygems (uses xcode-install)
function 🔨__xcode
    echo "🔨  Xcode"
    echo

    if test -z $XCODE_INSTALL_USER; and test -n (user.email)
        set --export --universal XCODE_INSTALL_USER (user.email)
    end

    # Currently selected version
    xcode-select --print-path

    # Update the list of available versions to install
    xcversion update

    # Install the CLI tools, if necessary
    if not test -e /Library/Developer/CommandLineTools/usr/lib/libxcrun.dylib
        # Manual way
        # xcode-select --install
        xcversion install-cli-tools
    end

    echo "Available:"
    xcversion list
    set -l installed (xcversion list)
    set -l newest_version $installed[-1]
    if not string match "*(installed)" $newest_version
        xcversion install $newest_version --no-show-release-notes
    end<commit_msg>[xcode] Clean out old simulators after install<commit_after># Installs and updates Xcode.
# https://developer.apple.com/downloads/
#
# Sequencing
# - After: rubygems (uses xcode-install)
function 🔨__xcode
    echo "🔨  Xcode"
    echo

    if test -z $XCODE_INSTALL_USER; and test -n (user.email)
        set --export --universal XCODE_INSTALL_USER (user.email)
    end

    # Currently selected version
    xcode-select --print-path

    # Update the list of available versions to install
    xcversion update

    # Install the CLI tools, if necessary
    if not test -e /Library/Developer/CommandLineTools/usr/lib/libxcrun.dylib
        # Manual way
        # xcode-select --install
        xcversion install-cli-tools
    end

    echo "Available:"
    xcversion list
    set -l installed (xcversion list)
    set -l newest_version $installed[-1]
    if not string match "*(installed)" $newest_version
        xcversion install $newest_version --no-show-release-notes

        # Clean out old simulators
        xcrun simctl delete unavailable
    end
{'fraction_non_alphanumeric': 0.0865432716358179, 'fraction_numerical': 0.0010005002501250625, 'mean_word_length': 2.7105751391465676, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7645117', 'n_tokens_mistral': 640, 'n_tokens_neox': 589, 'n_words': 189}