-
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nixd: refactor into library-like structure (#387)
- Loading branch information
Showing
36 changed files
with
91 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
nixd/tools/nixd/src/NixTU.h → nixd/include/nixd/Controller/NixTU.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
nixd/nix-node-eval/src/EvalProvider.h → nixd/include/nixd/Eval/EvalProvider.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 2 additions & 3 deletions
5
nixd/tools/nixd/src/EvalClient.cpp → nixd/lib/Controller/EvalClient.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 3 additions & 4 deletions
7
nixd/tools/nixd/src/Support.cpp → nixd/lib/Controller/Support.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
nixd/tools/nixd/src/TextDocumentSync.cpp → nixd/lib/Controller/TextDocumentSync.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
nixd/libutil/src/AutoCloseFD.cpp → nixd/lib/Support/AutoCloseFD.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#include "nixd/util/AutoCloseFD.h" | ||
#include "nixd/Support/AutoCloseFD.h" | ||
|
||
#include <unistd.h> | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
nixd/libutil/src/AutoRemoveShm.cpp → nixd/lib/Support/AutoRemoveShm.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#include "nixd/util/AutoRemoveShm.h" | ||
#include "nixd/Support/AutoRemoveShm.h" | ||
|
||
namespace nixd::util { | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
nixd/libutil/src/ForkPiped.cpp → nixd/lib/Support/ForkPiped.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#include "nixd/util/ForkPiped.h" | ||
#include "nixd/Support/ForkPiped.h" | ||
|
||
#include <cerrno> | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,61 @@ | ||
subdir('librpc') | ||
subdir('libutil') | ||
subdir('nix-node-eval') | ||
subdir('tools') | ||
libnixd_include = include_directories('include') | ||
|
||
libnixd_deps = [ nixd_lsp_server, nixf, llvm, nixt ] | ||
|
||
libnixd_lib = library( | ||
'nixd', | ||
'lib/Controller/CodeAction.cpp', | ||
'lib/Controller/Convert.cpp', | ||
'lib/Controller/Diagnostics.cpp', | ||
'lib/Controller/EvalClient.cpp', | ||
'lib/Controller/Hover.cpp', | ||
'lib/Controller/LifeTime.cpp', | ||
'lib/Controller/Support.cpp', | ||
'lib/Controller/TextDocumentSync.cpp', | ||
'lib/Eval/EvalProvider.cpp', | ||
'lib/Protocol/Protocol.cpp', | ||
'lib/Support/AutoCloseFD.cpp', | ||
'lib/Support/AutoRemoveShm.cpp', | ||
'lib/Support/ForkPiped.cpp', | ||
dependencies: libnixd_deps, | ||
include_directories: libnixd_include, | ||
install: true | ||
) | ||
|
||
libnixd = declare_dependency( | ||
include_directories: libnixd_include, | ||
link_with: libnixd_lib, | ||
dependencies: libnixd_deps | ||
) | ||
|
||
nixd = executable( | ||
'nixd', | ||
'tools/nixd.cpp', | ||
install: true, | ||
dependencies: libnixd | ||
) | ||
|
||
regression_env = environment() | ||
|
||
regression_env.append('PATH', meson.current_build_dir()) | ||
regression_env.set('MESON_BUILD_ROOT', meson.current_build_dir()) | ||
|
||
if lit.found() | ||
test( | ||
'regression/nixd', | ||
lit, | ||
env: regression_env, | ||
args: [ | ||
'-vv', | ||
meson.current_source_dir() + '/tools/nixd/test' | ||
], | ||
depends: [ nixd ] ) | ||
endif | ||
|
||
|
||
nix_node_eval = executable( | ||
'nix-node-eval', | ||
'tools/nix-node-eval.cpp', | ||
install: true, | ||
dependencies: libnixd | ||
) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
#include "EvalProvider.h" | ||
#include "nixd/Eval/EvalProvider.h" | ||
|
||
#include <lspserver/Connection.h> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.