forked from FourierTransformer/lua-simdjson
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Update with latest lua-simdjson changes #1
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…release Updated to simdjson version 0.5.0
add CI configuration for GitHub Actions
LUA_LIBDIR is not available on most platforms, so this gives an empty variable which means -L swallows up the -lpthread flag.
It is required for luajit to build properly on mac
On windows, we need to explicitly link against lua.dll
Since lua was built with VS2022, the luarocks install script uses `MSVCR80` as the default runtime which causes problems when loading dlls.
[ci] Add macos configuration
…IBDIR [make] Remove broken -L flag
…s-support [make] Add windows support
added link to GitHub Actions
* switched to ondemand parser * removed LIBS_PATH and debug symbols * a bit smarter about `pushinteger` and `pushnumber` for Lua 5.3+
* [ci] Add mac arm64 tests * Use provided define for simdjson implementation * [ci] Avoid running luajit=2.0 on arm64 - Only 2.1+ has arm64 support
The latest version of luarocks has added ucrt support (windows-2022 has ucrt mingw installed). This means we can avoid the MSVCRT="m" hack.
This way we can see if a PR will break the tests
) * [make] Recompile library when source files change The build has been split up into separate object files, and each object file is recompiled if the relevant source/header file changes. Previously, it would never recompile the library, regardless of whether any files had changed, so running `make clean` was necessary every time.
…rmer#90) * Add tests for scalar value jsons * Fix parsing of scalar value documents With the ondemand parser, the document to value conversion fails with the error SCALAR_DOCUMENT_AS_VALUE if the document is a single null, string, bool, or number value. * Add explicit types in for loop variables Since we are now using a template type, this is no longer inferable by an IDE. Adding explicit types also reduces the number of `.value()` conversions required.
…rierTransformer#92) * Remove use of document_reference type It is not suitable for use here since the behaviour deviates from the regular document type when it comes to trailing content. * Add tests for scalar value with trailing content * Move invalid test case to invalid sub folder
* Add test cases for invalid n tokens Tokens that begin with `n` should not be treated as `null`. * Reject non-null tokens beginning with n In 0f609dd, a regression was introduced where the parser would read any token that started with n as null. The `.type()` method returns `json_type::null` simply if the token begins with `n`, and it does not check whether the token is actually valid. Adding an `is_null()` call here ensures this and returns an error if the token starts with `n` but is not `null`. Calling `.value()` on the returned value will raise it as an exception if `is_null()` returned an error. Currently with simdjson 3.10.1, there is a bug where calling `is_null` on a document object lacks this behaviour, so currently this patch only fixes the problem for non-scalar documents. * Comment out broken tests for now
…r#94) * Enable tests for invalid documents starting with n * Add test for invalid document with trailing text Oddly, `null trailing` gives an error, but `nully trailing` does not * Add workaround for scalar document is_null bug For now, we can just manually throw the exception until the next simdjson bugfix release: simdjson/simdjson#2258
Since the on demand parser is now used, we now have to iterate only once and set the field value and field existance at once.
The test directory has been removed in our fork
hx-lua-simdjson uses nil as null
Hmm, this is the kind of PR that I'd typically "Rebase and merge", but Github tells me "This branch cannot be rebased due to conflicts" if I try that. |
It may be best to merge it with a normal merge, that way github will say that it is in sync with the upstream repo. If it is rebased then github will say it is still behind. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This includes the following:
I've run the haxe test suite on linux with this updated version and everything seems to work well now.