When "\u"-escaping a Unicode character, the esc_extra value doesn't
need to include the number of bytes in the input string. That is, if
a three-byte UTF-8 character is being escaped to a six-byte "\uXXXX"
sequence, esc_extra only needs to be increased by 3.
Apparently hex only includes some files by default but not others
rather than a sane default of anything except for VCS directories. So
now I also get to maintain a list of files in my .app.src.
Apparently rebar3 can't generate a sane version number from Git tags and
adds a bunch of BS build number and ref tags which hex.pm then rejects.
Given that I can't find any documentation on how that works and reading
code is an exercise in over engineered abstractionism I've succumbed to
the demoralizing conclusion that I'll just have to go back to the dark
ages and maintain my versions both in source and in version control.
A call to `jiffy:encode(Term, [use_nil]).` will currently cause dialyzer
to issue a warning because `use_nil` is not included in `encode_option`.
This appears to just be an omission.
PropEr broke my support for R14. Turns out that EQC Mini is quite usable
so I've just switched to that. If EQC Mini exists it will be used, if
not the test is skipped gracefully.
Previously if a key was malformed UTF-8 and the user specified the
`force_utf8` option we would fail to try and encode a fixed up version
of the object. This was due to missing a clause to catch the
`invalid_object_member_key` exception. This adds the clause and a couple
tests to ensure it works.
The environment variable approach breaks other projects' Travis-CI runs
if they include other projects that depend on a different version of
PropEr.
Fixes: #106
In the original PR for `return_trailer` @vlm pointed out that I wasn't
using enif_consume_timeslice correctly. This fixes that by changing out
its called.
Previously we attempted to define the total number of bytes to decode or
encode in a single NIF call and then would consume as much of the
timeslice as we processed. This is wrong because we may start the NIF
call with less than an entire timeslice left.
The new approach is to define the number of bytes to encode or decode
per reduction and then iteratively call enif_consume_timeslice until it
indicates that we should return.
Previously Jiffy would throw an error about trailing data if there is
any non-whitespace character encounter after the first term had been
decoded.
This patch adds a decoder option `return_trailer` that will instead
return a sub-binary starting at the first non-whitespace character. This
allows users to be able to decode multiple terms from a single iodata()
term.
Thanks to @vlm for the original patch.