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

Unicode null escapes are unescaped (v3.0.0. beta1, beta2) #464

Closed
SteveGilham opened this issue Aug 14, 2019 · 1 comment
Closed

Unicode null escapes are unescaped (v3.0.0. beta1, beta2) #464

SteveGilham opened this issue Aug 14, 2019 · 1 comment

Comments

@SteveGilham
Copy link

Description

The escape \u0000 is replaced by a literal NUL, making git detect the formatted file as binary.

Repro code

This happens with 3.0.0 beta1 and carries through to beta 2, but using the tool with the next-gen preview version causes that tool to fault instead.

The problem doesn't show with 2.9.2 or the 2.9.3-preview options

Input

    let makeFilter filterclass (x: String) =
      x.Replace('\u0000', '\\')
      |> CommandLine.ValidateRegexes
      |> Seq.iter (filterclass >> Visitor.NameFilters.Add)

to the 3.0.0 beta 2 tool replaces the character \u0000 with a NUL byte. A NUL byte is also added to the end of the file.

@jindraivanek
Copy link
Contributor

Tool fault was caused by unrelated issue on tool side (incompatible version of FSharp.Compiler.Service and FSharp.Core), it is fixed now.

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

3 participants