skiptools / skiptools/skip

`ViewModifiers` with generics fail to build

Open
#466 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

fuse
Dominant language
Swift
Stars
3.2k
Forks
106
Avg merge
6d 13h
Merged PRs (30d)
1

Description

When having:

struct PerformEquatableBlockingModifier<T: Equatable>: ViewModifier { ... }

I'm getting this on skip android build:

/Users/piercifani/Developer/BSWInterfaceKit/.build/plugins/outputs/bswinterfacekit/BSWInterfaceKit/destination/skipstone/SkipBridgeGenerated/BlockingTask_Bridge.swift:78:93: error: missing argument label 'content:' in call
 76 |     nonisolated func toTypeErased() -> AnyObject {
 77 |         let typeErased = PerformEquatableBlockingModifier_TypeErased(self)
 78 |         typeErased.body = { [unowned typeErased] in (typeErased.genericvalue as! Self).body($0) }
    |                                                                                             `- error: missing argument label 'content:' in call
 79 |         typeErased.Java_initState_taskError = { [unowned typeErased] in (typeErased.genericvalue as! Self).Java_initState_taskError() }
 80 |         typeErased.Java_syncState_taskError = { [unowned typeErased] in (typeErased.genericvalue as! Self).Java_syncState_taskError(support: $0) }

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Run the skip android build reproduction using a generic ViewModifier, then inspect the generated .build/plugins/outputs/bswinterfacekit/BSWInterfaceKit/destination/skipstone/SkipBridgeGenerated/BlockingTask_Bridge.swift around line 78. Determine why the generated body call omits the content: label; done means the Android build succeeds for the reported generic modifier.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, swift
Domain
build-system, mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.