- 23 Dec, 2017 3 commits
-
-
Kenton Varda authored
-
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.
-
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.
-
- 28 Apr, 2017 1 commit
-
-
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.
-
- 20 May, 2016 1 commit
-
-
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.
-
- 29 Jul, 2015 1 commit
-
-
Kenton Varda authored
Example: const data :Data = embed "some-file.dat"; Files are looked up the same way an import would be. You can use embed when Data or Text is expected. You can also use it when a struct type is expected -- the file will be interpreted as a message using standard binary serialization.
-
- 18 Nov, 2014 1 commit
-
-
Kenton Varda authored
-
- 20 Jun, 2014 1 commit
-
-
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
-
- 30 Nov, 2013 2 commits
-
-
Kenton Varda authored
-
Kenton Varda authored
-
- 02 Sep, 2013 1 commit
-
-
Kenton Varda authored
-
- 26 Aug, 2013 1 commit
-
-
Kenton Varda authored
-
- 23 Aug, 2013 1 commit
-
-
Kenton Varda authored
-
- 14 Aug, 2013 1 commit
-
-
Kenton Varda authored
-
- 10 Aug, 2013 1 commit
-
-
Kenton Varda authored
-
- 06 Aug, 2013 1 commit
-
-
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.
-
- 02 Aug, 2013 1 commit
-
-
Kenton Varda authored
Fix compiler bugs. Now test.capnp compiles to an identical schema to the old Haskell compiler, minus intentional changes.
-
- 01 Aug, 2013 1 commit
-
-
Kenton Varda authored
Add utility code for really nice command-line option parsing and start using it in the compiler (still WIP).
-
- 26 Jul, 2013 1 commit
-
-
Kenton Varda authored
-