-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add docs on how to build wasp from source on M1/M2 macs #1431
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,32 @@ It can then also run that web app for you, deploy it (not yet but that is coming | |
### Setup | ||
We use the [`cabal`](https://cabal.readthedocs.io/) command line tool to build | ||
the project. The best way to install it is via | ||
[ghcup](https://www.haskell.org/ghcup/). The `ghcup tui` terminal user interface | ||
[ghcup](https://www.haskell.org/ghcup/) (if you're running an M1/M2 mac make sure to run it in rosetta). | ||
|
||
<details> | ||
<summary>M1/M2 rosetta setup</summary> | ||
|
||
1. Regular Shell: just run `arch -x86_64 zsh` in your terminal. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This uses rosetta for the current terminal session? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yup, without any permanent changes |
||
2. IntelliJ: Preferences -> Tools -> Terminal -> Shell path -> `env /usr/bin/arch -x86_64 /bin/zsh --login` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are we ok with doing this for all of the shells that IntelliJ runs? Because this will then be also used when you are not dealing with Haskell, right? Same question for vscode below. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This sets it per project (so only in this folder -> |
||
3. VSCode: add the following to your local `.vscode/settings.json` file | ||
|
||
```json | ||
{ | ||
"terminal.integrated.profiles.osx": { | ||
"rosetta": { | ||
"path": "/usr/bin/arch", | ||
"args": ["-arch", "x86_64", "/bin/zsh"], | ||
"overrideName": true | ||
} | ||
}, | ||
"terminal.integrated.defaultProfile.osx": "rosetta" | ||
} | ||
``` | ||
|
||
To check you can run `sysctl sysctl.proc_translated` and it should print out `sysctl.proc_translated: 1` | ||
</details> | ||
|
||
The `ghcup tui` terminal user interface | ||
is a convenient way of installing and selecting versions of `cabal`, `hls` and | ||
`ghc`. | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So what exactly do you have to run in rosetta ->
ghcup
, during installation, orcabal
later when building the project, or both?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to install
ghcup
and then I suppose also runcabal
with rosetta (installing ghcup in m1 mode and then trying to run it orcabal
didn't work)