1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-24 22:11:15 +02:00

Separate headers from source files

The short answer for why we need to do this is so we can consistently do
`#include "nix/..."`. Without this change, there are ways to still make
that work, but they are hacky, and they have downsides such as making it
harder to make sure headers from the wrong Nix library (e..g.
`libnixexpr` headers in `libnixutil`) aren't being used.

The C API alraedy used `nix_api_*`, so its headers are *not* put in
subdirectories accordingly.

Progress on #7876

We resisted doing this for a while because it would be annoying to not
have the header source file pairs close by / easy to change file
path/name from one to the other. But I am ameliorating that with
symlinks in the next commit.
This commit is contained in:
John Ericson 2025-02-20 14:15:07 -05:00
parent 326548bae5
commit f3e1c47f47
664 changed files with 2974 additions and 2913 deletions

View file

@ -31,7 +31,7 @@ The unit tests are defined using the [googletest] and [rapidcheck] frameworks.
> ├── libexpr
> │ ├── meson.build
> │ ├── value/context.hh
> │ ├── value/context.cc
> │ ├── include/nix/value/context.cc
> │ …
> │
> ├── tests
@ -46,8 +46,12 @@ The unit tests are defined using the [googletest] and [rapidcheck] frameworks.
> │ │
> │ ├── libexpr-test-support
> │ │ ├── meson.build
> │ │ ├── include/nix
> │ │ │ ├── meson.build
> │ │ │ └── tests
> │ │ │ ├── value/context.hh
> │ │ │ …
> │ │ └── tests
> │ │ ├── value/context.hh
> │ │ ├── value/context.cc
> │ │ …
> │ │
@ -59,7 +63,7 @@ The unit tests are defined using the [googletest] and [rapidcheck] frameworks.
> ```
The tests for each Nix library (`libnixexpr`, `libnixstore`, etc..) live inside a directory `src/${library_name_without-nix}-test`.
Given an interface (header) and implementation pair in the original library, say, `src/libexpr/value/context.{hh,cc}`, we write tests for it in `src/libexpr-tests/value/context.cc`, and (possibly) declare/define additional interfaces for testing purposes in `src/libexpr-test-support/tests/value/context.{hh,cc}`.
Given an interface (header) and implementation pair in the original library, say, `src/libexpr/include/nix/value/context.hh` and `src/libexpr/value/context.cc`, we write tests for it in `src/libexpr-tests/value/context.cc`, and (possibly) declare/define additional interfaces for testing purposes in `src/libexpr-test-support/include/nix/tests/value/context.hh` and `src/libexpr-test-support/tests/value/context.cc`.
Data for unit tests is stored in a `data` subdir of the directory for each unit test executable.
For example, `libnixstore` code is in `src/libstore`, and its test data is in `src/libstore-tests/data`.
@ -67,7 +71,7 @@ The path to the `src/${library_name_without-nix}-test/data` directory is passed
Note that each executable only gets the data for its tests.
The unit test libraries are in `src/${library_name_without-nix}-test-support`.
All headers are in a `tests` subdirectory so they are included with `#include "tests/"`.
All headers are in a `tests` subdirectory so they are included with `#include "nix/tests/"`.
The use of all these separate directories for the unit tests might seem inconvenient, as for example the tests are not "right next to" the part of the code they are testing.
But organizing the tests this way has one big benefit:

View file

