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

fix: error build on Swift 5.10 #123

Merged
merged 1 commit into from
Mar 7, 2024
Merged

Conversation

jwthanh
Copy link
Contributor

@jwthanh jwthanh commented Mar 7, 2024

  • break a long expression into smaller expressions
  • fix the error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions

When my team upgraded to XCode 15.3 (Swift 5.10). they got the error

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
external/bazelpods/Sources/BazelPodsCore/Core/MultiPlatform.swift:108:16: error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
        return .functionCall(name: "select", arguments: [.basic((
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: fatalError
Target @bazelpods//:bazelpods failed to build

I followed this stuff https://sarunw.com/posts/how-to-fix-the-compiler-is-unable-to-type-check-this-expression-in-reasonable-time/ and broke the long-expression to smaller.

- break a long expression into smaller expressions
- fix the error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
@sergiikhliustin sergiikhliustin merged commit 5a17299 into sergiikhliustin:main Mar 7, 2024
1 check passed
@sergiikhliustin
Copy link
Owner

@jwthanh thanks for your fix!
Released: https://github.com/sergeykhliustin/BazelPods/releases/tag/1.11.5

jwthanh added a commit to ahiho/BazelPods that referenced this pull request Mar 7, 2024
- break a long expression into smaller expressions
- fix the error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
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