{"action":"created","issue":{"url":"https://api.github.com/repos/epics-base/normativeTypesCPP/issues/16","repository_url":"https://api.github.com/repos/epics-base/normativeTypesCPP","labels_url":"https://api.github.com/repos/epics-base/normativeTypesCPP/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/epics-base/normativeTypesCPP/issues/16/comments","events_url":"https://api.github.com/repos/epics-base/normativeTypesCPP/issues/16/events","html_url":"https://github.com/epics-base/normativeTypesCPP/pull/16","id":445547092,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjc5OTc1OTkw","number":16,"title":"Generalize structure compatibility checks","user":{"login":"brunoseivam","id":1002241,"node_id":"MDQ6VXNlcjEwMDIyNDE=","avatar_url":"https://avatars1.githubusercontent.com/u/1002241?v=4","gravatar_id":"","url":"https://api.github.com/users/brunoseivam","html_url":"https://github.com/brunoseivam","followers_url":"https://api.github.com/users/brunoseivam/followers","following_url":"https://api.github.com/users/brunoseivam/following{/other_user}","gists_url":"https://api.github.com/users/brunoseivam/gists{/gist_id}","starred_url":"https://api.github.com/users/brunoseivam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brunoseivam/subscriptions","organizations_url":"https://api.github.com/users/brunoseivam/orgs","repos_url":"https://api.github.com/users/brunoseivam/repos","events_url":"https://api.github.com/users/brunoseivam/events{/privacy}","received_events_url":"https://api.github.com/users/brunoseivam/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":18,"created_at":"2019-05-17T17:38:22Z","updated_at":"2019-06-13T22:20:09Z","closed_at":"2019-06-13T18:08:27Z","author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/epics-base/normativeTypesCPP/pulls/16","html_url":"https://github.com/epics-base/normativeTypesCPP/pull/16","diff_url":"https://github.com/epics-base/normativeTypesCPP/pull/16.diff","patch_url":"https://github.com/epics-base/normativeTypesCPP/pull/16.patch"},"body":"Currently the `isCompatible` methods are implemented in an ad-hoc manner. This PR generalizes these checks via a new, non-exported (for now) `Validator` object. The proposed `Validator` API is to be used as follows:\r\n\r\n1. A `Validator` object can be constructed with a reference `Field` and a `set` of optional fields.\r\n2. The `Validator::isCompatible` method returns `true` if the `Field` being tested is compatible with the reference field.\r\n3. The `Validator::validate` method returns a more complex `Validator::Result` object which contains a list of all the errors found in the validation process. Each `Validator::Error` is essentially a pair containing a `string` with the path to the failing field and a reason for it to be failing validation.\r\n\r\nEach normative type should create its own `Validator` once and use it in their `isCompatible` methods."},"comment":{"url":"https://api.github.com/repos/epics-base/normativeTypesCPP/issues/comments/501899616","html_url":"https://github.com/epics-base/normativeTypesCPP/pull/16#issuecomment-501899616","issue_url":"https://api.github.com/repos/epics-base/normativeTypesCPP/issues/16","id":501899616,"node_id":"MDEyOklzc3VlQ29tbWVudDUwMTg5OTYxNg==","user":{"login":"anjohnson","id":5453863,"node_id":"MDQ6VXNlcjU0NTM4NjM=","avatar_url":"https://avatars1.githubusercontent.com/u/5453863?v=4","gravatar_id":"","url":"https://api.github.com/users/anjohnson","html_url":"https://github.com/anjohnson","followers_url":"https://api.github.com/users/anjohnson/followers","following_url":"https://api.github.com/users/anjohnson/following{/other_user}","gists_url":"https://api.github.com/users/anjohnson/gists{/gist_id}","starred_url":"https://api.github.com/users/anjohnson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anjohnson/subscriptions","organizations_url":"https://api.github.com/users/anjohnson/orgs","repos_url":"https://api.github.com/users/anjohnson/repos","events_url":"https://api.github.com/users/anjohnson/events{/privacy}","received_events_url":"https://api.github.com/users/anjohnson/received_events","type":"User","site_admin":false},"created_at":"2019-06-13T22:20:09Z","updated_at":"2019-06-13T22:20:09Z","author_association":"MEMBER","body":"The trailing `_WIN32` is the name of the target's OS_CLASS, so that flag applies to all builds using the Microsoft APIs. The failures this time looks like they're due to the missing `#include <algorithm>` that you pointed out earlier. It would be nice to clean up the 'struct' vs. 'class' warnings at the same time (unless that's just a knock-on result of the missing std::max definition).\r\n\r\n```\r\ncl -EHsc -GR           -DNOMINMAX     -nologo -FC -D__STDC__=0 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE   -Ox -GL -Oy-   -W3 -w44355 -w44344 -w44251     -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING    -MD -DEPICS_BUILD_DLL -DEPICS_CALL_DLL -TP  -I. -I../O.Common -I. -I. -I.. -I../../include/compiler/msvc -I../../include/os/WIN32 -I../../include   -IC:/Jenkins/win64-2/workspace/epics-pvData-win64/include -IC:/Jenkins/win64-2/workspace/epics-base-7.0-win64/include/compiler/msvc -IC:/Jenkins/win64-2/workspace/epics-base-7.0-win64/include/os/WIN32 -IC:/Jenkins/win64-2/workspace/epics-base-7.0-win64/include        -c ../ntfield.cpp\r\nntfield.cpp\r\nc:\\jenkins\\win64-2\\workspace\\epics-normativetypes-win64\\src\\validator.h(66): error C2039: 'max': is not a member of 'std'\r\nc:\\jenkins\\win64-2\\workspace\\epics-pvdata-win64\\include\\pv\\pvintrospect.h(1494): note: see declaration of 'std'\r\nc:\\jenkins\\win64-2\\workspace\\epics-normativetypes-win64\\src\\validator.h(66): error C3861: 'max': identifier not found\r\nc:\\jenkins\\win64-2\\workspace\\epics-pvdata-win64\\include\\pv\\pvdata.h(539): warning C4250: 'epics::pvData::PVString': inherits 'epics::pvData::PVScalarValue<std::string>::epics::pvData::PVScalarValue<std::string>::deserialize' via dominance\r\nc:\\jenkins\\win64-2\\workspace\\epics-pvdata-win64\\include\\pv\\pvdata.h(440): note: see declaration of 'epics::pvData::PVScalarValue<std::string>::deserialize'\r\nc:\\jenkins\\win64-2\\workspace\\epics-normativetypes-win64\\src\\pv\\ntfield.h(33): warning C4099: 'epics::nt::Result': type name first seen using 'struct' now seen using 'class'\r\nc:\\jenkins\\win64-2\\workspace\\epics-normativetypes-win64\\src\\validator.h(22): note: see declaration of 'epics::nt::Result'\r\n```\r\n"}}
{"actor":{"display_login":"anjohnson"}}