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

Figma Code Connect Compose + Mac OS #216

Open
arorachetanya opened this issue Nov 29, 2024 · 6 comments
Open

Figma Code Connect Compose + Mac OS #216

arorachetanya opened this issue Nov 29, 2024 · 6 comments

Comments

@arorachetanya
Copy link

  • Code Connect CLI version - 1.2.2
  • Operating system - macOS Sonoma 14.5
  • Code connect - Compose

Using config file:

{
  "codeConnect": {
    "parser": "compose",
    "gradleWrapperPath": "..",
    "include": [
      "path to doc file which have example of using compose component"
    ]
  }
}

Using command:
figma connect publish --token my_token

Doc File:

@FigmaConnect(url = "url to ui component on figma")
class MyComponentDoc {

    @Composable
    fun MyComponentSnippet() {
        MyComponent(
            MyComponentData(
                myComponentType = MyComponent.A.ordinal,
                myComponentItems = mutableStateListOf(
                    MyComponentItem("Abc"),
                    MyComponentItem("Abcd"),
                    MyComponentItem("Abcde"),
                    MyComponentItem("Abc"),
                    MyComponentItem("Abcdef"),
                ),
            ),
        ) {}
    }
}

Figma Connect for compose not working on macOS

Config file found, parsing /sytem_path_to_android_project using specified include globs
Running parser: ./gradlew -p . parseCodeConnect -PfilePath=tmp/figma-code-connect-parser-io.json.tmp -q
Error returned from parser: Validation error: Required at "docs"; Required at "messages". Try re-running the command with --verbose for more information.
@tomduncalf-figma
Copy link
Contributor

Hey @arorachetanya, could you try rerunning the publish command with --verbose added, to see if we get any useful output? It seems like there might be an issue invoking our Compose parser

@arorachetanya
Copy link
Author

Hi @tomduncalf-figma,
Tried --verbose, still getting same error message.

Config file found, parsing /sytem_path_to_android_project using specified include globs
Running parser: ./gradlew -p . parseCodeConnect -PfilePath=tmp/figma-code-connect-parser-io.json.tmp -q
Error returned from parser: Validation error: Required at "docs"; Required at "messages". Try re-running the command with --verbose for more information.

@arorachetanya
Copy link
Author

Hi @tomduncalf-figma,
Can you please help me with any work around which could help resolve publish issue?

@jesussangomez
Copy link

I'm experiencing the same error when trying to publish, there's no more output with --verbose.

@jesussangomez
Copy link

Just an update, after updating my Kotlin and Gradle plugins, and using the latest version of the code connect library, I was able to make it work.

@slees-figma
Copy link

Hi @arorachetanya, sorry for the delayed response! I haven't been able to repro on my end using your example code. Please could try update to the latest library + plugin and let us know what the output is?

We're also seeing some incompatibility problems with the latest Kotlin Gradle plugin (2.1.0), though these look like different errors. Maybe worth double checking what you have there.

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

No branches or pull requests

4 participants