nixd
|
See our "issues" page. And some issues are marked with good first issue. Such issues are intentially left for new contributors. i.e. main developers usasually won't touch them, and there are some detailed instructions about how to do.
Please comment on that issue so that it can be assigned to you, to avoid any duplicated work in the community.
Clone this project and cd
into the cloned repoistory.
Enter the development shell, using
Tip: use
direnv
& the vscode extension (direnv) + clangd, gives you IDE experience in vsocde Writeecho "use flake" >> .envrc
should be sufficient for basic setup.
Then configure the project, using meson.
--buildtype=debug
is suitable for most developers.--prefix=
is used for non-privileged installation[^prefix-ignore].--default-library=static
enable static linking for libnixf
, libnixt
, ... thus you can avoid RPATH issues in custom installation prefix.-Dwerror=true
to make sure you can pass nixd CI (we enable Werror in testing env).[^prefix-ignore]: after the installation, your worktree is tidy. A trick to resolve this is: echo "local" >> .git/info/exclude
.
Finally, invoke
And
Then you can lauch an editor to quick test nixd, under local/install/bin
.
nixd
cannot be properly launched from "build" directory (i.e. it requires installation for editor testing).To run unit/regression test, invoke:
Remember to make sure unit/regression tests are passing before submiting PRs!
Happy hacking!
TLDR: Evaluation is not memory-safe and must be performed in a separeted address space.
In the context of the Nix language, laziness refers to the evaluation strategy where expressions are not immediately evaluated when they are encountered, but rather when their values are actually needed. This means that the evaluation of an expression is deferred until it is required to produce a result.
One consequence of lazy evaluation is the potential for circular references or circular dependencies.
Our upstream C++ nix uses a garbage collector and never actively free used memories. Thus all evaluators should be used in "worker" processes.
This project is tested by "unit tests" and "regression tests".
Regression tests are written in markdown, and directly execute the compiled binary. Unit tests are used for testing class interfaces, mostly public methods.
Nixd regression tests could be found at here.
Our git history is semi-linear. That is, firstly we rebase a branch on the top of the mainline, then merge it with --no-ff
.
Our continuous integration systems will enable several sanitizer options to detect data race and undefined behavior in our codebase.
Please add or modify tests for your changed files (with all branches coveraged) and ensure that all tests can pass with sanitizers enabled.
Commit messages are formatted with:
This is not strict for contributors, feel free to write your own stuff.