Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

FreeBSD compatibility + int64/uint64 type support #4

Open
wants to merge 27 commits into
base: master
Choose a base branch
from

Conversation

hxw
Copy link

@hxw hxw commented Dec 3, 2015

Add gco options fro FreeBSD
Add int64/uint64 decoding + test for these types

hxw and others added 27 commits December 3, 2015 13:18
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.
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]>
* 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]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants