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

Apple rosetta #1559

Merged
merged 6 commits into from
Nov 20, 2023
Merged

Apple rosetta #1559

merged 6 commits into from
Nov 20, 2023

Conversation

kristian240
Copy link
Contributor

Description

As agreed in Discord I added a note in docs about MacOS Rosetta.

The next step is to detect the Apple SIlicon, check if the Rosetta is installed, and prompt the user to install it if needed.

# check if apple silicon
uname -m # returns arm64 if Apple Silicon

# check if Rosetta is installed
pgrep -q oahd # returns a number if is installed

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.

@matijaSos matijaSos changed the base branch from main to release November 6, 2023 11:12
@matijaSos matijaSos changed the base branch from release to main November 6, 2023 11:19
@matijaSos
Copy link
Contributor

Awesome work @kristian240! Could you just please rebase this to release branch? That's where we keep the docs, while main is for the latest product development.

@kristian240 kristian240 changed the base branch from main to release November 6, 2023 19:42
@kristian240
Copy link
Contributor Author

@matijaSos all done!

@kristian240
Copy link
Contributor Author

Ping @matijaSos

@Martinsos
Copy link
Member

I come a bit late to the party, but we already had a PR for Rosetta, I just remembered, it however never got merged although it was almost there: #1431 .

Should we combine these two and get the best out of both? Anything to salvage from that one @kristian240 ?

@kristian240
Copy link
Contributor Author

kristian240 commented Nov 14, 2023

If my interpretation is accurate, the two PRs have different domains. The one from @Zeko369 has more in-depth explanations while this PR makes sure that the majority do not need to go to Discord to find out that Rosetta is needed. Does this make sense?

If that is true, both PRs should be merged

Copy link
Member

@Martinsos Martinsos left a comment

Choose a reason for hiding this comment

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

Apologies for just throwing in that other PR, I was a bit on the go and didn't properly study it. What you said makes sense!

So this is looking good and is a welcome addition, I just had a couple of suggestions to consider before we merge:

Let's put this into

:::note Something Unclear?
TEXT HERE
:::

to have it be in a nice "NOTE" box!

Also, some ideas for the wording:

  1. Add (arm64) after Apple Silicon? Or not?
  2. I would avoid "you might" here and reword it to "Encountering 'Bad CPU type in executable' on a device ... ?".
  3. I would maybe explain a bit why installing Rosetta is an issue -> That MacOS wasp binary is not currently pre-built for arm64 (Apple Silicon) but for x86 and that to get it running they can install Rosetta, which runs x86 stuff on arm64.

These are just suggestions, I am 100% sure in them, so do what you think makes sense and pls argument why not if it doesn't make sense.

@Martinsos
Copy link
Member

Oh and checking if Rosetta is installed @kristian240 -> that is a cool idea!
Here is our installer if you want to give it a go: https://github.com/wasp-lang/get-wasp .

@kristian240
Copy link
Contributor Author

@Martinsos i changed the copy and place this in a NOTE box. Checkout the ss below.

image

@kristian240
Copy link
Contributor Author

@matijaSos Take a look at wasp-lang/get-wasp#7

Copy link
Member

@Martinsos Martinsos left a comment

Choose a reason for hiding this comment

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

@kristian240 nice, here is last round of suggestions from my side!

web/docs/introduction/getting-started.md Outdated Show resolved Hide resolved

Given that the wasp binary is built for x86 and not for arm64 (Apple Silicon), you'll need to install [Rosetta on your Mac](https://support.apple.com/en-us/HT211861). Rosetta is a translation process that enables users to run applications designed for x86 on arm64 (Apple Silicon). To install Rosetta, run the following command in your terminal: `softwareupdate --install-rosetta`. Once Rosetta is installed, you should be able to run Wasp without any issues.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Given that the wasp binary is built for x86 and not for arm64 (Apple Silicon), you'll need to install [Rosetta on your Mac](https://support.apple.com/en-us/HT211861). Rosetta is a translation process that enables users to run applications designed for x86 on arm64 (Apple Silicon). To install Rosetta, run the following command in your terminal: `softwareupdate --install-rosetta`. Once Rosetta is installed, you should be able to run Wasp without any issues.
Given that the wasp binary is built for x86 and not for arm64 (Apple Silicon), you'll need to install [Rosetta on your Mac](https://support.apple.com/en-us/HT211861) if you are using a Mac with Mx (M1, M2, ...) chip. Rosetta is a translation process that enables users to run applications designed for x86 on arm64 (Apple Silicon). To install Rosetta, run the following command in your terminal: `softwareupdate --install-rosetta`. Once Rosetta is installed, you should be able to run Wasp without any issues!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

kristian240 and others added 2 commits November 20, 2023 12:00
Copy link
Member

@Martinsos Martinsos left a comment

Choose a reason for hiding this comment

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

Awesome, that's it! Thanks, merging!

@Martinsos Martinsos merged commit 4c03042 into wasp-lang:release Nov 20, 2023
@matijaSos
Copy link
Contributor

Congrats @kristian240 on your first commit and becoming a contributor! :) Thanks for your patience.

@kristian240 kristian240 deleted the apple-rosetta branch November 20, 2023 12:58
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.

3 participants