Skip to content

Commit

Permalink
Merge branch 'stable' into rc/v2.13
Browse files Browse the repository at this point in the history
  • Loading branch information
mpilgrem committed Sep 25, 2023
2 parents 5800d00 + c14cc4d commit 0a57e13
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 64 deletions.
27 changes: 8 additions & 19 deletions doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,7 @@ Windows.
M2 chip. These chips use an architecture known as ARM64 or AArch64.

For Mac computers with Apple silicon, the easiest way to install Stack
directly (rather than use GHCup) is to obtain the 'unofficial'
`osx-aarch64` binary distribution released by the GHCup developers and
copy it to a location on the PATH. `*.tar.gz` archive files containing
those binary distributions are available at the directories here:
[:material-cloud-download-outline:](https://downloads.haskell.org/ghcup/unofficial-bindists/stack/).

It is still possible to use the commands:
directly (rather than use GHCup) is to command:

~~~text
curl -sSL https://get.haskellstack.org/ | sh
Expand All @@ -111,19 +105,14 @@ Windows.
wget -qO- https://get.haskellstack.org/ | sh
~~~

However, those commands will download and install the version of Stack
for Intel-based Mac computers. Mac computers with Apple silicon will
use Apple's
[Rosetta 2 application](https://support.apple.com/en-gb/HT211861) to
use that version of Stack.

Apple's Terminal application will not detect automatically that Rosetta
has not yet been installed. Rosetta can be manually installed by
commanding:
!!! note

~~~text
softwareupdate --install-rosetta
~~~
The script at [get.haskellstack.org](https://get.haskellstack.org/)
will ask for root access using `sudo`. It needs such access in order
to use your platform's package manager to install dependencies and
to install to `/usr/local/bin`. If you prefer more control, follow
the manual installation instructions in the
[install and upgrade guide](install_and_upgrade.md).

=== "Windows"

Expand Down
14 changes: 8 additions & 6 deletions doc/build_command.md
Original file line number Diff line number Diff line change
Expand Up @@ -559,14 +559,16 @@ package is targetted in a multi-package project (for example, using

* **More than one target package:** The build output from GHC (as opposed to
from Stack) for each target package is sent to a log file for that package,
unless an error occurs that prevents that. At the end of the build, the
location of the directory containing the log files is reported. To also output
the contents of the log files to the standard error stream of the console at
the end of the build, use Stack's `dump-logs` option. For further
unless an error occurs that prevents that. If color in output is in use, there
will be two files, one with extension `.log` without color codes and one with
extension `.log-color` with color codes. At the end of the build, the location
of the directory containing the log files is reported. To also output the
contents of the log files to the standard error output stream of the console
at the end of the build, use Stack's `dump-logs` option. For further
information about that option, see the
[YAML configuration](yaml_configuration.md#dump-logs) documentation. The
default `dump-logs` mode is to output the contents of the log files that are
warnings.
default `dump-logs` mode is to output the contents of any log files that
include GHC warnings.

### `--[no]-open` flag

Expand Down
45 changes: 20 additions & 25 deletions doc/install_and_upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -295,19 +295,8 @@ GitHub repository.
Mac computers with Apple silicon have an M1, M1 Pro, M1 Max, M1 Ultra or
M2 chip. These chips use an architecture known as ARM64 or AArch64.

The Stack repository uses GitHub-hosted runners to create binary
distributions for macOS. GitHub-hosted runners are not expected to be
available for macOS on Apple silicon until July to September 2023.

Consequently, for Mac computers with Apple silicon, the easiest way to
install Stack directly (rather than use GHCup) is to obtain the
'unofficial' `osx-aarch64` binary distribution released by the GHCup
developers and copy it to a location on the PATH. `*.tar.gz` archive
files containing those binary distributions are available at the
directories here:
[:material-cloud-download-outline:](https://downloads.haskell.org/ghcup/unofficial-bindists/stack/).

It is still possible to use the commands:
For Mac computers with Apple silicon, the easiest way to install Stack
directly (rather than use GHCup) is to command:

~~~text
curl -sSL https://get.haskellstack.org/ | sh
Expand All @@ -319,19 +308,13 @@ GitHub repository.
wget -qO- https://get.haskellstack.org/ | sh
~~~

However, those commands will download and install the version of Stack
for Intel-based Mac computers. Mac computers with Apple silicon will
use Apple's
[Rosetta 2 application](https://support.apple.com/en-gb/HT211861) to
use that version of Stack.

Apple's Terminal application will not detect automatically that Rosetta
has not yet been installed. Rosetta can be manually installed by
commanding:
!!! note

~~~text
softwareupdate --install-rosetta
~~~
The script at [get.haskellstack.org](https://get.haskellstack.org/)
will ask for root access using `sudo`. It needs such access in order
to use your platform's package manager to install dependencies and
to install to `/usr/local/bin`. If you prefer more control, follow
the manual installation instructions below.

The installation of Stack or some packages (e.g. `network`) requiring C
source compilation might fail with `configure: error: C compiler cannot
Expand Down Expand Up @@ -360,6 +343,18 @@ GitHub repository.
compile x86-64 objects and attempt to link them with existing ARM64
libraries, resulting in the error above.

### Manual download

* Click
[:material-cloud-download-outline:](https://get.haskellstack.org/stable/osx-aarch64.tar.gz)
to download an archive file with the latest release for AArch64
architectures.

* Extract the archive and place `stack` somewhere on your PATH (see the
[Path](#path) section below).

* Now you can run Stack from the command line in a terminal.

### Using Homebrew

[Homebrew](https://brew.sh/) is a popular package manager for macOS. If you
Expand Down
6 changes: 3 additions & 3 deletions doc/yaml_configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -800,9 +800,9 @@ The value of the `dump-logs` key controls what, if any, log file content is sent
Possible values are:

~~~yaml
dump-logs: none # don't dump the content of any log files
dump-logs: warning # dump the content of log files that are warnings
dump-logs: all # dump all of the content of log files
dump-logs: none # don't dump the content of any log files
dump-logs: warning # dump the content of any log files that include GHC warnings
dump-logs: all # dump the content of all log files
~~~

At the command line, `--no-dump-logs` is equivalent to `dump-logs: none` and
Expand Down
35 changes: 24 additions & 11 deletions etc/scripts/get-stack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,15 @@ post_install_separator() {
info ""
}

# determines the CPU's instruction set
# determines the CPU's instruction set architecture (ISA)
get_isa() {
if uname -m | grep -Eq 'armv[78]l?' ; then
echo arm
elif uname -m | grep -q aarch64 ; then
echo aarch64
# uname -m returns arm64 on macOS/AArch64
elif uname -m | grep -q arm64 ; then
echo aarch64
elif uname -m | grep -q x86 ; then
echo x86
else
Expand Down Expand Up @@ -289,16 +292,22 @@ do_windows_install() {
}

# Attempts to install on macOS.
# If 'brew' exists, installs using Homebrew. Otherwise, installs
# the generic bindist.
do_osx_install() {
info "Using generic bindist..."
info ""
install_64bit_osx_binary
info "NOTE: You may need to run 'xcode-select --install' and/or"
info " 'open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg'"
info " to set up the Xcode command-line tools, which Stack uses."
info ""
if is_x86_64 ; then
install_x86_64_osx_binary
info "NOTE: You may need to run 'xcode-select --install' and/or"
info " 'open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg'"
info " to set up the Xcode command-line tools, which Stack uses."
info ""
elif is_aarch64 ; then
install_aarch64_osx_binary
info "NOTE: You may need to run 'xcode-select --install' and/or"
info " 'open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg'"
info " to set up the Xcode command-line tools, which Stack uses."
info ""
else
die "Sorry, currently only 64-bit (x86_64 or aarch64) macOS binary is available."
fi
}

# # Attempts to install on FreeBSD. Installs dependencies with
Expand Down Expand Up @@ -581,7 +590,11 @@ install_aarch64_linux_binary() {
install_from_bindist "linux-aarch64.tar.gz"
}

install_64bit_osx_binary() {
install_aarch64_osx_binary() {
install_from_bindist "osx-aarch64.tar.gz"
}

install_x86_64_osx_binary() {
install_from_bindist "osx-x86_64.tar.gz"
}

Expand Down

0 comments on commit 0a57e13

Please sign in to comment.