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

More Error(UnsupportedType) Feedback #396

Closed
dan-fritchman opened this issue Dec 15, 2022 · 3 comments · Fixed by #470
Closed

More Error(UnsupportedType) Feedback #396

dan-fritchman opened this issue Dec 15, 2022 · 3 comments · Fixed by #470
Labels
A-serde Area: Serde integration C-enhancement Category: Raise on the bar on expectations

Comments

@dan-fritchman
Copy link

dan-fritchman commented Dec 15, 2022

Really helpful library, thanks so much for your work on it.

This issue is borne of dan-fritchman/Layout21#33, in which:

  • I have a big tree of structs, with lots of fields, internal types, and external types along the way
  • I pass the biggest top-most one to toml::to_string()
  • What comes back is this:
failures:

---- tests::empty_lib_to_toml stdout ----
thread 'tests::empty_lib_to_toml' panicked at 'save failed: Error(UnsupportedType)', gds21/src/tests.rs:214:50
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Question: is there any good way to get more than UnsupportedType as feedback here?
(Set a setting, submit a PR to improve the error message, whatever.)

Thanks again!

@epage epage added C-enhancement Category: Raise on the bar on expectations A-serde Area: Serde integration labels Dec 16, 2022
@epage
Copy link
Member

epage commented Dec 16, 2022

Yes, ideally we report more details to help people with this. However, a lot of things will be changing with #340 which I'm actively working on so I'd like to hold off on other changes until then.

@dan-fritchman
Copy link
Author

Ok, cool, understand.

@dan-fritchman
Copy link
Author

FWIW after an upgrade of toml (and some edits to our library), that error is now:

---- tests::golden_toml stdout ----
thread 'gds_serialization::tests::golden_toml' panicked at 'Could not save output file: values must be emitted before tables', 

I see there are handfuls of past discussions on this "ordering problem". My read is that they are all resolved, and should be handled inside the serializer? Do I have that wrong? In any case, is there a good reference for what "should work", e.g. do struct-fields need to be arranged in a particular order, etc.

epage added a commit to epage/toml_edit that referenced this issue Jan 18, 2023
This will help with debugging

This only addresses toml-rs#396 for `toml_edit`.  The rest won't be addressed
until toml-rs#340 is resolved.
@epage epage closed this as completed in 6e99df4 Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-serde Area: Serde integration C-enhancement Category: Raise on the bar on expectations
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants