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

Upgrade to Stack lts-22.12 for aarch64 support #1199

Open
Freddicus opened this issue Mar 6, 2024 · 0 comments
Open

Upgrade to Stack lts-22.12 for aarch64 support #1199

Freddicus opened this issue Mar 6, 2024 · 0 comments

Comments

@Freddicus
Copy link

Freddicus commented Mar 6, 2024

Building bond on Apple Silicon is impossible today. The haskell-stack installed during setup provides the system with ghc-9.8.2, which is rejected by the Stack resolver lts-14.4 (ghc-8.6.5) defined in the compiler/stack.yaml file.

You can see it rejects newer versions of ghc.

   2024-03-06 09:12:13.992344: [debug] Not using compiler at
  "/opt/homebrew/Cellar/ghc/9.8.2/bin/ghc-9.8.2": PrettyException
  UnwantedCompilerVersion

Changing the resolver to lts-22.12 allows the build to pass the initial checks, but compilation ultimately fails on the bond source code. I imagine there are breaking changes migrating from ghc 8.x to 9.x, but Apple Silicon support wasn't added until 9.2.x and later (and is still experimental, IIRC).

Example 1:

/Users/<me>/git-projects/bond/compiler/src/Language/Bond/Syntax/JSON.hs:84:19: error: [GHC-39999]
    • No instance for ‘FromJSON TypeParam’ arising from a use of ‘.:’
    • In the second argument of ‘(<$>)’, namely ‘o .: "value"’
      In the expression: BT_TypeParam <$> o .: "value"
      In a case alternative:
          String "parameter" -> BT_TypeParam <$> o .: "value"
   |
84 |                 o .: "value"
   |                   ^^

Example 2:

/Users/<me>/git-projects/bond/compiler/src/Language/Bond/Syntax/Util.hs:64:32: error: [-Wunused-record-wildcards, Werror=unused-record-wildcards]
    No variables bound in the record wildcard match are used
      Possible fix: omit the ‘..’
   |
64 | isScalar (BT_UserDefined Enum {..} _) = True
   |   
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

No branches or pull requests

1 participant