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

toml: fix @[toml: ], support @[skip] #21571

Merged
merged 8 commits into from
May 26, 2024
Merged

toml: fix @[toml: ], support @[skip] #21571

merged 8 commits into from
May 26, 2024

Conversation

heyimtcn
Copy link
Contributor

fix toml.decode_struct[T]() to support field @[toml: name]

@ttytm
Copy link
Member

ttytm commented May 25, 2024

Nice contrib @heyimtcn.

Can you add a test? I think that the attribs would need to be respected during encoding as well to have consistent behavior.

@heyimtcn
Copy link
Contributor Author

heyimtcn commented May 25, 2024

patched @[toml: ] in encode, added @[skip] and wrote tests

@heyimtcn heyimtcn changed the title toml.v fix decode_struct not working with toml: toml: fix @[toml: ], support @[skip] May 25, 2024
Copy link
Member

@spytheman spytheman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work.

@heyimtcn
Copy link
Contributor Author

why do formatting checks keep failing?? i even tested it locally and it works fine...

@spytheman
Copy link
Member

spytheman commented May 26, 2024

why do formatting checks keep failing?? i even tested it locally and it works fine...

It may have been because of some interaction between vfmt, your editor or your git settings, as @ttytm noted.

v fmt -w vlib/toml done manually in the terminal, fixed it for me.

I have these lines:

[core]
autocrlf=input
safecrlf=false

in my .gitconfig file, if that is of any help.

@spytheman spytheman merged commit c689f80 into vlang:master May 26, 2024
57 checks passed
@ttytm
Copy link
Member

ttytm commented May 26, 2024

Right, there might have been an overwrite due to a local setting. Let us know if you spot what was causing it 😊

spytheman added a commit to felipensp/v that referenced this pull request May 27, 2024
* master:
  cgen: fix array fixed initialization on struct from call (vlang#21568)
  testing: implement a separate `-show-asserts` option, for cleaner test output (`-stats` still works, and still shows both the compilation stats and the asserts) (vlang#21578)
  toml: fix `@[toml: ]`, support `@[skip]` (vlang#21571)
  os: fix debugger_present() for non Windows OSes (vlang#21573)
  builtin: simplify splint_nth methods (vlang#21563)
  net.http: change default http.Server listening address to :9009, to avoid conflicts with tools, that start their own http servers on 8080 like bytehound (vlang#21570)
  os: make minior improvement to C function semantics and related code (vlang#21565)
  io: cleanup prefix_and_suffix/1 util function (vlang#21562)
  os: remove mut declarions for unchanged vars in `os_nix.c.v` (vlang#21564)
  builtin: reduce allocations in s.index_kmp/1 and s.replace/2 (vlang#21561)
  ci: shorten path used for unix domain socket tests (to fit in Windows path limits)
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.

None yet

3 participants