more robust: avoid isabelle_stack invocation in settings script (potentially slow or failing);
authorwenzelm
Mon Nov 05 20:53:16 2018 +0100 (6 months ago)
changeset 69242c911716d29bb
parent 69241 5426d266dcc5
child 69243 2a17c481d05e
more robust: avoid isabelle_stack invocation in settings script (potentially slow or failing);
lib/Tools/ghc_setup
lib/scripts/getsettings
     1.1 --- a/lib/Tools/ghc_setup	Mon Nov 05 17:37:55 2018 +0100
     1.2 +++ b/lib/Tools/ghc_setup	Mon Nov 05 20:53:16 2018 +0100
     1.3 @@ -4,5 +4,8 @@
     1.4  #
     1.5  # DESCRIPTION: setup Glasgow Haskell Compiler setup via Stack
     1.6  
     1.7 -isabelle_stack setup --resolver "$ISABELLE_STACK_RESOLVER" "$ISABELLE_GHC_VERSION" &&
     1.8 -  isabelle_stack ghci --ghci-options --version
     1.9 +set -e
    1.10 +
    1.11 +isabelle_stack setup --resolver "$ISABELLE_STACK_RESOLVER" "$ISABELLE_GHC_VERSION"
    1.12 +isabelle_stack ghci --ghci-options --version
    1.13 +echo -n "$(standard_path "$(isabelle_stack path --programs)")" > "$ISABELLE_STACK_ROOT/ISABELLE_GHC_PROGRAMS"
     2.1 --- a/lib/scripts/getsettings	Mon Nov 05 17:37:55 2018 +0100
     2.2 +++ b/lib/scripts/getsettings	Mon Nov 05 20:53:16 2018 +0100
     2.3 @@ -110,8 +110,8 @@
     2.4  fi
     2.5  
     2.6  #enforce ISABELLE_GHC
     2.7 -if [ -d "$ISABELLE_STACK_ROOT" ]; then
     2.8 -  if [ -f "$(standard_path "$(isabelle_stack path --programs)")/$ISABELLE_GHC_VERSION/bin/ghc" ]; then
     2.9 +if [ -d "$ISABELLE_STACK_ROOT" -a -f "$ISABELLE_STACK_ROOT/ISABELLE_GHC_PROGRAMS" ]; then
    2.10 +  if [ -f "$(cat "$ISABELLE_STACK_ROOT/ISABELLE_GHC_PROGRAMS")/$ISABELLE_GHC_VERSION/bin/ghc" ]; then
    2.11      ISABELLE_GHC="$ISABELLE_HOME/lib/Tools/ghc"
    2.12    fi
    2.13  fi