jade
b62cc7b361
Context: we have include paths that are "types.hh" and similarly common
names. We currently have these compatibly available as
"lix/libutil/types.hh" externally but *not yet internally*. This is
because we don't have any way for the src directory to appear as
`"lix/"` from inside of Lix: the lix/ include directory is created by
the install process.
The goal of this whole thing is to make it clearer which component of
Lix that files are a part of, which should hopefully help at least a
little bit to new developers. One disadvantage of un-mixing these is
that it will cause some API changes if we ever move a file between
libraries, but that is not very common, and we don't care that much
about external API users.
This was planned for a while and is why we have a FixIncludes check to
begin with.
Personally I don't see a great benefit in rearranging our source code,
and in fact, it would probably be counterproductive:
- Moving the includes into a separate `include/` directory would just
make developers have to deal with more directories, when we can
already generate the desired layout through the build process.
- This would also decouple the .cc and .hh files which currently
conventionally have each others' definitions and declarations
respectively, right next to each other, making it easier for them to
feel decoupled and diverge.
Content: Add ../include as an include directory so that lix/ in include
paths will resolve to src/ within Lix itself, just as it does externally
today. This prepares for a further series of commits applying the actual
change to each library one-by-one by accepting both include versions at
once.
This could have been done with ../ and a symlink called lix, but we
would like to not accept libexpr/foo.hh internally for it would be
broken externally, so we need an otherwise empty directory for the
include.
Change-Id:
|
||
---|---|---|
.. | ||
.gitkeep | ||
allowsubstitutes-errors.md | ||
alt-left-and-alt-right-in-repl.md | ||
content-encodings.md | ||
ctrl-c-improved.md | ||
deprecated-features.md | ||
download-protocols.md | ||
fetchGit-regression.md | ||
http-proxy-for-s3.md | ||
include-rearrangement.md | ||
interactive-nix.conf-overrides.md | ||
libstore-random.md | ||
nix-build-out-link.md | ||
nix-fmt-default-argument.md | ||
pytest-suite.md | ||
readline-support-removed.md | ||
relative-and-tilde-paths-in-config.md | ||
remove-mono-coreutils-dependency.md | ||
report-differing-outputs.md | ||
ssl-cert-symlink.md | ||
stack-traces.md | ||
temp-dir.md | ||
verify-tls.md | ||
x-github-api-header.md |