Addresses #196. Several of the tokenizer's processing steps wind up editing the
source, and we don't want those changes to be observed by the caller, which may
use the source for other purposes afterward.
Signed-off-by: M. J. Fromberger <michael.j.fromberger@gmail.com>
At present this test fails, since the tokenizer replaces text in shared slices
of the input. A subsequent commit will fix that.
Signed-off-by: M. J. Fromberger <michael.j.fromberger@gmail.com>
The writeStringLn function repeats what fmt.Fprintln already does. Since this
package already imports fmt, removing it reduces mass.
Signed-off-by: M. J. Fromberger <michael.j.fromberger@gmail.com>
* exclude build artifacts from git
* build: simplify building by using src-d/ci
* bench: simplify&fix shell runners
* build: simplify benchmarks* targets
* test: remove dependency on single test suite
* doc: rel image link + linguist cli difference highlight
* suggestions from code review
* bench: add fail fast to all shell runners
Signed-off-by: Alexander Bezzubov <bzz@apache.org>
Publishing jar relies on native lib artifacts beeing
published to GH release first, thus a separate stage
is needed to guarantee order.
Signed-off-by: Alexander Bezzubov <bzz@apache.org>
Biggest benefit of using separate stage for tests and release
is that we are not waiting for osx VM instance instance any
more on every PR, just to run
`if [[ -z "$TRAVIS_TAG" ]]; then echo "Skipping this build for non-tag builds."; exit 0; fi`
there.
It alos adds clarity to CI structure => is easier to maintain.
Signed-off-by: Alexander Bezzubov <bzz@apache.org>
gimme version on TravisCI is old, 1.2 and does not support .x resulting in
`I don't have any idea what to do with '1.10.x'
but it works on latest master https://github.com/travis-ci/gimme#asking-gimme-what-a-version-is
thus opting out in always running a latest gimme
Signed-off-by: Alexander Bezzubov <bzz@apache.org>
Go 1.10 improved the way of passing strings between C and Go
with https://go-review.googlesource.com/c/go/+/70890
This change adapts API/helpers to a new convention,
without changing existing API surface and without benefiting
from a new way of passing strings.
Another, perferable on my readind of `go doc cgo`, but
more invasive approach would be to change ALL enry C API to
always return *C.char \w C.CString()
Signed-off-by: Alexander Bezzubov <bzz@apache.org>
Otherwise JNAetor enry.jar binding generation on
CI using `make all` results in
```
/home/travis/build/bzz/enry/java/shared/libenry.h:8:0:
error: File not found: stddef.h in
. /usr/include /usr/local/include /usr/include/c++/4.8.4 /usr/include/c++/4.8.4/tr1
```
Signed-off-by: Alexander Bezzubov <bzz@apache.org>
Instead of use a command to change imports before build, using a build tag to generate the correct binary.
This will allow applications to compile enry using oniguruma with less troubles.
Signed-off-by: Antonio Jesus Navarro Perez <antnavper@gmail.com>