-
Notifications
You must be signed in to change notification settings - Fork 40
Document and build daemon CLIs for debugging #198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
v6/jbuild
Outdated
|
|
||
| (alias | ||
| ((name runtest) | ||
| (deps (v6_cli.exe)))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't make sense. Is it actually used in the tests?
You can build it already using the executable sexp that you added in line 43 by doing jbuilder build v6/v6_cli.exe and run it with _build/default/v6/v6_cli.exe (and soon with jbuilder exec ./v6/v6_cli.exe)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Can I just say that is possibly the fastest response to a PR I've ever had?]
I just checked, and you are correct! The difference is that including these lines tells make test to build v6_cli.exe, whereas without, it currently builds the following:
lib/channel_helper.exe
lib_test/test.exe
memory/memory_cli.exe
example/example.exe
I think the question is: do we want to include the daemon CLIs for make test, or have them explicitly built? If the former, we probably shouldn't build the squeezed CLI either, and if the latter, we should perhaps document the CLI a little more explicitly on our side so devs know about it. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we discussed, let's remove all of them, and let's run the example in the tests.
v6/jbuild
Outdated
| go ic "" | ||
|
|
||
| let rewriters_ppx = ["ppx_deriving_rpc"; "ppx_sexp_conv"] | ||
| let rewriters_ppx = ["ppx_deriving_rpc" ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't really sure about removing ppx_sexp_conv, but it's not used in the squeezed jbuild, and I was able to locally build all v6 executables without any issue after removing this. Please let me know if it needs to be included.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's fine, thanks for the cleanup
| rpclib.cmdliner | ||
| rpclib.markdown | ||
| xcp.v6)))) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if there's a more succinct way to include rules for v6_cli, this is just based on the squeezed jbuild and how it builds memory_cli.exe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can create aliases, but it's not worth. Let's get rid of those empty runtests and add a section in the readme about the debugging cli tools that you can build
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The empty runtests were there to check that the examples/clis can be built even if not installed, my worry was is that if we don't build them they'll bitrot and when we do want to use them they won't work anymore. There's probably a nicer way to do that than using runtest though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I imagined something like that, but I'd rather add a post-install-hook to run jbuilder build for them, eventually adding an alias for it, like @clitools or something else
README.md
Outdated
| * RPCs | ||
| 3. The following CLI tools for debugging: | ||
| * lib/channel_helper.exe -- a channel passing helper CLI | ||
| * [A] lib_test/test.exe -- a test suite built from tests in lib_test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't put the test.exe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, it's not a CLI tool. I'll remove example.exe too.
README.md
Outdated
| * memory/memory_cli.exe -- a squeezed debugging CLI | ||
| * v6/v6_cli.exe -- a V6d debugging CLI | ||
|
|
||
| [A] - `make test` automatically builds and runs this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we don't need to mention this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this info is included anywhere else, since INSTALL.md just points to the README.md for "detailed build instructions". Might be worth including for the sake of completion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(This would be redundant if we removed references to test and example from the list of CLI tools.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, is it worth expanding on make test in INSTALL.md?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's outdated, I think we should remove it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove INSTALL.md or discussion of make test?
README.md
Outdated
| * v6/v6_cli.exe -- a V6d debugging CLI | ||
|
|
||
| [A] - `make test` automatically builds and runs this | ||
| For other executables, run `jbuilder build path/to/exec.exe` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add
and then run them with
_build/default/path/to/exec.exe.
|
Note: tests will not pass until xapi-project/xs-opam#215 is merged |
|
The build and tests now succeed, the failure is due to a broken |
mseri
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add cluster/cluster_cli.exe to the list of debugging CLI and then this can be merged
make test|
Can you please squash the commits and keep only two:
|
- add rules to build V6 CLI - `make test` no longer automatically builds CLI tools - `make test` automatically runs test and example executables Signed-off-by: Akanksha Mathur <[email protected]> Make test builds (and runs) only test and example executables Previously, the following executables were built by `make test` despite not being used in tests: ``` - lib/channel_helper.exe - lib_test/test.exe - memory/memory_cli.exe - example/example.exe [note: make test still runs this] ``` With this commit, `make test`: - still builds `example.exe` and `test.exe` - automatically runs `example.exe` and `test.exe` - no longer builds `memory_cli.exe` nor `channel_helper.exe` Note that all of these can still be individually built using `jbuilder build [path to .exe as listed above]` Signed-off-by: Akanksha Mathur <[email protected]> fixup! whitespace strip Signed-off-by: Akanksha Mathur <[email protected]>
Signed-off-by: Akanksha Mathur <[email protected]> Only list CLI tools in README, not all executables Remove references to `test.exe` or `example.exe` in list of CLI tools. Signed-off-by: Akanksha Mathur <[email protected]> Add cluster_cli to list of CLI tools Signed-off-by: Akanksha Mathur <[email protected]> Remove outdated INSTALL.md Signed-off-by: Akanksha Mathur <[email protected]>
Forgot to edit v6 jbuild to create v6_cli.exe, as well as updating
make testrules to include it.Note:
make teststill fails as it requires fixing Lwt_unix.bind.Update: this PR has changed in nature and now includes the following:
make testSigned-off-by: Akanksha Mathur [email protected]