Skip to content

Commit 0a57e13

Browse files
committed
Merge branch 'stable' into rc/v2.13
2 parents 5800d00 + c14cc4d commit 0a57e13

File tree

5 files changed

+63
-64
lines changed

5 files changed

+63
-64
lines changed

doc/README.md

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,7 @@ Windows.
9393
M2 chip. These chips use an architecture known as ARM64 or AArch64.
9494

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

10498
~~~text
10599
curl -sSL https://get.haskellstack.org/ | sh
@@ -111,19 +105,14 @@ Windows.
111105
wget -qO- https://get.haskellstack.org/ | sh
112106
~~~
113107

114-
However, those commands will download and install the version of Stack
115-
for Intel-based Mac computers. Mac computers with Apple silicon will
116-
use Apple's
117-
[Rosetta 2 application](https://support.apple.com/en-gb/HT211861) to
118-
use that version of Stack.
119-
120-
Apple's Terminal application will not detect automatically that Rosetta
121-
has not yet been installed. Rosetta can be manually installed by
122-
commanding:
108+
!!! note
123109

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

128117
=== "Windows"
129118

doc/build_command.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -559,14 +559,16 @@ package is targetted in a multi-package project (for example, using
559559

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

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

doc/install_and_upgrade.md

Lines changed: 20 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -295,19 +295,8 @@ GitHub repository.
295295
Mac computers with Apple silicon have an M1, M1 Pro, M1 Max, M1 Ultra or
296296
M2 chip. These chips use an architecture known as ARM64 or AArch64.
297297

298-
The Stack repository uses GitHub-hosted runners to create binary
299-
distributions for macOS. GitHub-hosted runners are not expected to be
300-
available for macOS on Apple silicon until July to September 2023.
301-
302-
Consequently, for Mac computers with Apple silicon, the easiest way to
303-
install Stack directly (rather than use GHCup) is to obtain the
304-
'unofficial' `osx-aarch64` binary distribution released by the GHCup
305-
developers and copy it to a location on the PATH. `*.tar.gz` archive
306-
files containing those binary distributions are available at the
307-
directories here:
308-
[:material-cloud-download-outline:](https://downloads.haskell.org/ghcup/unofficial-bindists/stack/).
309-
310-
It is still possible to use the commands:
298+
For Mac computers with Apple silicon, the easiest way to install Stack
299+
directly (rather than use GHCup) is to command:
311300

312301
~~~text
313302
curl -sSL https://get.haskellstack.org/ | sh
@@ -319,19 +308,13 @@ GitHub repository.
319308
wget -qO- https://get.haskellstack.org/ | sh
320309
~~~
321310

322-
However, those commands will download and install the version of Stack
323-
for Intel-based Mac computers. Mac computers with Apple silicon will
324-
use Apple's
325-
[Rosetta 2 application](https://support.apple.com/en-gb/HT211861) to
326-
use that version of Stack.
327-
328-
Apple's Terminal application will not detect automatically that Rosetta
329-
has not yet been installed. Rosetta can be manually installed by
330-
commanding:
311+
!!! note
331312

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

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

346+
### Manual download
347+
348+
* Click
349+
[:material-cloud-download-outline:](https://get.haskellstack.org/stable/osx-aarch64.tar.gz)
350+
to download an archive file with the latest release for AArch64
351+
architectures.
352+
353+
* Extract the archive and place `stack` somewhere on your PATH (see the
354+
[Path](#path) section below).
355+
356+
* Now you can run Stack from the command line in a terminal.
357+
363358
### Using Homebrew
364359

365360
[Homebrew](https://brew.sh/) is a popular package manager for macOS. If you

doc/yaml_configuration.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -800,9 +800,9 @@ The value of the `dump-logs` key controls what, if any, log file content is sent
800800
Possible values are:
801801

802802
~~~yaml
803-
dump-logs: none # don't dump the content of any log files
804-
dump-logs: warning # dump the content of log files that are warnings
805-
dump-logs: all # dump all of the content of log files
803+
dump-logs: none # don't dump the content of any log files
804+
dump-logs: warning # dump the content of any log files that include GHC warnings
805+
dump-logs: all # dump the content of all log files
806806
~~~
807807

808808
At the command line, `--no-dump-logs` is equivalent to `dump-logs: none` and

etc/scripts/get-stack.sh

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,15 @@ post_install_separator() {
6969
info ""
7070
}
7171

72-
# determines the CPU's instruction set
72+
# determines the CPU's instruction set architecture (ISA)
7373
get_isa() {
7474
if uname -m | grep -Eq 'armv[78]l?' ; then
7575
echo arm
7676
elif uname -m | grep -q aarch64 ; then
7777
echo aarch64
78+
# uname -m returns arm64 on macOS/AArch64
79+
elif uname -m | grep -q arm64 ; then
80+
echo aarch64
7881
elif uname -m | grep -q x86 ; then
7982
echo x86
8083
else
@@ -289,16 +292,22 @@ do_windows_install() {
289292
}
290293

291294
# Attempts to install on macOS.
292-
# If 'brew' exists, installs using Homebrew. Otherwise, installs
293-
# the generic bindist.
294295
do_osx_install() {
295-
info "Using generic bindist..."
296-
info ""
297-
install_64bit_osx_binary
298-
info "NOTE: You may need to run 'xcode-select --install' and/or"
299-
info " 'open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg'"
300-
info " to set up the Xcode command-line tools, which Stack uses."
301-
info ""
296+
if is_x86_64 ; then
297+
install_x86_64_osx_binary
298+
info "NOTE: You may need to run 'xcode-select --install' and/or"
299+
info " 'open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg'"
300+
info " to set up the Xcode command-line tools, which Stack uses."
301+
info ""
302+
elif is_aarch64 ; then
303+
install_aarch64_osx_binary
304+
info "NOTE: You may need to run 'xcode-select --install' and/or"
305+
info " 'open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg'"
306+
info " to set up the Xcode command-line tools, which Stack uses."
307+
info ""
308+
else
309+
die "Sorry, currently only 64-bit (x86_64 or aarch64) macOS binary is available."
310+
fi
302311
}
303312

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

584-
install_64bit_osx_binary() {
593+
install_aarch64_osx_binary() {
594+
install_from_bindist "osx-aarch64.tar.gz"
595+
}
596+
597+
install_x86_64_osx_binary() {
585598
install_from_bindist "osx-x86_64.tar.gz"
586599
}
587600

0 commit comments

Comments
 (0)