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

Probable serious regression with string handling #1066

Closed
trantor opened this issue Aug 2, 2022 · 10 comments
Closed

Probable serious regression with string handling #1066

trantor opened this issue Aug 2, 2022 · 10 comments
Assignees

Comments

@trantor
Copy link
Contributor

trantor commented Aug 2, 2022

Hello @johnkerl . Today some of my code using miller 5 was run using miller 6 and broke spectacularly XD .
I am gonna give a simple test case which does nothing useful:


$ mlr --version
mlr 6.3.0

# Works
$ cat test.sh
echo -e '1\n2\n3' | mlr --nidx put -q '
@m[$1] = "something";
'
$ ./test.sh                                                                                                                                                                                                

# Doesn't
$ cat test.sh
echo -e '1\n2\n3' | mlr --nidx put -q '
@m[$1] = "some
thing";
'
$ ./test.sh
mlr: cannot parse DSL expression.
Parse error on token ""some
" at line 2 column 10.
Expected one of:
  { ( field_name $[ braced_field_name $[[ $[[[ full_srec oosvar_name @[ braced_oosvar_name
  full_oosvar all non_sigil_name float int + - .+ .- ! ~ string_literal regex_case_insensitive
  int_literal float_literal boolean_literal null_literal inf_literal nan_literal
  const_M_PI const_M_E panic [ ctx_IPS ctx_IFS ctx_IRS ctx_OPS ctx_OFS ctx_ORS
  ctx_FLATSEP ctx_NF ctx_NR ctx_FNR ctx_FILENAME ctx_FILENUM env func

Apparently multi-line string literals are broken, which is a big problem. Am I missing something?

Bye

@johnkerl
Copy link
Owner

johnkerl commented Aug 2, 2022

Thanks @trantor !! I had never intentionally supported multi-line string literals (it seems they worked in Miller <= 5 by accident) and wasn't aware of this change.

I'll take a look -- thanks!

@trantor
Copy link
Contributor Author

trantor commented Aug 2, 2022

@johnkerl in my production case I used it to write a multi-line SQL query in a decently readable format, just as an example, so I would much appreciate if you were to introduce formal support for them ;D

@johnkerl
Copy link
Owner

johnkerl commented Aug 2, 2022

@trantor totally!!!! :)

@johnkerl
Copy link
Owner

johnkerl commented Aug 9, 2022

@trantor #1070

Thank you! :)

@johnkerl johnkerl closed this as completed Aug 9, 2022
@trantor
Copy link
Contributor Author

trantor commented Aug 9, 2022

Thanks a lot @johnkerl . I'll compile it and try it as soon as I get a free second ;D.

@trantor
Copy link
Contributor Author

trantor commented Aug 9, 2022

Btw @johnkerl would it make sense to have a minor release with this improvement?

@johnkerl
Copy link
Owner

johnkerl commented Aug 9, 2022

@trantor sure :)

@trantor
Copy link
Contributor Author

trantor commented Aug 19, 2022

@johnkerl I confirm that the fix works. Could you release a new minor release for this then? Thanks in advance.

@johnkerl
Copy link
Owner

@trantor yes soon :)

Super-busy with day job right now but soon -- hopefully by end of August

@johnkerl
Copy link
Owner

@trantor https://github.com/johnkerl/miller/releases/tag/v6.4.0

@johnkerl johnkerl removed the active label Aug 27, 2023
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

No branches or pull requests

2 participants