Skip to content

Fix && quotation in to nuon after proptest fail#7564

Merged
sholderbach merged 3 commits intonushell:mainfrom
sholderbach:to-nuon-fix
Dec 21, 2022
Merged

Fix && quotation in to nuon after proptest fail#7564
sholderbach merged 3 commits intonushell:mainfrom
sholderbach:to-nuon-fix

Conversation

@sholderbach
Copy link
Copy Markdown
Member

proptest caught a failing test condition for && as a literal string. It requires a quotation to be parsed correctly by current from nuon

https://github.com/nushell/nushell/actions/runs/3753242377/jobs/6376308675

The change in the parser that now returns an error was introduced by #7241

This in theory doesn't have to be an error (it is a diagnostic for nushell code) but it is probably better safe than sorry to require quotation here.

  • Add a test for && in to nuon from proptest fail
  • Fix to nuon generating invalid && literal
  • Add a test for , in to nuon/from nuon cycle
    • Bonus: should already be properly quoted

Tests + Formatting

Added previous proptest failure as part of a integration test

`proptest` caught a failing test condition for `&&` as a literal string.

https://github.com/nushell/nushell/actions/runs/3753242377/jobs/6376308675

The change in the parser that now returns an error was introduced by
nushell#7241

This in theory doesn't have to be an error but it is probably better
safe than sorry to require quotation here.
Requires a quotation to be parsed by current `from nuon`

Only required since nushell#7241

Include a comment stating that this is due to a zealous diagnostic
Should be properly quoted to be a valid string
@sholderbach sholderbach merged commit ec08e4b into nushell:main Dec 21, 2022
@sholderbach sholderbach deleted the to-nuon-fix branch December 21, 2022 23:36
sholderbach added a commit to sholderbach/nushell that referenced this pull request Mar 31, 2023
The two tests `to_nuon_from_nuon` and `to_nuon_from_nuon_string` were
taking multiple seconds and have since been superseded by more explicit
unit tests. Compared to the time cost for devs and CI they seldomly
returned explicit problems. One failure only popped up after months, as
a sampled failure (nushell#7564).

Fuzzing should move to a separate worker and be removed from the main
test suite.
See nushell#8575 for experimentation around the impact on our test coverage.
sholderbach added a commit that referenced this pull request Mar 31, 2023
# Description

The two tests `to_nuon_from_nuon` and `to_nuon_from_nuon_string` were
taking multiple seconds and have since been superseded by more explicit
unit tests. Compared to the time cost for devs and CI they seldomly
returned explicit problems. One failure only popped up after months, as
a sampled failure (#7564).


# User-Facing Changes

none

# Tests + Formatting

Fuzzing should move to a separate worker and be removed from the main
test suite.
See #8575 for experimentation around the impact on our test coverage.
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.

1 participant