@ -84,340 +84,340 @@
''^precompiled-headers\.h$''
''^src/build-remote/build-remote\.cc$''
''^src/libcmd/built-path\.cc$''
''^src/libcmd/built-path\.hh$''
''^src/libcmd/include/nix/built-path\.hh$''
''^src/libcmd/common-eval-args\.cc$''
''^src/libcmd/common-eval-args\.hh$''
''^src/libcmd/include/nix/common-eval-args\.hh$''
''^src/libcmd/editor-for\.cc$''
''^src/libcmd/installable-attr-path\.cc$''
''^src/libcmd/installable-attr-path\.hh$''
''^src/libcmd/include/nix/installable-attr-path\.hh$''
''^src/libcmd/installable-derived-path\.cc$''
''^src/libcmd/installable-derived-path\.hh$''
''^src/libcmd/include/nix/installable-derived-path\.hh$''
''^src/libcmd/installable-flake\.cc$''
''^src/libcmd/installable-flake\.hh$''
''^src/libcmd/include/nix/installable-flake\.hh$''
''^src/libcmd/installable-value\.cc$''
''^src/libcmd/installable-value\.hh$''
''^src/libcmd/include/nix/installable-value\.hh$''
''^src/libcmd/installables\.cc$''
''^src/libcmd/installables\.hh$''
''^src/libcmd/legacy\.hh$''
''^src/libcmd/include/nix/installables\.hh$''
''^src/libcmd/include/nix/legacy\.hh$''
''^src/libcmd/markdown\.cc$''
''^src/libcmd/misc-store-flags\.cc$''
''^src/libcmd/repl-interacter\.cc$''
''^src/libcmd/repl-interacter\.hh$''
''^src/libcmd/include/nix/repl-interacter\.hh$''
''^src/libcmd/repl\.cc$''
''^src/libcmd/repl\.hh$''
''^src/libcmd/include/nix/repl\.hh$''
''^src/libexpr-c/nix_api_expr\.cc$''
''^src/libexpr-c/nix_api_external\.cc$''
''^src/libexpr/attr-path\.cc$''
''^src/libexpr/attr-path\.hh$''
''^src/libexpr/include/nix/attr-path\.hh$''
''^src/libexpr/attr-set\.cc$''
''^src/libexpr/attr-set\.hh$''
''^src/libexpr/include/nix/attr-set\.hh$''
''^src/libexpr/eval-cache\.cc$''
''^src/libexpr/eval-cache\.hh$''
''^src/libexpr/include/nix/eval-cache\.hh$''
''^src/libexpr/eval-error\.cc$''
''^src/libexpr/eval-inline\.hh$''
''^src/libexpr/include/nix/eval-inline\.hh$''
''^src/libexpr/eval-settings\.cc$''
''^src/libexpr/eval-settings\.hh$''
''^src/libexpr/include/nix/eval-settings\.hh$''
''^src/libexpr/eval\.cc$''
''^src/libexpr/eval\.hh$''
''^src/libexpr/include/nix/eval\.hh$''
''^src/libexpr/function-trace\.cc$''
''^src/libexpr/gc-small-vector\.hh$''
''^src/libexpr/include/nix/gc-small-vector\.hh$''
''^src/libexpr/get-drvs\.cc$''
''^src/libexpr/get-drvs\.hh$''
''^src/libexpr/include/nix/get-drvs\.hh$''
''^src/libexpr/json-to-value\.cc$''
''^src/libexpr/nixexpr\.cc$''
''^src/libexpr/nixexpr\.hh$''
''^src/libexpr/parser-state\.hh$''
''^src/libexpr/include/nix/nixexpr\.hh$''
''^src/libexpr/include/nix/parser-state\.hh$''
''^src/libexpr/primops\.cc$''
''^src/libexpr/primops\.hh$''
''^src/libexpr/include/nix/primops\.hh$''
''^src/libexpr/primops/context\.cc$''
''^src/libexpr/primops/fetchClosure\.cc$''
''^src/libexpr/primops/fetchMercurial\.cc$''
''^src/libexpr/primops/fetchTree\.cc$''
''^src/libexpr/primops/fromTOML\.cc$''
''^src/libexpr/print-ambiguous\.cc$''
''^src/libexpr/print-ambiguous\.hh$''
''^src/libexpr/print-options\.hh$''
''^src/libexpr/include/nix/print-ambiguous\.hh$''
''^src/libexpr/include/nix/print-options\.hh$''
''^src/libexpr/print\.cc$''
''^src/libexpr/print\.hh$''
''^src/libexpr/include/nix/print\.hh$''
''^src/libexpr/search-path\.cc$''
''^src/libexpr/symbol-table\.hh$''
''^src/libexpr/include/nix/symbol-table\.hh$''
''^src/libexpr/value-to-json\.cc$''
''^src/libexpr/value-to-json\.hh$''
''^src/libexpr/include/nix/value-to-json\.hh$''
''^src/libexpr/value-to-xml\.cc$''
''^src/libexpr/value-to-xml\.hh$''
''^src/libexpr/value\.hh$''
''^src/libexpr/include/nix/value-to-xml\.hh$''
''^src/libexpr/include/nix/value\.hh$''
''^src/libexpr/value/context\.cc$''
''^src/libexpr/value/context\.hh$''
''^src/libexpr/include/nix/value/context\.hh$''
''^src/libfetchers/attrs\.cc$''
''^src/libfetchers/cache\.cc$''
''^src/libfetchers/cache\.hh$''
''^src/libfetchers/include/nix/cache\.hh$''
''^src/libfetchers/fetch-settings\.cc$''
''^src/libfetchers/fetch-settings\.hh$''
''^src/libfetchers/include/nix/fetch-settings\.hh$''
''^src/libfetchers/fetch-to-store\.cc$''
''^src/libfetchers/fetchers\.cc$''
''^src/libfetchers/fetchers\.hh$''
''^src/libfetchers/include/nix/fetchers\.hh$''
''^src/libfetchers/filtering-source-accessor\.cc$''
''^src/libfetchers/filtering-source-accessor\.hh$''
''^src/libfetchers/include/nix/filtering-source-accessor\.hh$''
''^src/libfetchers/fs-source-accessor\.cc$''
''^src/libfetchers/fs-source-accessor\.hh$''
''^src/libfetchers/include/nix/fs-source-accessor\.hh$''
''^src/libfetchers/git-utils\.cc$''
''^src/libfetchers/git-utils\.hh$''
''^src/libfetchers/include/nix/git-utils\.hh$''
''^src/libfetchers/github\.cc$''
''^src/libfetchers/indirect\.cc$''
''^src/libfetchers/memory-source-accessor\.cc$''
''^src/libfetchers/path\.cc$''
''^src/libfetchers/registry\.cc$''
''^src/libfetchers/registry\.hh$''
''^src/libfetchers/include/nix/registry\.hh$''
''^src/libfetchers/tarball\.cc$''
''^src/libfetchers/tarball\.hh$''
''^src/libfetchers/include/nix/tarball\.hh$''
''^src/libfetchers/git\.cc$''
''^src/libfetchers/mercurial\.cc$''
''^src/libflake/flake/config\.cc$''
''^src/libflake/flake/flake\.cc$''
''^src/libflake/flake/flake\.hh$''
''^src/libflake/include/nix/flake/flake\.hh$''
''^src/libflake/flake/flakeref\.cc$''
''^src/libflake/flake/flakeref\.hh$''
''^src/libflake/include/nix/flake/flakeref\.hh$''
''^src/libflake/flake/lockfile\.cc$''
''^src/libflake/flake/lockfile\.hh$''
''^src/libflake/include/nix/flake/lockfile\.hh$''
''^src/libflake/flake/url-name\.cc$''
''^src/libmain/common-args\.cc$''
''^src/libmain/common-args\.hh$''
''^src/libmain/include/nix/common-args\.hh$''
''^src/libmain/loggers\.cc$''
''^src/libmain/loggers\.hh$''
''^src/libmain/include/nix/loggers\.hh$''
''^src/libmain/progress-bar\.cc$''
''^src/libmain/shared\.cc$''
''^src/libmain/shared\.hh$''
''^src/libmain/include/nix/shared\.hh$''
''^src/libmain/unix/stack\.cc$''
''^src/libstore/binary-cache-store\.cc$''
''^src/libstore/binary-cache-store\.hh$''
''^src/libstore/build-result\.hh$''
''^src/libstore/builtins\.hh$''
''^src/libstore/include/nix/binary-cache-store\.hh$''
''^src/libstore/include/nix/build-result\.hh$''
''^src/libstore/include/nix/builtins\.hh$''
''^src/libstore/builtins/buildenv\.cc$''
''^src/libstore/builtins/buildenv\.hh$''
''^src/libstore/common-protocol-impl\.hh$''
''^src/libstore/include/nix/builtins/buildenv\.hh$''
''^src/libstore/include/nix/common-protocol-impl\.hh$''
''^src/libstore/common-protocol\.cc$''
''^src/libstore/common-protocol\.hh$''
''^src/libstore/common-ssh-store-config\.hh$''
''^src/libstore/include/nix/common-protocol\.hh$''
''^src/libstore/include/nix/common-ssh-store-config\.hh$''
''^src/libstore/content-address\.cc$''
''^src/libstore/content-address\.hh$''
''^src/libstore/include/nix/content-address\.hh$''
''^src/libstore/daemon\.cc$''
''^src/libstore/daemon\.hh$''
''^src/libstore/include/nix/daemon\.hh$''
''^src/libstore/derivations\.cc$''
''^src/libstore/derivations\.hh$''
''^src/libstore/include/nix/derivations\.hh$''
''^src/libstore/derived-path-map\.cc$''
''^src/libstore/derived-path-map\.hh$''
''^src/libstore/include/nix/derived-path-map\.hh$''
''^src/libstore/derived-path\.cc$''
''^src/libstore/derived-path\.hh$''
''^src/libstore/include/nix/derived-path\.hh$''
''^src/libstore/downstream-placeholder\.cc$''
''^src/libstore/downstream-placeholder\.hh$''
''^src/libstore/include/nix/downstream-placeholder\.hh$''
''^src/libstore/dummy-store\.cc$''
''^src/libstore/export-import\.cc$''
''^src/libstore/filetransfer\.cc$''
''^src/libstore/filetransfer\.hh$''
''^src/libstore/gc-store\.hh$''
''^src/libstore/include/nix/filetransfer\.hh$''
''^src/libstore/include/nix/gc-store\.hh$''
''^src/libstore/globals\.cc$''
''^src/libstore/globals\.hh$''
''^src/libstore/include/nix/globals\.hh$''
''^src/libstore/http-binary-cache-store\.cc$''
''^src/libstore/legacy-ssh-store\.cc$''
''^src/libstore/legacy-ssh-store\.hh$''
''^src/libstore/length-prefixed-protocol-helper\.hh$''
''^src/libstore/include/nix/legacy-ssh-store\.hh$''
''^src/libstore/include/nix/length-prefixed-protocol-helper\.hh$''
''^src/libstore/linux/personality\.cc$''
''^src/libstore/linux/personality\.hh$''
''^src/libstore/linux/include/nix/personality\.hh$''
''^src/libstore/local-binary-cache-store\.cc$''
''^src/libstore/local-fs-store\.cc$''
''^src/libstore/local-fs-store\.hh$''
''^src/libstore/include/nix/local-fs-store\.hh$''
''^src/libstore/log-store\.cc$''
''^src/libstore/log-store\.hh$''
''^src/libstore/include/nix/log-store\.hh$''
''^src/libstore/machines\.cc$''
''^src/libstore/machines\.hh$''
''^src/libstore/include/nix/machines\.hh$''
''^src/libstore/make-content-addressed\.cc$''
''^src/libstore/make-content-addressed\.hh$''
''^src/libstore/include/nix/make-content-addressed\.hh$''
''^src/libstore/misc\.cc$''
''^src/libstore/names\.cc$''
''^src/libstore/names\.hh$''
''^src/libstore/include/nix/names\.hh$''
''^src/libstore/nar-accessor\.cc$''
''^src/libstore/nar-accessor\.hh$''
''^src/libstore/include/nix/nar-accessor\.hh$''
''^src/libstore/nar-info-disk-cache\.cc$''
''^src/libstore/nar-info-disk-cache\.hh$''
''^src/libstore/include/nix/nar-info-disk-cache\.hh$''
''^src/libstore/nar-info\.cc$''
''^src/libstore/nar-info\.hh$''
''^src/libstore/include/nix/nar-info\.hh$''
''^src/libstore/outputs-spec\.cc$''
''^src/libstore/outputs-spec\.hh$''
''^src/libstore/include/nix/outputs-spec\.hh$''
''^src/libstore/parsed-derivations\.cc$''
''^src/libstore/path-info\.cc$''
''^src/libstore/path-info\.hh$''
''^src/libstore/include/nix/path-info\.hh$''
''^src/libstore/path-references\.cc$''
''^src/libstore/path-regex\.hh$''
''^src/libstore/include/nix/path-regex\.hh$''
''^src/libstore/path-with-outputs\.cc$''
''^src/libstore/path\.cc$''
''^src/libstore/path\.hh$''
''^src/libstore/include/nix/path\.hh$''
''^src/libstore/pathlocks\.cc$''
''^src/libstore/pathlocks\.hh$''
''^src/libstore/include/nix/pathlocks\.hh$''
''^src/libstore/profiles\.cc$''
''^src/libstore/profiles\.hh$''
''^src/libstore/include/nix/profiles\.hh$''
''^src/libstore/realisation\.cc$''
''^src/libstore/realisation\.hh$''
''^src/libstore/include/nix/realisation\.hh$''
''^src/libstore/remote-fs-accessor\.cc$''
''^src/libstore/remote-fs-accessor\.hh$''
''^src/libstore/remote-store-connection\.hh$''
''^src/libstore/include/nix/remote-fs-accessor\.hh$''
''^src/libstore/include/nix/remote-store-connection\.hh$''
''^src/libstore/remote-store\.cc$''
''^src/libstore/remote-store\.hh$''
''^src/libstore/include/nix/remote-store\.hh$''
''^src/libstore/s3-binary-cache-store\.cc$''
''^src/libstore/s3\.hh$''
''^src/libstore/include/nix/s3\.hh$''
''^src/libstore/serve-protocol-impl\.cc$''
''^src/libstore/serve-protocol-impl\.hh$''
''^src/libstore/include/nix/serve-protocol-impl\.hh$''
''^src/libstore/serve-protocol\.cc$''
''^src/libstore/serve-protocol\.hh$''
''^src/libstore/include/nix/serve-protocol\.hh$''
''^src/libstore/sqlite\.cc$''
''^src/libstore/sqlite\.hh$''
''^src/libstore/include/nix/sqlite\.hh$''
''^src/libstore/ssh-store\.cc$''
''^src/libstore/ssh\.cc$''
''^src/libstore/ssh\.hh$''
''^src/libstore/include/nix/ssh\.hh$''
''^src/libstore/store-api\.cc$''
''^src/libstore/store-api\.hh$''
''^src/libstore/store-dir-config\.hh$''
''^src/libstore/include/nix/store-api\.hh$''
''^src/libstore/include/nix/store-dir-config\.hh$''
''^src/libstore/build/derivation-goal\.cc$''
''^src/libstore/build/derivation-goal\.hh$''
''^src/libstore/include/nix/build/derivation-goal\.hh$''
''^src/libstore/build/drv-output-substitution-goal\.cc$''
''^src/libstore/build/drv-output-substitution-goal\.hh$''
''^src/libstore/include/nix/build/drv-output-substitution-goal\.hh$''
''^src/libstore/build/entry-points\.cc$''
''^src/libstore/build/goal\.cc$''
''^src/libstore/build/goal\.hh$''
''^src/libstore/include/nix/build/goal\.hh$''
''^src/libstore/unix/build/hook-instance\.cc$''
''^src/libstore/unix/build/local-derivation-goal\.cc$''
''^src/libstore/unix/build/local-derivation-goal\.hh$''
''^src/libstore/unix/include/nix/build/local-derivation-goal\.hh$''
''^src/libstore/build/substitution-goal\.cc$''
''^src/libstore/build/substitution-goal\.hh$''
''^src/libstore/include/nix/build/substitution-goal\.hh$''
''^src/libstore/build/worker\.cc$''
''^src/libstore/build/worker\.hh$''
''^src/libstore/include/nix/build/worker\.hh$''
''^src/libstore/builtins/fetchurl\.cc$''
''^src/libstore/builtins/unpack-channel\.cc$''
''^src/libstore/gc\.cc$''
''^src/libstore/local-overlay-store\.cc$''
''^src/libstore/local-overlay-store\.hh$''
''^src/libstore/include/nix/local-overlay-store\.hh$''
''^src/libstore/local-store\.cc$''
''^src/libstore/local-store\.hh$''
''^src/libstore/include/nix/local-store\.hh$''
''^src/libstore/unix/user-lock\.cc$''
''^src/libstore/unix/user-lock\.hh$''
''^src/libstore/unix/include/nix/user-lock\.hh$''
''^src/libstore/optimise-store\.cc$''
''^src/libstore/unix/pathlocks\.cc$''
''^src/libstore/posix-fs-canonicalise\.cc$''
''^src/libstore/posix-fs-canonicalise\.hh$''
''^src/libstore/include/nix/posix-fs-canonicalise\.hh$''
''^src/libstore/uds-remote-store\.cc$''
''^src/libstore/uds-remote-store\.hh$''
''^src/libstore/include/nix/uds-remote-store\.hh$''
''^src/libstore/windows/build\.cc$''
''^src/libstore/worker-protocol-impl\.hh$''
''^src/libstore/include/nix/worker-protocol-impl\.hh$''
''^src/libstore/worker-protocol\.cc$''
''^src/libstore/worker-protocol\.hh$''
''^src/libstore/include/nix/worker-protocol\.hh$''
''^src/libutil-c/nix_api_util_internal\.h$''
''^src/libutil/archive\.cc$''
''^src/libutil/archive\.hh$''
''^src/libutil/include/nix/archive\.hh$''
''^src/libutil/args\.cc$''
''^src/libutil/args\.hh$''
''^src/libutil/args/root\.hh$''
''^src/libutil/callback\.hh$''
''^src/libutil/include/nix/args\.hh$''
''^src/libutil/include/nix/args/root\.hh$''
''^src/libutil/include/nix/callback\.hh$''
''^src/libutil/canon-path\.cc$''
''^src/libutil/canon-path\.hh$''
''^src/libutil/chunked-vector\.hh$''
''^src/libutil/closure\.hh$''
''^src/libutil/comparator\.hh$''
''^src/libutil/include/nix/canon-path\.hh$''
''^src/libutil/include/nix/chunked-vector\.hh$''
''^src/libutil/include/nix/closure\.hh$''
''^src/libutil/include/nix/comparator\.hh$''
''^src/libutil/compute-levels\.cc$''
''^src/libutil/config-impl\.hh$''
''^src/libutil/include/nix/config-impl\.hh$''
''^src/libutil/config\.cc$''
''^src/libutil/config\.hh$''
''^src/libutil/include/nix/config\.hh$''
''^src/libutil/current-process\.cc$''
''^src/libutil/current-process\.hh$''
''^src/libutil/include/nix/current-process\.hh$''
''^src/libutil/english\.cc$''
''^src/libutil/english\.hh$''
''^src/libutil/include/nix/english\.hh$''
''^src/libutil/error\.cc$''
''^src/libutil/error\.hh$''
''^src/libutil/exit\.hh$''
''^src/libutil/include/nix/error\.hh$''
''^src/libutil/include/nix/exit\.hh$''
''^src/libutil/experimental-features\.cc$''
''^src/libutil/experimental-features\.hh$''
''^src/libutil/include/nix/experimental-features\.hh$''
''^src/libutil/file-content-address\.cc$''
''^src/libutil/file-content-address\.hh$''
''^src/libutil/include/nix/file-content-address\.hh$''
''^src/libutil/file-descriptor\.cc$''
''^src/libutil/file-descriptor\.hh$''
''^src/libutil/file-path-impl\.hh$''
''^src/libutil/file-path\.hh$''
''^src/libutil/include/nix/file-descriptor\.hh$''
''^src/libutil/include/nix/file-path-impl\.hh$''
''^src/libutil/include/nix/file-path\.hh$''
''^src/libutil/file-system\.cc$''
''^src/libutil/file-system\.hh$''
''^src/libutil/finally\.hh$''
''^src/libutil/fmt\.hh$''
''^src/libutil/include/nix/file-system\.hh$''
''^src/libutil/include/nix/finally\.hh$''
''^src/libutil/include/nix/fmt\.hh$''
''^src/libutil/fs-sink\.cc$''
''^src/libutil/fs-sink\.hh$''
''^src/libutil/include/nix/fs-sink\.hh$''
''^src/libutil/git\.cc$''
''^src/libutil/git\.hh$''
''^src/libutil/include/nix/git\.hh$''
''^src/libutil/hash\.cc$''
''^src/libutil/hash\.hh$''
''^src/libutil/include/nix/hash\.hh$''
''^src/libutil/hilite\.cc$''
''^src/libutil/hilite\.hh$''
''^src/libutil/include/nix/hilite\.hh$''
''^src/libutil/source-accessor\.hh$''
''^src/libutil/json-impls\.hh$''
''^src/libutil/include/nix/json-impls\.hh$''
''^src/libutil/json-utils\.cc$''
''^src/libutil/json-utils\.hh$''
''^src/libutil/include/nix/json-utils\.hh$''
''^src/libutil/linux/cgroup\.cc$''
''^src/libutil/linux/namespaces\.cc$''
''^src/libutil/logging\.cc$''
''^src/libutil/logging\.hh$''
''^src/libutil/lru-cache\.hh$''
''^src/libutil/include/nix/logging\.hh$''
''^src/libutil/include/nix/lru-cache\.hh$''
''^src/libutil/memory-source-accessor\.cc$''
''^src/libutil/memory-source-accessor\.hh$''
''^src/libutil/pool\.hh$''
''^src/libutil/include/nix/memory-source-accessor\.hh$''
''^src/libutil/include/nix/pool\.hh$''
''^src/libutil/position\.cc$''
''^src/libutil/position\.hh$''
''^src/libutil/include/nix/position\.hh$''
''^src/libutil/posix-source-accessor\.cc$''
''^src/libutil/posix-source-accessor\.hh$''
''^src/libutil/processes\.hh$''
''^src/libutil/ref\.hh$''
''^src/libutil/include/nix/posix-source-accessor\.hh$''
''^src/libutil/include/nix/processes\.hh$''
''^src/libutil/include/nix/ref\.hh$''
''^src/libutil/references\.cc$''
''^src/libutil/references\.hh$''
''^src/libutil/include/nix/references\.hh$''
''^src/libutil/regex-combinators\.hh$''
''^src/libutil/serialise\.cc$''
''^src/libutil/serialise\.hh$''
''^src/libutil/signals\.hh$''
''^src/libutil/include/nix/serialise\.hh$''
''^src/libutil/include/nix/signals\.hh$''
''^src/libutil/signature/local-keys\.cc$''
''^src/libutil/signature/local-keys\.hh$''
''^src/libutil/include/nix/signature/local-keys\.hh$''
''^src/libutil/signature/signer\.cc$''
''^src/libutil/signature/signer\.hh$''
''^src/libutil/include/nix/signature/signer\.hh$''
''^src/libutil/source-accessor\.cc$''
''^src/libutil/source-accessor\.hh$''
''^src/libutil/include/nix/source-accessor\.hh$''
''^src/libutil/source-path\.cc$''
''^src/libutil/source-path\.hh$''
''^src/libutil/split\.hh$''
''^src/libutil/include/nix/source-path\.hh$''
''^src/libutil/include/nix/split\.hh$''
''^src/libutil/suggestions\.cc$''
''^src/libutil/suggestions\.hh$''
''^src/libutil/sync\.hh$''
''^src/libutil/include/nix/suggestions\.hh$''
''^src/libutil/include/nix/sync\.hh$''
''^src/libutil/terminal\.cc$''
''^src/libutil/terminal\.hh$''
''^src/libutil/include/nix/terminal\.hh$''
''^src/libutil/thread-pool\.cc$''
''^src/libutil/thread-pool\.hh$''
''^src/libutil/topo-sort\.hh$''
''^src/libutil/types\.hh$''
''^src/libutil/include/nix/thread-pool\.hh$''
''^src/libutil/include/nix/topo-sort\.hh$''
''^src/libutil/include/nix/types\.hh$''
''^src/libutil/unix/file-descriptor\.cc$''
''^src/libutil/unix/file-path\.cc$''
''^src/libutil/unix/processes\.cc$''
''^src/libutil/unix/signals-impl\.hh$''
''^src/libutil/unix/include/nix/signals-impl\.hh$''
''^src/libutil/unix/signals\.cc$''
''^src/libutil/unix-domain-socket\.cc$''
''^src/libutil/unix/users\.cc$''
''^src/libutil/url-parts\.hh$''
''^src/libutil/include/nix/url-parts\.hh$''
''^src/libutil/url\.cc$''
''^src/libutil/url\.hh$''
''^src/libutil/include/nix/url\.hh$''
''^src/libutil/users\.cc$''
''^src/libutil/users\.hh$''
''^src/libutil/include/nix/users\.hh$''
''^src/libutil/util\.cc$''
''^src/libutil/util\.hh$''
''^src/libutil/variant-wrapper\.hh$''
''^src/libutil/include/nix/util\.hh$''
''^src/libutil/include/nix/variant-wrapper\.hh$''
''^src/libutil/widecharwidth/widechar_width\.h$'' # vendored source
''^src/libutil/windows/file-descriptor\.cc$''
''^src/libutil/windows/file-path\.cc$''
''^src/libutil/windows/processes\.cc$''
''^src/libutil/windows/users\.cc$''
''^src/libutil/windows/windows-error\.cc$''
''^src/libutil/windows/windows-error\.hh$''
''^src/libutil/windows/include/nix/windows-error\.hh$''
''^src/libutil/xml-writer\.cc$''
''^src/libutil/xml-writer\.hh$''
''^src/libutil/include/nix/xml-writer\.hh$''
''^src/nix-build/nix-build\.cc$''
''^src/nix-channel/nix-channel\.cc$''
''^src/nix-collect-garbage/nix-collect-garbage\.cc$''
@ -481,9 +481,9 @@
''^tests/nixos/ca-fd-leak/sender\.c''
''^tests/nixos/ca-fd-leak/smuggler\.c''
''^tests/nixos/user-sandboxing/attacker\.c''
''^src/libexpr-test-support/tests/libexpr\.hh''
''^src/libexpr-test-support/include/nix/tests/libexpr\.hh''
''^src/libexpr-test-support/tests/value/context\.cc''
''^src/libexpr-test-support/tests/value/context\.hh''
''^src/libexpr-test-support/include/nix/tests/value/context\.hh''
''^src/libexpr-tests/derived-path\.cc''
''^src/libexpr-tests/error_traces\.cc''
''^src/libexpr-tests/eval\.cc''
@ -498,13 +498,13 @@
''^src/libflake-tests/flakeref\.cc''
''^src/libflake-tests/url-name\.cc''
''^src/libstore-test-support/tests/derived-path\.cc''
''^src/libstore-test-support/tests/derived-path\.hh''
''^src/libstore-test-support/tests/nix_api_store\.hh''
''^src/libstore-test-support/include/nix/tests/derived-path\.hh''
''^src/libstore-test-support/include/nix/tests/nix_api_store\.hh''
''^src/libstore-test-support/tests/outputs-spec\.cc''
''^src/libstore-test-support/tests/outputs-spec\.hh''
''^src/libstore-test-support/tests/path\.cc''
''^src/libstore-test-support/tests/path\.hh''
''^src/libstore-test-support/tests/protocol\.hh''
''^src/libstore-test-support/include/nix/tests/outputs-spec\.hh''
''^src/libstore-test-support/path\.cc''
''^src/libstore-test-support/include/nix/tests/path\.hh''
''^src/libstore-test-support/include/nix/tests/protocol\.hh''
''^src/libstore-tests/common-protocol\.cc''
''^src/libstore-tests/content-address\.cc''
''^src/libstore-tests/derivation\.cc''
@ -518,9 +518,9 @@
''^src/libstore-tests/path\.cc''
''^src/libstore-tests/serve-protocol\.cc''
''^src/libstore-tests/worker-protocol\.cc''
''^src/libutil-test-support/tests/characterization\.hh''
''^src/libutil-test-support/tests/hash\.cc''
''^src/libutil-test-support/tests/hash\.hh''
''^src/libutil-test-support/include/nix/tests/characterization\.hh''
''^src/libutil-test-support/hash\.cc''
''^src/libutil-test-support/include/nix/tests/hash\.hh''
''^src/libutil-tests/args\.cc''
''^src/libutil-tests/canon-path\.cc''
''^src/libutil-tests/chunked-vector\.cc''

