1. 23 Dec, 2017 3 commits
    • Kenton Varda's avatar
      deb65e9a
    • Kenton Varda's avatar
      Fix cmake: Use heuristics to detect when the same file is mapped in multiple locations. · 0f2f7c38
      Kenton Varda authored
      Unfortunately, our cmake build scripts have historically passed -I flags specifying both the root of the source tree and the specific subdirectory in which the .capnp file is located. This is not correct, but since people do it (including our own cmake build), we need to not fail when this happens. Instead we print a warning.
      0f2f7c38
    • Kenton Varda's avatar
      Change capnp tool to use filesystem API. · e2a9467b
      Kenton Varda authored
      In addition to cleaner code, this has the effect of fixing a number of issues:
      - Fixes #494: Windows paths are now parsed and handled a lot better. On Windows, backslashes are handled appropriately, as are absolute paths with drive letters.
      - Fixes #288: Specifing a source path starting with ".." without an appropriate --src-prefix will no longer cause output files to be generated outside of the specified output directory. Instead, the output name will be based on the absolute path, and a warning will be written since this is probably not what anyone wants.
      - It's no longer necessary for --src-prefix to exactly match character-for-character. Instead, the prefix and source paths are canonicalized before matching. It even works if one is relative and the other absolute.
      - Relative paths are now consistently always evaluated in path space, so ".." always cancels the previous path component and the OS/filesystem never even sees that it was there. This used to be the case in some places but not others. This behavior is important for symlink-heavy source trees: the path "foo/some-symlink/.." is now always designates "foo", rather than designating the parent directory of the symlink's target.
      
      This change does not update the code generator plugins nor the SchemaParser API. Those will come in separate commits.
      e2a9467b
  2. 28 Apr, 2017 1 commit
    • Harris Hancock's avatar
      Fix crashes due to null vtable pointers with MSVC · 2e7ece6b
      Harris Hancock authored
      MSVC as of VS2015 does not initialize the vtable pointers of constexpr
      objects, causing nullptr dereferences at runtime. To solve this, we can
      just convert them to regular const variables with internal (static)
      linkage.
      
      The internal linkage bit is important: as long as they are invisible
      outside their respective translation units, we do not risk the static
      initialization order fiasco.  If we ever need to reference them outside
      their translation units, we would need to hide them behind functions (like
      HeapArrayDisposer::instance()) to keep things safe.
      2e7ece6b
  3. 20 May, 2016 1 commit
    • Harris Hancock's avatar
      Depend on kj/miniposix.h instead of unistd.h in most places · 669469ca
      Harris Hancock authored
      This is necessary to get things working in MSVC. Note I swapped unistd.h
      for miniposix.h in the compiler, too, which will be necessary to port the
      compiler to MSVC.
      
      This commit also pulls capnp/compiler/capnp.c++'s pipe() implementation
      details (i.e., 8k reserved memory, _O_BINARY mode) into kj/miniposix.h.
      669469ca
  4. 29 Jul, 2015 1 commit
  5. 18 Nov, 2014 1 commit
  6. 20 Jun, 2014 1 commit
    • Kenton Varda's avatar
      Change license to MIT. · 889204fe
      Kenton Varda authored
      For portions currently copyright by Kenton (most of it), transfer copyright to Sandstorm Development Group, Inc. (Kenton's company).
      
      The license change is practically meaningless, as MIT and BSD 2-clause are legally equivalent. However, the BSD 2-clause license is sometimes confused for its ugly siblings, BSD 3-clause and BSD 4-clause. The MIT license is more immediately recognizeable for what it is.
      
      Rémy Blank and Jason Choy (the two non-trivial contributors) are on record as approving this change:
      
      https://groups.google.com/d/msg/capnproto/xXDd2HUOCcc/gbe_COIuXKYJ
      889204fe
  7. 30 Nov, 2013 2 commits
  8. 02 Sep, 2013 1 commit
  9. 26 Aug, 2013 1 commit
  10. 23 Aug, 2013 1 commit
  11. 14 Aug, 2013 1 commit
  12. 10 Aug, 2013 1 commit
  13. 06 Aug, 2013 1 commit
    • Kenton Varda's avatar
      Arrange for compiler to send to the code generator the complete contents of all… · 7b59b551
      Kenton Varda authored
      Arrange for compiler to send to the code generator the complete contents of all files listed on the command line, all first-level dependencies of those files, and parent scopes of those dependencies, but nothing more.  This means it's sometimes possible to compile a schema file without parsing all transitive dependencies.  Also, in 'decode' mode, don't compile annotations, so that the files defining those annotations need not be opened at all.
      7b59b551
  14. 02 Aug, 2013 1 commit
  15. 01 Aug, 2013 1 commit
  16. 26 Jul, 2013 1 commit