<commit_before>#!/usr/bin/env bash
set -e
set -o pipefail

# DESCRIPTION
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# This script builds the project in a way that is convenient for developers.
# It passes the right flags into right places, builds the project with --fast,
# tidies up and highlights error messages in GHC output.

# USAGE
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   scripts/build/cardano-sl.sh                 build all packages one-by-one
#   scripts/build/cardano-sl.sh -t              build and run tests
#   scripts/build/cardano-sl.sh core|db|...     build only a specific project (see below)
#   scripts/build/cardano-sl.sh -k              typecheck but do not build
#   scripts/build/cardano-sl.sh -c              do stack clean
#
# Consider symlinking the script as `b` into the cardano-sl folder because
# typing `scripts/build/cardano-sl.sh` is annoying.

# PROJECTS
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   Project argument                Package name
#   :
#   core, db, etc.                  cardano-sl-{core,db,etc.}
#   lib                             cardano-sl
#   sl | all                        all packages at once

# CUSTOMIZATIONS
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Pass --no-nix or do `touch .no-nix` if you want builds without Nix.
# * Pass --ram or do `touch .ram`. if you have lots of RAM and want to
#   make builds faster.
# * Pass -Werror or do `touch .Werror` if you want to compile with -Werror.
# * Pass --for-installer to enable 'for-installer' flag (which means that most
#   of executables won't be built).
# * Pass --no-asserts to disable asserts.
# * Pass --bench-mode to use the configuration used by modern benchmarks.

# Note: this list should be topologically sorted.
projects="binary util crypto core db lrc infra ssc txp update delegation lib node client generator auxx tools explorer wallet wallet-new"

# Returns name of a stack project to build, given the alias.
function pkgNameToProject {
  if [[ $1 == "lib" ]]; then
    echo "cardano-sl"
  else
    echo "cardano-sl-$prj"
  fi
}

args=''

test=false
coverage=false
clean=false

spec_prj=''

no_nix=false
ram=false
no_code=false
werror=false
for_installer=false
asserts=true
no_fast=false

if [ -e .no-nix ]; then<commit_msg>Fix wildfowl introduced by @volhovm<commit_after>#!/usr/bin/env bash
set -e
set -o pipefail

# DESCRIPTION
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# This script builds the project in a way that is convenient for developers.
# It passes the right flags into right places, builds the project with --fast,
# tidies up and highlights error messages in GHC output.

# USAGE
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   scripts/build/cardano-sl.sh                 build all packages one-by-one
#   scripts/build/cardano-sl.sh -t              build and run tests
#   scripts/build/cardano-sl.sh core|db|...     build only a specific project (see below)
#   scripts/build/cardano-sl.sh -k              typecheck but do not build
#   scripts/build/cardano-sl.sh -c              do stack clean
#
# Consider symlinking the script as `b` into the cardano-sl folder because
# typing `scripts/build/cardano-sl.sh` is annoying.

# PROJECTS
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   Project argument                Package name
#   :
#   core, db, etc.                  cardano-sl-{core,db,etc.}
#   lib                             cardano-sl
#   sl | all                        all packages at once

# CUSTOMIZATIONS
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Pass --no-nix or do `touch .no-nix` if you want builds without Nix.
# * Pass --ram or do `touch .ram`. if you have lots of RAM and want to
#   make builds faster.
# * Pass -Werror or do `touch .Werror` if you want to compile with -Werror.
# * Pass --for-installer to enable 'for-installer' flag (which means that most
#   of executables won't be built).
# * Pass --no-asserts to disable asserts.
# * Pass --bench-mode to use the configuration used by modern benchmarks.

# Note: this list should be topologically sorted.
projects="binary util crypto core db lrc infra ssc txp update delegation lib node client generator auxx tools explorer wallet wallet-new"

# Returns name of a stack project to build, given the alias.
function pkgNameToProject {
  if [[ $1 == "lib" ]]; then
    echo "cardano-sl"
  else
    echo "cardano-sl-$1"
  fi
}

args=''

test=false
coverage=false
clean=false

spec_prj=''

no_nix=false
ram=false
no_code=false
werror=false
for_installer=false
asserts=true
no_fast=false

if [ -e .no-nix ]; then
{'fraction_non_alphanumeric': 0.16169372531812198, 'fraction_numerical': 0.0006581834137779728, 'mean_word_length': 2.940363007778738, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3367490', 'n_tokens_mistral': 1389, 'n_tokens_neox': 1330, 'n_words': 499}