View file

@ -16,7 +16,6 @@ import('pkgconfig').generate(
filebase : meson.project_name(),
name : 'Nix',
description : 'Nix Package Manager',
subdirs : ['nix'],
extra_cflags : ['-std=c++2a'],
requires : requires_public,
requires_private : requires_private,

View file

@ -9,19 +9,19 @@
#include <sys/time.h>
#endif
#include "machines.hh"
#include "shared.hh"
#include "plugin.hh"
#include "pathlocks.hh"
#include "globals.hh"
#include "serialise.hh"
#include "build-result.hh"
#include "store-api.hh"
#include "strings.hh"
#include "derivations.hh"
#include "local-store.hh"
#include "legacy.hh"
#include "experimental-features.hh"
#include "nix/machines.hh"
#include "nix/shared.hh"
#include "nix/plugin.hh"
#include "nix/pathlocks.hh"
#include "nix/globals.hh"
#include "nix/serialise.hh"
#include "nix/build-result.hh"
#include "nix/store-api.hh"
#include "nix/strings.hh"
#include "nix/derivations.hh"
#include "nix/local-store.hh"
#include "nix/legacy.hh"
#include "nix/experimental-features.hh"
using namespace nix;
using std::cin;

View file

@ -1,7 +1,7 @@
#include "built-path.hh"
#include "derivations.hh"
#include "store-api.hh"
#include "comparator.hh"
#include "nix/built-path.hh"
#include "nix/derivations.hh"
#include "nix/store-api.hh"
#include "nix/comparator.hh"
#include <nlohmann/json.hpp>

View file

@ -1,4 +1,4 @@
#include "command-installable-value.hh"
#include "nix/command-installable-value.hh"
namespace nix {

View file

@ -1,16 +1,16 @@
#include <algorithm>
#include <nlohmann/json.hpp>
#include "command.hh"
#include "markdown.hh"
#include "store-api.hh"
#include "local-fs-store.hh"
#include "derivations.hh"
#include "nixexpr.hh"
#include "profiles.hh"
#include "repl.hh"
#include "strings.hh"
#include "environment-variables.hh"
#include "nix/command.hh"
#include "nix/markdown.hh"
#include "nix/store-api.hh"
#include "nix/local-fs-store.hh"
#include "nix/derivations.hh"
#include "nix/nixexpr.hh"
#include "nix/profiles.hh"
#include "nix/repl.hh"
#include "nix/strings.hh"
#include "nix/environment-variables.hh"
namespace nix {

View file

@ -1,20 +1,20 @@
#include "fetch-settings.hh"
#include "eval-settings.hh"
#include "common-eval-args.hh"
#include "shared.hh"
#include "config-global.hh"
#include "filetransfer.hh"
#include "eval.hh"
#include "fetchers.hh"
#include "registry.hh"
#include "flake/flakeref.hh"
#include "flake/settings.hh"
#include "store-api.hh"
#include "command.hh"
#include "tarball.hh"
#include "fetch-to-store.hh"
#include "compatibility-settings.hh"
#include "eval-settings.hh"
#include "nix/fetch-settings.hh"
#include "nix/eval-settings.hh"
#include "nix/common-eval-args.hh"
#include "nix/shared.hh"
#include "nix/config-global.hh"
#include "nix/filetransfer.hh"
#include "nix/eval.hh"
#include "nix/fetchers.hh"
#include "nix/registry.hh"
#include "nix/flake/flakeref.hh"
#include "nix/flake/settings.hh"
#include "nix/store-api.hh"
#include "nix/command.hh"
#include "nix/tarball.hh"
#include "nix/fetch-to-store.hh"
#include "nix/compatibility-settings.hh"
#include "nix/eval-settings.hh"
namespace nix {

View file

@ -1,6 +1,6 @@
#include "editor-for.hh"
#include "environment-variables.hh"
#include "source-path.hh"
#include "nix/editor-for.hh"
#include "nix/environment-variables.hh"
#include "nix/source-path.hh"
namespace nix {

View file

@ -1,8 +1,8 @@
#pragma once
///@file
#include "derived-path.hh"
#include "realisation.hh"
#include "nix/derived-path.hh"
#include "nix/realisation.hh"
namespace nix {

View file

@ -1,8 +1,8 @@
#pragma once
///@file
#include "installable-value.hh"
#include "command.hh"
#include "nix/installable-value.hh"
#include "nix/command.hh"
namespace nix {

View file

@ -1,11 +1,11 @@
#pragma once
///@file
#include "installable-value.hh"
#include "args.hh"
#include "common-eval-args.hh"
#include "path.hh"
#include "flake/lockfile.hh"
#include "nix/installable-value.hh"
#include "nix/args.hh"
#include "nix/common-eval-args.hh"
#include "nix/path.hh"
#include "nix/flake/lockfile.hh"
#include <optional>

View file

@ -1,10 +1,10 @@
#pragma once
///@file
#include "args.hh"
#include "canon-path.hh"
#include "common-args.hh"
#include "search-path.hh"
#include "nix/args.hh"
#include "nix/canon-path.hh"
#include "nix/common-args.hh"
#include "nix/search-path.hh"
#include <filesystem>

View file

@ -1,5 +1,5 @@
#pragma once
#include "config.hh"
#include "nix/config.hh"
namespace nix {
struct CompatibilitySettings : public Config

View file

@ -1,8 +1,8 @@
#pragma once
///@file
#include "types.hh"
#include "source-path.hh"
#include "nix/types.hh"
#include "nix/source-path.hh"
namespace nix {

View file

@ -1,22 +1,22 @@
#pragma once
///@file
#include "globals.hh"
#include "installable-value.hh"
#include "outputs-spec.hh"
#include "command.hh"
#include "attr-path.hh"
#include "common-eval-args.hh"
#include "derivations.hh"
#include "eval-inline.hh"
#include "eval.hh"
#include "get-drvs.hh"
#include "store-api.hh"
#include "shared.hh"
#include "eval-cache.hh"
#include "url.hh"
#include "registry.hh"
#include "build-result.hh"
#include "nix/globals.hh"
#include "nix/installable-value.hh"
#include "nix/outputs-spec.hh"
#include "nix/command.hh"
#include "nix/attr-path.hh"
#include "nix/common-eval-args.hh"
#include "nix/derivations.hh"
#include "nix/eval-inline.hh"
#include "nix/eval.hh"
#include "nix/get-drvs.hh"
#include "nix/store-api.hh"
#include "nix/shared.hh"
#include "nix/eval-cache.hh"
#include "nix/url.hh"
#include "nix/registry.hh"
#include "nix/build-result.hh"
#include <regex>
#include <queue>

View file

@ -1,7 +1,7 @@
#pragma once
///@file
#include "installables.hh"
#include "nix/installables.hh"
namespace nix {

View file

@ -1,8 +1,8 @@
#pragma once
///@file
#include "common-eval-args.hh"
#include "installable-value.hh"
#include "nix/common-eval-args.hh"
#include "nix/installable-value.hh"
namespace nix {

View file

@ -1,8 +1,8 @@
#pragma once
///@file
#include "installables.hh"
#include "flake/flake.hh"
#include "nix/installables.hh"
#include "nix/flake/flake.hh"
namespace nix {

View file

@ -1,12 +1,12 @@
#pragma once
///@file
#include "path.hh"
#include "outputs-spec.hh"
#include "derived-path.hh"
#include "built-path.hh"
#include "store-api.hh"
#include "build-result.hh"
#include "nix/path.hh"
#include "nix/outputs-spec.hh"
#include "nix/derived-path.hh"
#include "nix/built-path.hh"
#include "nix/store-api.hh"
#include "nix/build-result.hh"
#include <optional>

View file

@ -0,0 +1,23 @@
# Public headers directory
include_dirs = [include_directories('..')]
headers = files(
'built-path.hh',
'command-installable-value.hh',
'command.hh',
'common-eval-args.hh',
'compatibility-settings.hh',
'editor-for.hh',
'installable-attr-path.hh',
'installable-derived-path.hh',
'installable-flake.hh',
'installable-value.hh',
'installables.hh',
'legacy.hh',
'markdown.hh',
'misc-store-flags.hh',
'network-proxy.hh',
'repl-interacter.hh',
'repl.hh',
)

View file

@ -1,5 +1,5 @@
#include "args.hh"
#include "content-address.hh"
#include "nix/args.hh"
#include "nix/content-address.hh"
namespace nix::flag {

View file

@ -1,7 +1,7 @@
#pragma once
///@file
#include "types.hh"
#include "nix/types.hh"
namespace nix {

View file

@ -1,8 +1,8 @@
#pragma once
/// @file
#include "finally.hh"
#include "types.hh"
#include "nix/finally.hh"
#include "nix/types.hh"
#include <functional>
#include <string>

View file

@ -1,7 +1,7 @@
#pragma once
///@file
#include "eval.hh"
#include "nix/eval.hh"
namespace nix {

View file

@ -1,21 +1,21 @@
#include "globals.hh"
#include "installable-attr-path.hh"
#include "outputs-spec.hh"
#include "util.hh"
#include "command.hh"
#include "attr-path.hh"
#include "common-eval-args.hh"
#include "derivations.hh"
#include "eval-inline.hh"
#include "eval.hh"
#include "get-drvs.hh"
#include "store-api.hh"
#include "shared.hh"
#include "flake/flake.hh"
#include "eval-cache.hh"
#include "url.hh"
#include "registry.hh"
#include "build-result.hh"
#include "nix/globals.hh"
#include "nix/installable-attr-path.hh"
#include "nix/outputs-spec.hh"
#include "nix/util.hh"
#include "nix/command.hh"
#include "nix/attr-path.hh"
#include "nix/common-eval-args.hh"
#include "nix/derivations.hh"
#include "nix/eval-inline.hh"
#include "nix/eval.hh"
#include "nix/get-drvs.hh"
#include "nix/store-api.hh"
#include "nix/shared.hh"
#include "nix/flake/flake.hh"
#include "nix/eval-cache.hh"
#include "nix/url.hh"
#include "nix/registry.hh"
#include "nix/build-result.hh"
#include <regex>
#include <queue>

View file

@ -1,5 +1,5 @@
#include "installable-derived-path.hh"
#include "derivations.hh"
#include "nix/installable-derived-path.hh"
#include "nix/derivations.hh"
namespace nix {

View file

@ -1,22 +1,22 @@
#include "globals.hh"
#include "installable-flake.hh"
#include "installable-derived-path.hh"
#include "outputs-spec.hh"
#include "util.hh"
#include "command.hh"
#include "attr-path.hh"
#include "common-eval-args.hh"
#include "derivations.hh"
#include "eval-inline.hh"
#include "eval.hh"
#include "get-drvs.hh"
#include "store-api.hh"
#include "shared.hh"
#include "flake/flake.hh"
#include "eval-cache.hh"
#include "url.hh"
#include "registry.hh"
#include "build-result.hh"
#include "nix/globals.hh"
#include "nix/installable-flake.hh"
#include "nix/installable-derived-path.hh"
#include "nix/outputs-spec.hh"
#include "nix/util.hh"
#include "nix/command.hh"
#include "nix/attr-path.hh"
#include "nix/common-eval-args.hh"
#include "nix/derivations.hh"
#include "nix/eval-inline.hh"
#include "nix/eval.hh"
#include "nix/get-drvs.hh"
#include "nix/store-api.hh"
#include "nix/shared.hh"
#include "nix/flake/flake.hh"
#include "nix/eval-cache.hh"
#include "nix/url.hh"
#include "nix/registry.hh"
#include "nix/build-result.hh"
#include <regex>
#include <queue>

View file

@ -1,6 +1,6 @@
#include "installable-value.hh"
#include "eval-cache.hh"
#include "fetch-to-store.hh"
#include "nix/installable-value.hh"
#include "nix/eval-cache.hh"
#include "nix/fetch-to-store.hh"
namespace nix {

View file

@ -1,33 +1,33 @@
#include "globals.hh"
#include "installables.hh"
#include "installable-derived-path.hh"
#include "installable-attr-path.hh"
#include "installable-flake.hh"
#include "outputs-spec.hh"
#include "users.hh"
#include "util.hh"
#include "command.hh"
#include "attr-path.hh"
#include "common-eval-args.hh"
#include "derivations.hh"
#include "eval-inline.hh"
#include "eval.hh"
#include "eval-settings.hh"
#include "get-drvs.hh"
#include "store-api.hh"
#include "shared.hh"
#include "flake/flake.hh"
#include "eval-cache.hh"
#include "url.hh"
#include "registry.hh"
#include "build-result.hh"
#include "nix/globals.hh"
#include "nix/installables.hh"
#include "nix/installable-derived-path.hh"
#include "nix/installable-attr-path.hh"
#include "nix/installable-flake.hh"
#include "nix/outputs-spec.hh"
#include "nix/users.hh"
#include "nix/util.hh"
#include "nix/command.hh"
#include "nix/attr-path.hh"
#include "nix/common-eval-args.hh"
#include "nix/derivations.hh"
#include "nix/eval-inline.hh"
#include "nix/eval.hh"
#include "nix/eval-settings.hh"
#include "nix/get-drvs.hh"
#include "nix/store-api.hh"
#include "nix/shared.hh"
#include "nix/flake/flake.hh"
#include "nix/eval-cache.hh"
#include "nix/url.hh"
#include "nix/registry.hh"
#include "nix/build-result.hh"
#include <regex>
#include <queue>
#include <nlohmann/json.hpp>
#include "strings-inline.hh"
#include "nix/strings-inline.hh"
namespace nix {

View file

@ -1,4 +1,4 @@
#include "legacy.hh"
#include "nix/legacy.hh"
namespace nix {

View file

@ -1,8 +1,8 @@
#include "markdown.hh"
#include "environment-variables.hh"
#include "error.hh"
#include "finally.hh"
#include "terminal.hh"
#include "nix/markdown.hh"
#include "nix/environment-variables.hh"
#include "nix/error.hh"
#include "nix/finally.hh"
#include "nix/terminal.hh"
#include "cmd-config-private.hh"

View file

@ -61,9 +61,9 @@ config_h = configure_file(
add_project_arguments(
# TODO(Qyriad): Yes this is how the autoconf+Make system did it.
# It would be nice for our headers to be idempotent instead.
'-include', 'config-util.hh',
'-include', 'config-store.hh',
'-include', 'config-expr.hh',
'-include', 'nix/config-util.hh',
'-include', 'nix/config-store.hh',
'-include', 'nix/config-expr.hh',
language : 'cpp',
)
@ -88,27 +88,7 @@ sources = files(
'repl.cc',
)
include_dirs = [include_directories('.')]
headers = files(
'built-path.hh',
'command-installable-value.hh',
'command.hh',
'common-eval-args.hh',
'compatibility-settings.hh',
'editor-for.hh',
'installable-attr-path.hh',
'installable-derived-path.hh',
'installable-flake.hh',
'installable-value.hh',
'installables.hh',
'legacy.hh',
'markdown.hh',
'misc-store-flags.hh',
'network-proxy.hh',
'repl-interacter.hh',
'repl.hh',
)
subdir('include/nix')
subdir('nix-meson-build-support/export-all-symbols')
subdir('nix-meson-build-support/windows-version')

View file

@ -1,4 +1,4 @@
#include "misc-store-flags.hh"
#include "nix/misc-store-flags.hh"
namespace nix::flag
{

View file

@ -1,8 +1,8 @@
#include "network-proxy.hh"
#include "nix/network-proxy.hh"
#include <algorithm>
#include "environment-variables.hh"
#include "nix/environment-variables.hh"
namespace nix {

View file

@ -46,6 +46,7 @@ mkMesonLibrary (finalAttrs: {
./.version
./meson.build
./meson.options
./include/nix/meson.build
(fileset.fileFilter (file: file.hasExt "cc") ./.)
(fileset.fileFilter (file: file.hasExt "hh") ./.)
];

View file

@ -16,12 +16,12 @@ extern "C" {
}
#endif
#include "signals.hh"
#include "finally.hh"
#include "repl-interacter.hh"
#include "file-system.hh"
#include "repl.hh"
#include "environment-variables.hh"
#include "nix/signals.hh"
#include "nix/finally.hh"
#include "nix/repl-interacter.hh"
#include "nix/file-system.hh"
#include "nix/repl.hh"
#include "nix/environment-variables.hh"
namespace nix {

View file

@ -2,34 +2,34 @@
#include <cstdlib>
#include <cstring>
#include "error.hh"
#include "repl-interacter.hh"
#include "repl.hh"
#include "nix/error.hh"
#include "nix/repl-interacter.hh"
#include "nix/repl.hh"
#include "ansicolor.hh"
#include "shared.hh"
#include "eval.hh"
#include "eval-settings.hh"
#include "attr-path.hh"
#include "signals.hh"
#include "store-api.hh"
#include "log-store.hh"
#include "common-eval-args.hh"
#include "get-drvs.hh"
#include "derivations.hh"
#include "globals.hh"
#include "flake/flake.hh"
#include "flake/lockfile.hh"
#include "users.hh"
#include "editor-for.hh"
#include "finally.hh"
#include "markdown.hh"
#include "local-fs-store.hh"
#include "print.hh"
#include "ref.hh"
#include "value.hh"
#include "nix/ansicolor.hh"
#include "nix/shared.hh"
#include "nix/eval.hh"
#include "nix/eval-settings.hh"
#include "nix/attr-path.hh"
#include "nix/signals.hh"
#include "nix/store-api.hh"
#include "nix/log-store.hh"
#include "nix/common-eval-args.hh"
#include "nix/get-drvs.hh"
#include "nix/derivations.hh"
#include "nix/globals.hh"
#include "nix/flake/flake.hh"
#include "nix/flake/lockfile.hh"
#include "nix/users.hh"
#include "nix/editor-for.hh"
#include "nix/finally.hh"
#include "nix/markdown.hh"
#include "nix/local-fs-store.hh"
#include "nix/print.hh"
#include "nix/ref.hh"
#include "nix/value.hh"
#include "strings.hh"
#include "nix/strings.hh"
namespace nix {

View file

@ -30,9 +30,9 @@ add_project_arguments(
# It would be nice for our headers to be idempotent instead.
# From C++ libraries, only for internals
'-include', 'config-util.hh',
'-include', 'config-store.hh',
'-include', 'config-expr.hh',
'-include', 'nix/config-util.hh',
'-include', 'nix/config-store.hh',
'-include', 'nix/config-expr.hh',
language : 'cpp',
)
@ -69,7 +69,7 @@ this_library = library(
install : true,
)
install_headers(headers, subdir : 'nix', preserve_path : true)
install_headers(headers, preserve_path : true)
libraries_private = []

View file

@ -2,11 +2,11 @@
#include <stdexcept>
#include <string>
#include "eval.hh"
#include "eval-gc.hh"
#include "globals.hh"
#include "eval-settings.hh"
#include "ref.hh"
#include "nix/eval.hh"
#include "nix/eval-gc.hh"
#include "nix/globals.hh"
#include "nix/eval-settings.hh"
#include "nix/ref.hh"
#include "nix_api_expr.h"
#include "nix_api_expr_internal.h"

View file

@ -1,12 +1,12 @@
#ifndef NIX_API_EXPR_INTERNAL_H
#define NIX_API_EXPR_INTERNAL_H
#include "fetch-settings.hh"
#include "eval.hh"
#include "eval-settings.hh"
#include "attr-set.hh"
#include "nix/fetch-settings.hh"
#include "nix/eval.hh"
#include "nix/eval-settings.hh"
#include "nix/attr-set.hh"
#include "nix_api_value.h"
#include "search-path.hh"
#include "nix/search-path.hh"
struct nix_eval_state_builder
{

View file

@ -1,8 +1,8 @@
#include "attr-set.hh"
#include "config.hh"
#include "eval.hh"
#include "globals.hh"
#include "value.hh"
#include "nix/attr-set.hh"
#include "nix/config.hh"
#include "nix/eval.hh"
#include "nix/globals.hh"
#include "nix/value.hh"
#include "nix_api_expr.h"
#include "nix_api_expr_internal.h"
@ -10,7 +10,7 @@
#include "nix_api_util.h"
#include "nix_api_util_internal.h"
#include "nix_api_value.h"
#include "value/context.hh"
#include "nix/value/context.hh"
#include <nlohmann/json.hpp>

View file

@ -12,9 +12,10 @@
#include "nix_api_expr.h"
#include "nix_api_util.h"
#include "nix_api_value.h"
#include "stdbool.h"
#include "stddef.h"
#include "stdint.h"
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#ifdef __cplusplus
extern "C" {

View file

@ -1,10 +1,10 @@
#include "attr-set.hh"
#include "config.hh"
#include "eval.hh"
#include "globals.hh"
#include "path.hh"
#include "primops.hh"
#include "value.hh"
#include "nix/attr-set.hh"
#include "nix/config.hh"
#include "nix/eval.hh"
#include "nix/globals.hh"
#include "nix/path.hh"
#include "nix/primops.hh"
#include "nix/value.hh"
#include "nix_api_expr.h"
#include "nix_api_expr_internal.h"
@ -12,7 +12,7 @@
#include "nix_api_util_internal.h"
#include "nix_api_store_internal.h"
#include "nix_api_value.h"
#include "value/context.hh"
#include "nix/value/context.hh"
// Internal helper functions to check [in] and [out] `Value *` parameters
static const nix::Value & check_value_not_null(const nix_value * value)

View file

@ -10,9 +10,10 @@
#include "nix_api_util.h"
#include "nix_api_store.h"
#include "stdbool.h"
#include "stddef.h"
#include "stdint.h"
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#ifdef __cplusplus
extern "C" {

View file

@ -0,0 +1,9 @@
# Public headers directory
include_dirs = [include_directories('..')]
headers = files(
'tests/libexpr.hh',
'tests/nix_api_expr.hh',
'tests/value/context.hh',
)

View file

@ -4,16 +4,16 @@
#include <gtest/gtest.h>
#include <gmock/gmock.h>
#include "fetch-settings.hh"
#include "value.hh"
#include "nixexpr.hh"
#include "nixexpr.hh"
#include "eval.hh"
#include "eval-gc.hh"
#include "eval-inline.hh"
#include "eval-settings.hh"
#include "nix/fetch-settings.hh"
#include "nix/value.hh"
#include "nix/nixexpr.hh"
#include "nix/nixexpr.hh"
#include "nix/eval.hh"
#include "nix/eval-gc.hh"
#include "nix/eval-inline.hh"
#include "nix/eval-settings.hh"
#include "tests/libstore.hh"
#include "nix/tests/libstore.hh"
namespace nix {
class LibExprTest : public LibStoreTest {

View file

@ -2,7 +2,7 @@
///@file
#include "nix_api_expr.h"
#include "nix_api_value.h"
#include "tests/nix_api_store.hh"
#include "nix/tests/nix_api_store.hh"
#include <gtest/gtest.h>

View file

@ -3,7 +3,7 @@
#include <rapidcheck/gen/Arbitrary.h>
#include "value/context.hh"
#include "nix/value/context.hh"
namespace rc {
using namespace nix;

View file

@ -32,9 +32,9 @@ deps_public += rapidcheck
add_project_arguments(
# TODO(Qyriad): Yes this is how the autoconf+Make system did it.
# It would be nice for our headers to be idempotent instead.
'-include', 'config-util.hh',
'-include', 'config-store.hh',
'-include', 'config-expr.hh',
'-include', 'nix/config-util.hh',
'-include', 'nix/config-store.hh',
'-include', 'nix/config-expr.hh',
language : 'cpp',
)
@ -44,13 +44,7 @@ sources = files(
'tests/value/context.cc',
)
include_dirs = [include_directories('.')]
headers = files(
'tests/libexpr.hh',
'tests/nix_api_expr.hh',
'tests/value/context.hh',
)
subdir('include/nix')
subdir('nix-meson-build-support/export-all-symbols')
subdir('nix-meson-build-support/windows-version')

View file

@ -29,6 +29,7 @@ mkMesonLibrary (finalAttrs: {
./.version
./meson.build
# ./meson.options
./include/nix/meson.build
(fileset.fileFilter (file: file.hasExt "cc") ./.)
(fileset.fileFilter (file: file.hasExt "hh") ./.)
];

View file

@ -1,7 +1,7 @@
#include <rapidcheck.h>
#include "tests/path.hh"
#include "tests/value/context.hh"
#include "nix/tests/path.hh"
#include "nix/tests/value/context.hh"
namespace rc {
using namespace nix;

View file

@ -2,8 +2,8 @@
#include <gtest/gtest.h>
#include <rapidcheck/gtest.h>
#include "tests/derived-path.hh"
#include "tests/libexpr.hh"
#include "nix/tests/derived-path.hh"
#include "nix/tests/libexpr.hh"
namespace nix {

View file

@ -1,7 +1,7 @@
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "tests/libexpr.hh"
#include "nix/tests/libexpr.hh"
namespace nix {

View file

@ -1,8 +1,8 @@
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "eval.hh"
#include "tests/libexpr.hh"
#include "nix/eval.hh"
#include "nix/tests/libexpr.hh"
namespace nix {

View file

@ -1,5 +1,5 @@
#include "tests/libexpr.hh"
#include "value-to-json.hh"
#include "nix/tests/libexpr.hh"
#include "nix/value-to-json.hh"
namespace nix {
// Testing the conversion to JSON

View file

@ -1,7 +1,7 @@
#include <gtest/gtest.h>
#include <cstdlib>
#include "globals.hh"
#include "logging.hh"
#include "nix/globals.hh"
#include "nix/logging.hh"
using namespace nix;

View file

@ -38,9 +38,9 @@ deps_private += gtest
add_project_arguments(
# TODO(Qyriad): Yes this is how the autoconf+Make system did it.
# It would be nice for our headers to be idempotent instead.
'-include', 'config-util.hh',
'-include', 'config-store.hh',
'-include', 'config-expr.hh',
'-include', 'nix/config-util.hh',
'-include', 'nix/config-store.hh',
'-include', 'nix/config-expr.hh',
language : 'cpp',
)

View file

@ -5,9 +5,9 @@
#include "nix_api_expr.h"
#include "nix_api_value.h"
#include "tests/nix_api_expr.hh"
#include "tests/string_callback.hh"
#include "file-system.hh"
#include "nix/tests/nix_api_expr.hh"
#include "nix/tests/string_callback.hh"
#include "nix/file-system.hh"
#include <gmock/gmock.h>
#include <gtest/gtest.h>

View file

@ -7,8 +7,8 @@
#include "nix_api_value.h"
#include "nix_api_external.h"
#include "tests/nix_api_expr.hh"
#include "tests/string_callback.hh"
#include "nix/tests/nix_api_expr.hh"
#include "nix/tests/string_callback.hh"
#include <gtest/gtest.h>

View file

@ -6,10 +6,10 @@
#include "nix_api_value.h"
#include "nix_api_expr_internal.h"
#include "tests/nix_api_expr.hh"
#include "tests/string_callback.hh"
#include "nix/tests/nix_api_expr.hh"
#include "nix/tests/string_callback.hh"
#include "gmock/gmock.h"
#include <gmock/gmock.h>
#include <cstddef>
#include <cstdlib>
#include <gtest/gtest.h>

View file

@ -1,10 +1,10 @@
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "eval-settings.hh"
#include "memory-source-accessor.hh"
#include "nix/eval-settings.hh"
#include "nix/memory-source-accessor.hh"
#include "tests/libexpr.hh"
#include "nix/tests/libexpr.hh"
namespace nix {
class CaptureLogger : public Logger

View file

@ -1,7 +1,7 @@
#include <gtest/gtest.h>
#include <gmock/gmock.h>
#include "search-path.hh"
#include "nix/search-path.hh"
namespace nix {

View file

@ -1,4 +1,4 @@
#include "tests/libexpr.hh"
#include "nix/tests/libexpr.hh"
namespace nix {
// Testing of trivial expressions

View file

@ -2,9 +2,9 @@
#include <gtest/gtest.h>
#include <rapidcheck/gtest.h>
#include "tests/path.hh"
#include "tests/libexpr.hh"
#include "tests/value/context.hh"
#include "nix/tests/path.hh"
#include "nix/tests/libexpr.hh"
#include "nix/tests/value/context.hh"
namespace nix {

View file

@ -1,7 +1,7 @@
#include "tests/libexpr.hh"
#include "nix/tests/libexpr.hh"
#include "value.hh"
#include "print.hh"
#include "nix/value.hh"
#include "nix/print.hh"
namespace nix {

View file

@ -1,6 +1,6 @@
#include "value.hh"
#include "nix/value.hh"
#include "tests/libstore.hh"
#include "nix/tests/libstore.hh"
namespace nix {

View file

@ -1,5 +1,5 @@
#include "attr-path.hh"
#include "eval-inline.hh"
#include "nix/attr-path.hh"
#include "nix/eval-inline.hh"
namespace nix {

View file

@ -1,5 +1,5 @@
#include "attr-set.hh"
#include "eval-inline.hh"
#include "nix/attr-set.hh"
#include "nix/eval-inline.hh"
#include <algorithm>

View file

@ -1,11 +1,11 @@
#include "users.hh"
#include "eval-cache.hh"
#include "sqlite.hh"
#include "eval.hh"
#include "eval-inline.hh"
#include "store-api.hh"
#include "nix/users.hh"
#include "nix/eval-cache.hh"
#include "nix/sqlite.hh"
#include "nix/eval.hh"
#include "nix/eval-inline.hh"
#include "nix/store-api.hh"
// Need specialization involving `SymbolStr` just in this one module.
#include "strings-inline.hh"
#include "nix/strings-inline.hh"
namespace nix::eval_cache {

View file

@ -1,6 +1,6 @@
#include "eval-error.hh"
#include "eval.hh"
#include "value.hh"
#include "nix/eval-error.hh"
#include "nix/eval.hh"
#include "nix/value.hh"
namespace nix {

View file

@ -1,9 +1,9 @@
#include "error.hh"
#include "environment-variables.hh"
#include "eval-settings.hh"
#include "config-global.hh"
#include "serialise.hh"
#include "eval-gc.hh"
#include "nix/error.hh"
#include "nix/environment-variables.hh"
#include "nix/eval-settings.hh"
#include "nix/config-global.hh"
#include "nix/serialise.hh"
#include "nix/eval-gc.hh"
#if HAVE_BOEHMGC

View file

@ -1,8 +1,8 @@
#include "users.hh"
#include "globals.hh"
#include "profiles.hh"
#include "eval.hh"
#include "eval-settings.hh"
#include "nix/users.hh"
#include "nix/globals.hh"
#include "nix/profiles.hh"
#include "nix/eval.hh"
#include "nix/eval-settings.hh"
namespace nix {

View file

@ -1,24 +1,25 @@
#include "eval.hh"
#include "eval-settings.hh"
#include "primops.hh"
#include "print-options.hh"
#include "exit.hh"
#include "types.hh"
#include "util.hh"
#include "store-api.hh"
#include "derivations.hh"
#include "downstream-placeholder.hh"
#include "eval-inline.hh"
#include "filetransfer.hh"
#include "function-trace.hh"
#include "profiles.hh"
#include "print.hh"
#include "filtering-source-accessor.hh"
#include "memory-source-accessor.hh"
#include "gc-small-vector.hh"
#include "url.hh"
#include "fetch-to-store.hh"
#include "tarball.hh"
#include "nix/eval.hh"
#include "nix/eval-settings.hh"
#include "nix/primops.hh"
#include "nix/print-options.hh"
#include "nix/exit.hh"
#include "nix/types.hh"
#include "nix/util.hh"
#include "nix/store-api.hh"
#include "nix/derivations.hh"
#include "nix/downstream-placeholder.hh"
#include "nix/eval-inline.hh"
#include "nix/filetransfer.hh"
#include "nix/function-trace.hh"
#include "nix/profiles.hh"
#include "nix/print.hh"
#include "nix/filtering-source-accessor.hh"
#include "nix/memory-source-accessor.hh"
#include "nix/gc-small-vector.hh"
#include "nix/url.hh"
#include "nix/fetch-to-store.hh"
#include "nix/tarball.hh"
#include "parser-tab.hh"
#include <algorithm>
@ -38,7 +39,7 @@
# include <sys/resource.h>
#endif
#include "strings-inline.hh"
#include "nix/strings-inline.hh"
using json = nlohmann::json;

View file

@ -1,5 +1,5 @@
#include "function-trace.hh"
#include "logging.hh"
#include "nix/function-trace.hh"
#include "nix/logging.hh"
namespace nix {

View file

@ -1,8 +1,8 @@
#include "get-drvs.hh"
#include "eval-inline.hh"
#include "derivations.hh"
#include "store-api.hh"
#include "path-with-outputs.hh"
#include "nix/get-drvs.hh"
#include "nix/eval-inline.hh"
#include "nix/derivations.hh"
#include "nix/store-api.hh"
#include "nix/path-with-outputs.hh"
#include <cstring>
#include <regex>

View file

@ -1,7 +1,7 @@
#pragma once
///@file
#include "eval.hh"
#include "nix/eval.hh"
#include <string>
#include <map>

View file

@ -1,8 +1,8 @@
#pragma once
///@file
#include "nixexpr.hh"
#include "symbol-table.hh"
#include "nix/nixexpr.hh"
#include "nix/symbol-table.hh"
#include <algorithm>

View file

@ -1,9 +1,9 @@
#pragma once
///@file
#include "sync.hh"
#include "hash.hh"
#include "eval.hh"
#include "nix/sync.hh"
#include "nix/hash.hh"
#include "nix/eval.hh"
#include <functional>
#include <variant>

View file

@ -1,7 +1,7 @@
#pragma once
#include "error.hh"
#include "pos-idx.hh"
#include "nix/error.hh"
#include "nix/pos-idx.hh"
namespace nix {

View file

@ -1,10 +1,10 @@
#pragma once
///@file
#include "print.hh"
#include "eval.hh"
#include "eval-error.hh"
#include "eval-settings.hh"
#include "nix/print.hh"
#include "nix/eval.hh"
#include "nix/eval-error.hh"
#include "nix/eval-settings.hh"
namespace nix {

View file

@ -1,8 +1,8 @@
#pragma once
///@file
#include "config.hh"
#include "source-path.hh"
#include "nix/config.hh"
#include "nix/source-path.hh"
namespace nix {

View file

@ -1,20 +1,20 @@
#pragma once
///@file
#include "attr-set.hh"
#include "eval-error.hh"
#include "types.hh"
#include "value.hh"
#include "nixexpr.hh"
#include "symbol-table.hh"
#include "config.hh"
#include "experimental-features.hh"
#include "position.hh"
#include "pos-table.hh"
#include "source-accessor.hh"
#include "search-path.hh"
#include "repl-exit-status.hh"
#include "ref.hh"
#include "nix/attr-set.hh"
#include "nix/eval-error.hh"
#include "nix/types.hh"
#include "nix/value.hh"
#include "nix/nixexpr.hh"
#include "nix/symbol-table.hh"
#include "nix/config.hh"
#include "nix/experimental-features.hh"
#include "nix/position.hh"
#include "nix/pos-table.hh"
#include "nix/source-accessor.hh"
#include "nix/search-path.hh"
#include "nix/repl-exit-status.hh"
#include "nix/ref.hh"
#include <map>
#include <optional>
@ -944,4 +944,4 @@ bool isAllowedURI(std::string_view uri, const Strings & allowedPaths);
}
#include "eval-inline.hh"
#include "nix/eval-inline.hh"

View file

@ -1,7 +1,7 @@
#pragma once
///@file
#include "eval.hh"
#include "nix/eval.hh"
#include <chrono>

View file

@ -2,7 +2,7 @@
#include <boost/container/small_vector.hpp>
#include "value.hh"
#include "nix/value.hh"
namespace nix {

View file

@ -1,8 +1,8 @@
#pragma once
///@file
#include "eval.hh"
#include "path.hh"
#include "nix/eval.hh"
#include "nix/path.hh"
#include <string>
#include <map>

View file

@ -1,7 +1,7 @@
#pragma once
///@file
#include "error.hh"
#include "nix/error.hh"
#include <string>

View file

@ -0,0 +1,37 @@
# Public headers directory
include_dirs = [include_directories('..')]
config_h = configure_file(
configuration : configdata,
output : 'config-expr.hh',
)
headers = [config_h] + files(
'attr-path.hh',
'attr-set.hh',
'eval-cache.hh',
'eval-error.hh',
'eval-gc.hh',
'eval-inline.hh',
'eval-settings.hh',
'eval.hh',
'function-trace.hh',
'gc-small-vector.hh',
'get-drvs.hh',
'json-to-value.hh',
# internal: 'lexer-helpers.hh',
'nixexpr.hh',
'parser-state.hh',
'primops.hh',
'print-ambiguous.hh',
'print-options.hh',
'print.hh',
'repl-exit-status.hh',
'search-path.hh',
'symbol-table.hh',
'value-to-json.hh',
'value-to-xml.hh',
'value.hh',
'value/context.hh',
)

View file

@ -4,10 +4,10 @@
#include <map>
#include <vector>
#include "value.hh"
#include "symbol-table.hh"
#include "eval-error.hh"
#include "pos-idx.hh"
#include "nix/value.hh"
#include "nix/symbol-table.hh"
#include "nix/eval-error.hh"
#include "nix/pos-idx.hh"
namespace nix {

View file

@ -3,7 +3,7 @@
#include <limits>
#include "eval.hh"
#include "nix/eval.hh"
namespace nix {

View file

@ -1,7 +1,7 @@
#pragma once
///@file
#include "eval.hh"
#include "nix/eval.hh"
#include <tuple>
#include <vector>

View file

@ -1,6 +1,6 @@
#pragma once
#include "value.hh"
#include "nix/value.hh"
namespace nix {

View file

@ -9,8 +9,8 @@
#include <iostream>
#include "fmt.hh"
#include "print-options.hh"
#include "nix/fmt.hh"
#include "nix/print-options.hh"
namespace nix {

View file

@ -3,8 +3,8 @@
#include <optional>
#include "types.hh"
#include "comparator.hh"
#include "nix/types.hh"
#include "nix/comparator.hh"
namespace nix {

Some files were not shown because too many files have changed in this diff Show more