Skip to content
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

Upgrade YamlCpp to new 0.5 API #8

Merged
merged 22 commits into from
Jul 31, 2018
Merged

Conversation

breznak
Copy link
Member

@breznak breznak commented Jan 19, 2018

YAML is a dependency, update to latest version, fix breaking changes as they moved to new API.

Fixes numenta#1319 #33
Moved from numenta#1320

Todo:

  • do the porting in Network.cpp, see the issue for details and help.
  • port YAMLUtils
  • resolve issue in CI (not reproducible locally) with linking Boost
    • by upgrading to YamlCpp 0.6 (c++11, no boost dependency)

@breznak
Copy link
Member Author

breznak commented Jan 19, 2018

https://ci.appveyor.com/project/numenta-ci/nupic-core/build/0.3.0.2255/job/tpqniaraoo0ctifo#L1172
a problem of the CMakeFile not setting up boost includes properly, or is it missing on the CI machines? (but it shouldn't matter, as we ship the boost headers ourselves).
I don't observe this on my system.
Likely with the update to YAML 0.5.7, we will be interested in the new release jbeder/yaml-cpp#415 that will not depend on boost. So workaround introduced now can then be removed.

@breznak breznak modified the milestone: Community fixes Jan 23, 2018
@breznak
Copy link
Member Author

breznak commented Jan 24, 2018

@chhenning @mattheller if you are running Windows, do you think you could try having a look in to the problem?

@breznak breznak added the help wanted Extra attention is needed label Jan 24, 2018
@chhenning
Copy link

Good news is that your code changes are working on my Windows machine. Great work! I have internally upgraded to yaml-cpp 0.5.3.

Bad news is that I cannot really help with cmake. Sorry.

@breznak breznak closed this Jan 25, 2018
@breznak breznak reopened this Jan 25, 2018
replaces old API GetNextDocument()
as upgrading to YAML 0.5 from 0.3
as upgrading to 0.5 API
replaces node >> invValue;
upgrade to 0.5 API
use val = node.as<T>();
instead of node >> val;

upgrading to API 0.5 yaml
replaced with .as<T>()
LoadFile is for filepath,
Load() is for yaml strings: '[1 2 3 4 5]'
proken during this PR, now fixed
apparently, yaml-cpp had a bug and did not handle 1 letter strings "1"
Now it seems to work ok.
Add test
@breznak breznak force-pushed the upgrade_yaml branch 2 times, most recently from fb4874d to 7da9a4b Compare January 25, 2018 03:05
breznak added 4 commits July 31, 2018 11:42
new API, many fixes since old release.
Removed dependency on Boost (causes problems in our CI machines)
This reverts commit 7f05a3f.

As this causes errors in our CI, no longer required due to bump to
YamlCpp 0.6+
as we were getting error with gtest, disabling tests for YamlCpp
workarounds the problem.
@breznak breznak added this to the Community fixes milestone Jul 31, 2018
@breznak breznak changed the title Upgrade yaml to new 0.5 API Upgrade YamlCpp to new 0.5 API Jul 31, 2018
@breznak breznak added dependencies backport_upstream What could be useful for upstream backporting labels Jul 31, 2018
@breznak breznak requested a review from rcrowder July 31, 2018 10:39
@breznak breznak self-assigned this Jul 31, 2018
@breznak breznak mentioned this pull request Jul 31, 2018
@breznak breznak added the enhancement New feature or request label Jul 31, 2018
@breznak
Copy link
Member Author

breznak commented Jul 31, 2018

@rhyolight should I tag you for changes like this that could be backported upstream to numenta, or you'll be watching out yourself?

@breznak breznak merged commit 1d5f41a into htm-community:master Jul 31, 2018
@breznak breznak deleted the upgrade_yaml branch July 31, 2018 10:48
@breznak breznak mentioned this pull request Jul 31, 2018
@breznak breznak mentioned this pull request Feb 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport_upstream What could be useful for upstream backporting dependencies enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade to new YAML-cpp API (old v0.3.0 holds back yaml, yaml-cpp)
2 participants