1. 11 Jan, 2018 1 commit
    • Kenton Varda's avatar
      Replace all include guards with #pragma once. · 677a52ab
      Kenton Varda authored
      @kloepper pointed out a while back that every compiler you've ever heard of supports this. Plus, it's more concise, it's not prone to copy-paste errors, and it looks nicer.
      
      At the time I wanted to remain consistent and I didn't feel like spending the time to update all my existing code. But, every time I've added a new header since I've cursed the include guard, so I finally broke down and changed it.
      677a52ab
  2. 25 Apr, 2017 1 commit
  3. 07 Apr, 2017 1 commit
  4. 18 Nov, 2016 1 commit
  5. 02 Apr, 2016 1 commit
  6. 23 Jul, 2015 1 commit
    • Kenton Varda's avatar
      Fix bug causing exception: "'Disembargo' of type 'senderLoopback' sent to an… · d4cd01e9
      Kenton Varda authored
      Fix bug causing exception: "'Disembargo' of type 'senderLoopback' sent to an object that does not point back to the sender."
      
      The problem happened when pipelined calls were made on a promised capability, but then that capability turned out to be null. The promise resolving code incorrectly interpreted this as the remote promise having resolved to a local capability (because the "null" stub capability looks local), and so it would send a Disembargo message to flush the pipeline as required. However, the remote end would receive this Disembargo message and find it is addressed to a null capability, not a capability pointing back to the sender. This was treated as a protocol error, causing the receiver to close the connection.
      
      The solution is to explicitly identity "null" capabilities so that we can distinguish this case. This change also has the benefit that now when you copy a null capability between messages with foo.setCap(bar.getCap()), the pointer will be set null in the destination, rather than becoming a reference to a local broken capability.
      
      Thanks to David Renshaw for narrowing this down.
      d4cd01e9
  7. 22 Mar, 2015 1 commit
  8. 30 Dec, 2014 1 commit
  9. 29 Nov, 2014 1 commit
  10. 24 Nov, 2014 2 commits
  11. 22 Nov, 2014 1 commit
  12. 26 Oct, 2014 1 commit
    • Kenton Varda's avatar
      Implement "lite mode", where reflection is disabled. · c772a700
      Kenton Varda authored
      To use, pass --disable-reflection to the configure script.
      
      This produces a smaller runtime library. However, using it for this purpose is not recommended. The main purpose of lite mode is to define a subset of Cap'n Proto which might plausibly compile under MSVC. MSVC still lacks full support for constexpr and expression SFINAE; luckily, most of our use of these things relates to reflection, and not all users need reflection.
      
      Cap'n Proto lite mode inherits its name from Protocol Buffers' lite mode. However, there are some key differences:
      
      - Protobuf generated code included global constructors related to registering descriptors and extensions. For many people, this was the main reason to use lite mode: to get rid of these global constructors and achieve faster startup times. Cap'n Proto, on the other hand, never had global constructors in the first place.
      
      - Schemas are actually still available in lite mode, though only in their raw (Cap'n Proto structure) form. Only the schema API (which wraps the raw schemas in a more convenient interface) and reflection API (which offers a convenient way to use the schemas) are unavailable.
      
      - Lite mode is enabled in an application by defining CAPNP_LITE rather than by specifying an annotation in the schema file. This better-reflects real-world usage patterns, where you typically want to enable lite mode application-wide anyway.
      
      - We do not build the lite mode library by default. You must request it by passing --disable-reflection to the configure script. Before you can do that, you must have a prebuilt Cap'n Proto compiler binary available, since the compiler can't be built without reflection.
      
      - Relatedly, the lite mode library is built with the same name as the full library. This library is not intended to be installed. If anything it should be statically linked. But, mostly the option only exists on non-MSVC platform to give us a way to test that we haven't broken lite mode.
      c772a700
  13. 11 Sep, 2014 1 commit
    • Kenton Varda's avatar
      Fix obscure bug where the last outgoing message (and any capabilities therein)… · 26914900
      Kenton Varda authored
      Fix obscure bug where the last outgoing message (and any capabilities therein) would not get released (until a new message was sent, replacing it as the last).
      
      This took hours to track down, because it initially looked like "Release" messages weren't being honored in some cases (when they happened to be releasing a capability from the last message, and no subsequent messages were sent). Initial attempts to capture this in a unit test failed because the test of course used a subsequent call to detect if the capability had been released, which succeeded.
      26914900
  14. 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
  15. 07 Dec, 2013 1 commit
  16. 06 Dec, 2013 1 commit
  17. 05 Dec, 2013 1 commit
  18. 26 Nov, 2013 2 commits
  19. 25 Nov, 2013 2 commits
  20. 23 Nov, 2013 1 commit
  21. 08 Nov, 2013 1 commit
  22. 08 Jul, 2013 1 commit
  23. 24 Jun, 2013 1 commit
  24. 06 Jun, 2013 5 commits
  25. 05 Jun, 2013 1 commit
  26. 22 May, 2013 1 commit
  27. 04 May, 2013 1 commit
  28. 27 Apr, 2013 1 commit
  29. 25 Apr, 2013 1 commit
  30. 20 Apr, 2013 1 commit
  31. 19 Apr, 2013 1 commit
  32. 29 Mar, 2013 1 commit
  33. 28 Mar, 2013 1 commit