1. 26 Oct, 2018 1 commit
  2. 28 Sep, 2018 1 commit
  3. 27 Sep, 2018 2 commits
    • Sam Smith's avatar
      Misc. Windows fixes (#104) · 30da78c4
      Sam Smith authored
      
      This commit contains some miscellaneous Windows fixes discoverd while
      integrating PGV with Envoy
      
      - Remove incorrect comment about including "validate/validate.proto"
      - Always make sure WIN32 is defined when compiling *.pb.validate.cc
      - Include <google/protobuf/message.h> and <google/protobuf/util/time_util.h>
        in the *.pb.validate.cc file instead of validate.h. This is because
        these headers include <windows.h> which defines many macros (e.g.
        DELETE). If this header is then included before any code that has
        symbols by the same name, it will fail to compile
      - Use std::unordered_map instead of std::map because we don't care about
        traversing the keys in order
      - Remove the complicated windows.ps1 set up script and just run the
        bazel command
      
      Signed-off-by: default avatarAmin Jamali <ajamali@pivotal.io>
      30da78c4
    • Chris Roche's avatar
      Upgrade to PG* v0.4.2 (#103) · 3bd820ad
      Chris Roche authored
      * PG* Update (sans BAZEL updates)
      
      * make protoc-gen-validate buildable
      
      * revert BUILD changes for tests/harness
      
      * checkpoint
      
      * checkpoint
      
      * BUILD changes
      
      * checkpoint
      
      * checkpoint
      
      * checkpoint
      
      * checkpoint
      
      * checkpoint
      
      * checkpoint
      
      * sort template functions
      3bd820ad
  4. 11 Sep, 2018 1 commit
  5. 30 Aug, 2018 1 commit
    • Alex Konradi's avatar
      Fix Bazel build by generating proto code automatically (#96) · fd1d9eb9
      Alex Konradi authored
      The test code depends on auto-generated Go code that, if missing, will cause compilation errors. This can be generated via make, but doing so
      
      1. is not hermetic
      2. requires proto path variables to be set
      
      This PR updates the Bazel rules and targets so that bazel run //tests/harness/executor works again and runs the full test suite. The changes are limited to BUILD files (there are no code changes) so it should only affect Bazel-based builds.
      fd1d9eb9
  6. 21 Aug, 2018 1 commit
    • Sam Smith's avatar
      Add Windows support to PGV (#94) · f15f5328
      Sam Smith authored
      
      * Add Windows support to PGV
      
      - bump rules_go and gazelle to 0.14.0
      - bump google/protobuf to 3.6.1
      - add powershell script that duplicates the Makefile
      - add workaround to test harness for how Bazel handles runfiles on
      Windows
      
      Signed-off-by: default avatarSam Smith <sesmith177@gmail.com>
      
      * Remove --features=pure
      
      As of rules_go 0.14.0, the go stdlib will not be built from
      source if we don't pass this flag
      
      * Bump google protobuf to pick up PR
      
      Signed-off-by: default avatarSam Smith <sesmith177@gmail.com>
      f15f5328
  7. 08 Aug, 2018 2 commits
  8. 06 Aug, 2018 2 commits
  9. 31 Jul, 2018 1 commit
    • Sam Smith's avatar
      Bump rules_go to 2383294 (#87) · e60e7f91
      Sam Smith authored
      
      This is to pick up fixes that allow rules_go to work on Windows. There
      are several required steps to make this work:
      
      1. Remove fork of go_proto_library.bzl and rework pgv_go_proto_library
      to use proto rules from rules_go
      2. Because of 1, bump dependencies in Gopkg.toml to match those in
      rules_go
        a. github.com/golang/protobuf -> v1.1.0
        b. github.com/lyft/protoc-gen-star -> v0.3.7
        c. github.com/gogo/protobuf -> v1.0.0
      3. Correct location in Makefile for generated validate.pb.go
      4. Update protos in tests/kitchensink to explicitly set go_package
      option. Without this option, the generated *.pb.validate.go files had
      empty package names (the regular *.pb.go files were fine)
      5. Rerun "gazelle fix" in the vendor directory to regenerate BUILD.bazel
      files.
      
      Signed-off-by: default avatarSam Smith <sesmith177@gmail.com>
      e60e7f91
  10. 13 Jul, 2018 1 commit
    • Back Yu's avatar
      solve to #79. (#80) · d260f5a7
      Back Yu authored
      
      * solve to #79.
      
      * fix CI failed for #80
      
      * fix reviewing for #80
      
      * add test cases for #80
      
      * fix debug code for #80
      
      * fix format bug for #80
      
      * templates: improve by #80
      
      * readme.md: fix comment to #80.
      
      * templates: fix for equal min/max for #80
      
      Signed-off-by: default avatarBack Yu <yhfszb@gmail.com>
      
      * tests: add cases to `equal min/max len` for #80
      
      Signed-off-by: default avatarBack Yu <yhfszb@gmail.com>
      
      * templates: improve for #80
      
      Signed-off-by: default avatarBack Yu <yhfszb@gmail.com>
      
      * fix readme for #79.
      d260f5a7
  11. 26 Jun, 2018 1 commit
  12. 21 Jun, 2018 1 commit
  13. 24 Apr, 2018 1 commit
  14. 03 Apr, 2018 1 commit
  15. 27 Mar, 2018 1 commit
  16. 14 Mar, 2018 1 commit
  17. 21 Feb, 2018 1 commit
    • Kent Wang's avatar
      Fix pattern rule in repeated and map field (#58) · 930a67cf
      Kent Wang authored
      * Fix pattern rule in repeated and map field
      
      Add pattern variable declaration when repeated.items, map.keys
      or map.values contains string rule with pattern.
      
      * Add test cases to executor
      930a67cf
  18. 15 Feb, 2018 1 commit
  19. 14 Feb, 2018 1 commit
    • Snow Pettersen's avatar
      Update rules_go to 0.9.0 (#59) · 3204975f
      Snow Pettersen authored
      This updates the version of rules_go to 0.9.0. The BUILD files changes were
      necessary to work around a linking error that happens under 0.9.0.
      
      The fix was based on bazelbuild/buildtools#201, but I don't really know much about the go build chain, so I don't really know what's happening, nor do I know if there's any specific motivation behind structuring the BUILD file the way it was. I'd be happy to file a bug against rules_go if this change seems like it should unnecessary, but I figured I'd put this up in case we're okay with the workaround.
      
      This update also adds these deprecation warnings:
      
      DEBUG: /private/var/tmp/_bazel_snowp/3bae0aee9d5211471587d3b4956c9db7/external/io_bazel_rules_go/go/private/rules/wrappers.bzl:79:5:
      DEPRECATED: //vendor/github.com/lyft/protoc-gen-star:go_default_test : the library attribute on go_test is deprecated. Please migrate to embed.
      3204975f
  20. 08 Feb, 2018 1 commit
  21. 16 Jan, 2018 1 commit
  22. 08 Jan, 2018 1 commit
  23. 05 Jan, 2018 1 commit
  24. 04 Jan, 2018 1 commit
  25. 03 Jan, 2018 1 commit
  26. 21 Dec, 2017 1 commit
  27. 08 Dec, 2017 1 commit
  28. 04 Dec, 2017 1 commit
  29. 02 Dec, 2017 2 commits
    • akonradi's avatar
      Declare C++ validation functions as static inline (#37) · b3cb659c
      akonradi authored
      and add a test (that really only checks compilation) to ensure that
      multiple compilation units that include the validation code can be
      linked together.
      b3cb659c
    • Chris Roche's avatar
      Validate message elements in repeated fields (#38) · 906f18a2
      Chris Roche authored
      This patch addresses an issue (in both Go and C++) where messages embedded in a repeated field would not be validated unless the repeated field itself had validation rules applied. Additionally, the skip rule on messages embedded in repeated fields caused compilation errors due to unused variables for the elements. The current solution here still leaves the loop (which hopefully gets optimized out by the compiler); a later fix should ensure the loop is not emitted.
      
      Finally, some cleanup to some of the bazel rules to properly run the test harness. Later on, may convert the harness to utilize the Go test framework for better portability (and limiting which test cases are executed).
      906f18a2
  30. 01 Dec, 2017 2 commits
  31. 30 Nov, 2017 4 commits
  32. 29 Nov, 2017 1 commit
    • akonradi's avatar
      Validate "required" fields in C++ (#25) · 7c5d256e
      akonradi authored
      * Make C++ error messages more like the Go ones
      
      * Bugfix: field named 'const' has accessor 'const_'
      
      A field named "const" is accessed as "m.const_()", so generate code
      appropriately.
      
      * Predeclare Validate() functions to support nesting
      
      * Use correct message name in C++ output
      
      * Add C++ validation library
      
      * Use fully-qualified C++ message class names
      
      * Implement nested validation in C++
      
      This is ugly, because we don't necessarily generate a validation
      function for every proto message type (ex: the well-known
      google::protobuf::Any type). Use some template metaprogramming to work
      around this, where each validation function is invoked if it exists, and
      a default fallback version is provided as well.
      7c5d256e