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

Failing tests for keyword list -> tuple conversion #1486

Merged
merged 2 commits into from
Nov 21, 2024

Conversation

bcardarella
Copy link
Collaborator

@NduatiK this is necessary for the stylesheet Elixir map to json conversion task.

Some background, we were previously parsing named arguments into a single keyword list. However, in SwiftUI named arguments are individual arguments not a combination of a few into a single argument. For example this modifiers:

fooBar(10, a: 1, b: 2, 5)

has arity of 4 but our parser actually converts this into arity of 3:

{:fooBar, [], [10, [a: 1, b: 2], 5]}

Instead we want to represent named arguments are tuple pairs:

{:fooBar, [], [10, {:a, 1}, {:b, 2}, 5]}

I've updated the tests to reflect this change and just need the parser updated.

@NduatiK
Copy link
Contributor

NduatiK commented Nov 15, 2024

Hey, @bcardarella, the change makes sense, I've made some modifications to the tests and addressed the failures.

PS. These pending PRs are related to the JSON changes:

  1. Change stylesheet output to JSON live_view_native_stylesheet#87
  2. Prepare SwiftUI parser for outputing stylesheet as a map #1458
  3. Prepare Jetpack parser for outputing stylesheet as a map liveview-client-jetpack#473

2 and 3 are ready for review, but I think they depend on 1.

@bcardarella bcardarella merged commit 4e649ea into main Nov 21, 2024
2 checks passed
@bcardarella bcardarella deleted the bc-convert-keyword-lists-to-tuples branch November 21, 2024 06:55
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