Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Zeko369
Copy link
Collaborator

@Zeko369 Zeko369 commented Sep 1, 2023

Description

Adds a short section to the waspc/README.md about how to run/setup rosetta on M1/M2 macs

Select what type of change this PR introduces:

  1. Just code/docs improvement (no functional change).
  2. Bug fix (non-breaking change which fixes an issue).
  3. New feature (non-breaking change which adds functionality).
  4. Breaking change (fix or feature that would cause existing functionality to not work as expected).

Update Waspc ChangeLog and version if needed

If you did a bug fix, new feature, or breaking change, that affects waspc, make sure you satisfy the following:

  1. I updated ChangeLog.md with description of the change this PR introduces.
  2. I bumped waspc version in waspc.cabal to reflect changes I introduced, with regards to the version of the latest wasp release, if the bump was needed.

@@ -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).
Copy link
Member

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, or cabal later when building the project, or both?

Copy link
Collaborator Author

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 run cabal with rosetta (installing ghcup in m1 mode and then trying to run it or cabal didn't work)

<details>
<summary>M1/M2 rosetta setup</summary>

1. Regular Shell: just run `arch -x86_64 zsh` in your terminal.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This uses rosetta for the current terminal session?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, without any permanent changes

<summary>M1/M2 rosetta setup</summary>

1. Regular Shell: just run `arch -x86_64 zsh` in your terminal.
2. IntelliJ: Preferences -> Tools -> Terminal -> Shell path -> `env /usr/bin/arch -x86_64 /bin/zsh --login`
Copy link
Member

Choose a reason for hiding this comment

The 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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sets it per project (so only in this folder -> .idea is the config for it) and same for vscode (I suggested creating the .vscode/settings.json to make it local)

@Martinsos
Copy link
Member

@Zeko369 could you enrich the docs with this info that I asked about in comments? So provide a bit more context of which session / project these commands affect, also probably mention .vscode/settings.json . I think we are good then!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants