This repository has been archived by the owner on Oct 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
FreeBSD compatibility + int64/uint64 type support #4
Open
hxw
wants to merge
27
commits into
mitchellh:master
Choose a base branch
from
bitmark-inc:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
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
Add cgo items for FreeBSD clang compiler. Since FreeBSD already has a libucl pkg there is no need to extract libucl sources. And to avoid having gnumake installed add a BSDmakefile that just checks that lib ucl was installed by: sudo pkg install libucl Minor item: add cast to fix warning. Signed-off-by: Christopher Hall <[email protected]>
Add a couple of simple int64/uint64 tests. Signed-off-by: Christopher Hall <[email protected]>
Signed-off-by: Christopher Hall <[email protected]>
This allows for a more portable version of the wrapper, as it doesn't require libucl to sit in vendor/libucl, and instead sit elsewhere on the filesystem, which is a more realistic approach for an OS with a package manager.
Original Commit made on https://github.com/bitmark-inc/go-libucl
This is part of a move away from building libucl just for use in go, and using the OS's version instead.
Changed gitignore to github's default golang gitignore, to better fit the project. Changed travis config to pull in libucl and install it before running tests. Changed travis config to use most recent version of go.
In addition, remove build folder when done.
…tring flags The corresponding go ParserFlag for C's UCL_PARSER_NO_IMPLICIT_ARRAYS is ParserNoImplicitArrays The string flags are for a function in the C code for creating objects from strings. A wrapper function in go is coming soon. TODO: * Add go wrapper for ucl_object_fromstring_common and related functions * Add tests for new wrappers * Further checks for missing functionality
These functions wrap around libucl's ucl_object_from* functions. Additional tests were added to the test suite in object_test.go to test that these new functions operate correctly.
Validation functionality is provided via libucl's ucl_object_validate. A test has been written for a helper function, but no test has been written yet for the Validate method, as I have yet to get around to learning the json-schema format.
This adds 3 methods to the Parser object: `RegisterVariable`, `SetFileVariables` and `AddFileAndSetVariables` (which combines `AddFile` with `SetFileVariables`) Unknown Variable Handler support to come This gets us part way towards resolving issue mitchellh#5
Change to .travis-ucl.sh is to build support for signatures into the test machine's copy of libucl. Change to decoder_test.go is to show what is expected in random failing test (see issue mitchellh#6). Change to object.go is to remove memory leak, and make sure created C strings are freed.
…code_structKeys The sorter lists strings in decreasing alphabetical ordering (z->a) so Foo comes before Bar. This should fix the random ordering issue, fixing issue mitchellh#6.
In addition, added libucl's error messages to some methods.
Signed-off-by: Christopher Hall <[email protected]>
…raringi-master
* original code always called the first macro as call back parameters list was incorrect * add support for macro arguments e.g. .macro(param=value) "body-text" the parameters are passed as ucl object so complex macros are possible Signed-off-by: Christopher Hall <[email protected]>
Signed-off-by: Christopher Hall <[email protected]>
Signed-off-by: Christopher Hall <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Add gco options fro FreeBSD
Add int64/uint64 decoding + test for these types