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

Does not compile on Elixir 1.4.4/OTP 20 RC-2 #9

Open
awochna opened this issue Jun 18, 2017 · 0 comments
Open

Does not compile on Elixir 1.4.4/OTP 20 RC-2 #9

awochna opened this issue Jun 18, 2017 · 0 comments

Comments

@awochna
Copy link

awochna commented Jun 18, 2017

Version info (ouput of elixir --version)

Erlang/OTP 20 [RELEASE CANDIDATE 2] [erts-9.0] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10] [hipe] [kernel-poll:false]

Elixir 1.4.4

Error running mix test

== Compilation error on file lib/validator.ex ==
** (Regex.CompileError) invalid range in character class at position 320
    (elixir) lib/regex.ex:171: Regex.compile!/2
    (elixir) expanding macro: Kernel.sigil_r/2
    lib/validator.ex:6: Validator (module)
    (elixir) expanding macro: Kernel.@/1
    lib/validator.ex:6: Validator (module)

I'll update this ticket as I go along debugging it and submitting a PR.

awochna added a commit to awochna/validator that referenced this issue Jun 18, 2017
This might not be the right course of action, but removing them gets all
tests to pass. If this is wrong, it implies that the tests are not yet
comprehensive enough, but then again, regex tests almost can't be.

In the original regex set linked to from the documentation
(https://gist.github.com/dperini/729294), these characters are unicode
characters like `\u00a1`. I haven't been able to find the equivalent in
my searches for regex characters in elixir beginning with a `\X`. I'm
sure it also makes for poor search queries.

Closes fourkio#9
awochna added a commit to awochna/validator that referenced this issue Jun 21, 2017
Also add tests to prove this works.

Also, split the monster regex line into multiple lines with comments,
making it easier to understand, debug, and maintain.

Compiles on Elixir 1.4.4/OTP 20RC2

Fixes fourkio#9
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

1 participant