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

Rendering newline in error doesn't help user #259

Closed
epage opened this issue Nov 16, 2021 · 4 comments
Closed

Rendering newline in error doesn't help user #259

epage opened this issue Nov 16, 2021 · 4 comments
Labels
A-error Area: Error reporting C-bug Category: Things not working as expected

Comments

@epage
Copy link
Member

epage commented Nov 16, 2021

This is a regression compared to toml-rs as found by cargo's test suites

---- bad_config::malformed_override stdout ----                                                                                                    
running `/home/epage/src/personal/cargo/target/debug/cargo build`                                                                                  
thread 'bad_config::malformed_override' panicked at '                                                                                              
test failed running `/home/epage/src/personal/cargo/target/debug/cargo build`                                                                      
error: stderr did not match:                                                                                                                       
1   1     error: failed to parse manifest at `[..]`                                                                                                
2   2                                                                                                                                              
3   3     Caused by:                                                                                                                               
4   4       could not parse input as TOML                                                                                                          
5   5                                                                                                                                              
6   6     Caused by:                                                                                                                               
7        -  expected a table key, found a newline at line 8 column 27                                                                              
    7    +  TOML parse error at line 8, column 27                                                                                                  
    8    +    |                                                          
    9    +  8 |                 native = {                                                                                                         
    10   +    |                           ^                                                                                                        
    11   +  Unexpected `                                                 
    12   +  `                                                            
@epage epage added C-bug Category: Things not working as expected cargo labels Nov 16, 2021
@epage
Copy link
Member Author

epage commented Dec 29, 2021

Strange, in other places, I'm seeing it say "newline".

@epage
Copy link
Member Author

epage commented Dec 29, 2021

Oh, expecting a newline gets special rendering, but not an unexpected.

@epage
Copy link
Member Author

epage commented Dec 29, 2021

Oh, we're providing "newline" with an expected.

epage added a commit to epage/toml_edit that referenced this issue Dec 29, 2021
epage added a commit that referenced this issue Dec 29, 2021
@settings settings bot removed the cargo label Sep 23, 2022
@epage epage added the A-error Area: Error reporting label Sep 23, 2022
@epage
Copy link
Member Author

epage commented Jan 13, 2023

This is resolved in the latest, nom-based parser

@epage epage closed this as completed Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-error Area: Error reporting C-bug Category: Things not working as expected
Projects
None yet
Development

No branches or pull requests

1 participant