From ff4ad25928616acfdd25dcd64a12f0266cda0749 Mon Sep 17 00:00:00 2001 From: Francisco Vallarino Date: Sun, 20 Nov 2022 21:17:30 -0300 Subject: [PATCH] Upgrade stack.yaml to LTS 20 (GHC 9.2) (#236) * Use Stackage LTS 20 * Keep copy of stack.yaml for GHC 8.10.7 version * Update setup docs to include GHCup * Fix case * Remove old note about M1 incompatibility * Use Stackage LTS 20.1 --- docs/tutorials/00-setup.md | 43 ++++++++++++---------- stack-8.10.yaml | 73 ++++++++++++++++++++++++++++++++++++++ stack.yaml | 3 +- stack.yaml.lock | 10 +++--- 4 files changed, 104 insertions(+), 25 deletions(-) create mode 100644 stack-8.10.yaml diff --git a/docs/tutorials/00-setup.md b/docs/tutorials/00-setup.md index 0724f6e6..c22f052f 100644 --- a/docs/tutorials/00-setup.md +++ b/docs/tutorials/00-setup.md @@ -2,11 +2,28 @@ ## Stack -In case you don't have Stack installed in your system, you should visit -[Stack's](https://docs.haskellstack.org/en/stable/install_and_upgrade/) website -and follow the appropriate installation method for your OS. If you are on -Linux or macOS, you will be provided with a shell command, while if you are on -Windows a regular installer is available. +### Regular Stack installer - All except Apple Silicon + +Visit [Stack's](https://docs.haskellstack.org/en/stable/install_and_upgrade/) +website and follow the appropriate installation method for your OS. If you are +on Linux or macOS, you will be provided with a shell command, while if you are +on Windows a regular installer is available. + +#### Note: Apple Silicon + +The default Stack installer does not currently provide support for Apple Silicon +(M1/M2 processors). The best option in this case is installing through GHCup. + +### GHCup - All except non-WSL2 Windows + +Visit [GHCup's](https://www.haskell.org/ghcup/) website and follow the +appropriate installation method for your OS. Answer **Yes** when asked: _"Do you +want to enable better integration of stack with GHCup?"_. + +#### Note: Windows without WSL2 + +To use Windows without installing the Windows Subsystem for Linux, use the +regular Stack installer described previously. ## Clone the starter project @@ -33,18 +50,6 @@ You may need to install `pkg-config`, in case it was not previously installed: brew install pkg-config ``` -#### Notes: M1 - -The standard build process currently fails on M1 Macs. This issue should be -fixed when support for `GHC 9.2` is added to `stack`, since that version of GHC -includes a native code generator for M1 processors. - -It has been [reported](https://github.com/fjvallarino/monomer/issues/1) that: - -- Building for x86 and running the application in the Rosetta shell works well. -- Applying some workarounds, mentioned in the same issue, the build can work on - M1. - ### Linux #### Debian/Ubuntu @@ -171,7 +176,7 @@ Falling back to rendering in the main thread. ``` Besides having the content stretched while resizing the window (i.e. not -dinamically resized), there are no other differences between the threaded and +dynamically resized), there are no other differences between the threaded and non-threaded modes. ## Development mode @@ -203,7 +208,7 @@ immediately. Note: when a file is saved, a new instance of the application will be in a new window. The previous window needs to be closed manually. -## Notes for macOS users +## Notes for Intel Mac users If you have a discrete GPU, and you'd rather have your application use the integrated GPU, you may want to copy `Info.plist` into the bin directory the diff --git a/stack-8.10.yaml b/stack-8.10.yaml new file mode 100644 index 00000000..f92a61c1 --- /dev/null +++ b/stack-8.10.yaml @@ -0,0 +1,73 @@ +# This file was automatically generated by 'stack init' +# +# Some commonly used options have been documented as comments in this file. +# For advanced use and comprehensive documentation of the format, please see: +# https://docs.haskellstack.org/en/stable/yaml_configuration/ + +# Resolver to choose a 'specific' stackage snapshot or a compiler version. +# A snapshot resolver dictates the compiler version and the set of packages +# to be used for project dependencies. For example: +# +# resolver: lts-3.5 +# resolver: nightly-2015-09-21 +# resolver: ghc-7.10.2 +# resolver: ghcjs-0.1.0_ghc-7.10.2 +# resolver: +# name: custom-snapshot +# location: "./custom-snapshot.yaml" + +#resolver: lts-14.27 +#resolver: lts-17.15 +resolver: lts-18.27 + +# User packages to be built. +# Various formats can be used as shown in the example below. +# +# packages: +# - some-directory +# - https://example.com/foo/bar/baz-0.0.2.tar.gz +# - location: +# git: https://github.com/commercialhaskell/stack.git +# commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a +# - location: https://github.com/commercialhaskell/stack/commit/e7b331f14bcffb8367cd58fbfc8b40ec7642100a +# extra-dep: true +# subdirs: +# - auto-update +# - wai +# +# A package marked 'extra-dep: true' will only be built if demanded by a +# non-dependency (i.e. a user package), and its test suites and benchmarks +# will not be run. This is useful for tweaking upstream packages. +packages: +- . + +# Dependency packages to be pulled from upstream that are not in the resolver +# (e.g., acme-missiles-0.3) +extra-deps: + - nanovg-0.8.1.0@sha256:9131db15822c6593aa73946b56593eb0a14a0d044395bcdfd4fe2d3e6edb6759,4742 + +# Override default flag values for local packages and extra-deps +flags: + nanovg: + stb_truetype: true + +# Extra package databases containing global packages +# extra-package-dbs: [] + +# Control whether we use the GHC we find on the path +# system-ghc: true +# +# Require a specific version of stack, using version ranges +# require-stack-version: -any # Default +# require-stack-version: ">=1.6" +# +# Override the architecture used by stack, especially useful on Windows +# arch: i386 +# arch: x86_64 +# +# Extra directories used by stack for building +# extra-include-dirs: [/path/to/dir] +# extra-lib-dirs: [/path/to/dir] +# +# Allow a newer minor version of GHC than the snapshot specifies +# compiler-check: newer-minor diff --git a/stack.yaml b/stack.yaml index f92a61c1..f39916d3 100644 --- a/stack.yaml +++ b/stack.yaml @@ -18,7 +18,8 @@ #resolver: lts-14.27 #resolver: lts-17.15 -resolver: lts-18.27 +#resolver: lts-18.27 +resolver: lts-20.1 # User packages to be built. # Various formats can be used as shown in the example below. diff --git a/stack.yaml.lock b/stack.yaml.lock index f3e4f19f..21c6c5fd 100644 --- a/stack.yaml.lock +++ b/stack.yaml.lock @@ -5,15 +5,15 @@ packages: - completed: + hackage: nanovg-0.8.1.0@sha256:9131db15822c6593aa73946b56593eb0a14a0d044395bcdfd4fe2d3e6edb6759,4742 pantry-tree: sha256: b83e640d56213061f632a76012a63625d76ceacf905bb8cee6ee03f981047c03 size: 2558 - hackage: nanovg-0.8.1.0@sha256:9131db15822c6593aa73946b56593eb0a14a0d044395bcdfd4fe2d3e6edb6759,4742 original: hackage: nanovg-0.8.1.0@sha256:9131db15822c6593aa73946b56593eb0a14a0d044395bcdfd4fe2d3e6edb6759,4742 snapshots: - completed: - sha256: 79a786674930a89301b0e908fad2822a48882f3d01486117693c377b8edffdbe - size: 590102 - url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/18/27.yaml - original: lts-18.27 + sha256: b73b2b116143aea728c70e65c3239188998bac5bc3be56465813dacd74215dc5 + size: 648424 + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/20/1.yaml + original: lts-20.1