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: #23 #28 #35 list with map of lists issue #49

Merged
merged 1 commit into from
Dec 27, 2024

Conversation

carlmontanari
Copy link
Contributor

@carlmontanari carlmontanari commented Dec 21, 2024

👋 I ran into the same issue as in #23 #28 and #35 today. it looks like #28 hasn't been updated so took the tweaks that they had made and put them here. I made a bit more elaborate of a test based on the exact issue I encountered. with the changes in my local vendored copy things are working as expected!

I also changed the test here to expect failure as I dont think that is valid?

  - a
- b

at least the above complains in yaml validators and such and with the tweaks in this pr it raises the expected UnexpectedToken error.

unrelated, but I also think that with the recent changes the test package may need to get included in build.zig.zon since the build file imports from there -- works fine for local/vendored but not when including in my build.zig.zon as dep. happy to make another quick patch for this or can include here if wanted. looks like sorted by #51 :)

im super new to zig so hopefully this is all cool. thanks for making this package! 🥳

edit to include before/after output:

before:

modes:
    - name: a
      fooers:
          - name: b
            do_thing:
                thing: blah
          - name: b
            fooers:
                - name: a
                  do_thing:
                      input: blah
                - name: c
                  do_thing:
                      input: blah
                - name: d
                  do_thing:
                      input: blah
                - name: c
                  fooers:
                      - name: b
                        do_thing:
                            input: blah
                      - name: d
                        fooers:
                            - name: b
                              do_thing:
                                  input: blah

and after:

modes:
    - name: a
      accessible_modes:
          - name: b
            do_thing:
                thing: blah
    - name: b
      accessible_modes:
          - name: a
            do_thing:
                thing: blah
          - name: c
            do_thing:
                thing: blah
          - name: d
            do_thing:
                thing: blah
    - name: c
      accessible_modes:
          - name: b
            do_thing:
                thing: blah
    - name: d
      accessible_modes:
          - name: b
            do_thing:
                thing: blah

@kubkon
Copy link
Owner

kubkon commented Dec 27, 2024

Looks good, thanks!

@kubkon kubkon merged commit c159b36 into kubkon:main Dec 27, 2024
5 checks passed
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