Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ashelkovnykov
Copy link
Collaborator

Partially Resolves #197

Adds the --cue option to the eval utility. This allows jammed nouns to be passed over stdin and pretty-printed to stdout.

Also includes a sub-option which will expect the incoming jammed noun to be Khan output. If the thread resulted in a goof, it's pretty-printed to stderr as a stack trace and the output is simply the conn.c header info (unique ID, %avow mark signalling Khan output, %.n loobean signalling thread failure).

Also includes the "todo"s from the comments for #155.

Testing:

  • Built Vere in debug mode; no new warnings introduced
  • Manually ran the following test cases in the terminal:
echo '42' | ~/Urbit/urbit eval -jn | ~/Urbit/urbit eval -cn
echo '[[1 2] [3 4]]' | ~/Urbit/urbit eval -jn | ~/Urbit/urbit eval -cn
echo "(cat 3 'abc' 'def')" | ~/Urbit/urbit eval -jn | ~/Urbit/urbit eval -cn
  • I've done more strenuous testing, but it's hard to explicitly list here since it relies on a thin client which will be committed as a separate PR after this one is merged

Not strictly necessary for this PR, but I would like to add explicit testing for both --jam and --cue. @mcevoypeter @matthew-levan If either of you can recommend how to modify Bazel to do so, it would be appreciated.

@ashelkovnykov ashelkovnykov requested a review from a team as a code owner February 23, 2023 19:14
@mcevoypeter
Copy link

Not strictly necessary for this PR, but I would like to add explicit testing for both --jam and --cue. @mcevoypeter @matthew-levan If either of you can recommend how to modify Bazel to do so, it would be appreciated.

For testing the behavior of the command line application itself, I think the best way to do this is by writing a shell script that invokes --jam and --cue and compares the generated output to the expected output. We can then wrap that shell script in a sh_test target in Bazel.

mcevoypeter
mcevoypeter previously approved these changes Feb 28, 2023
mcevoypeter
mcevoypeter previously approved these changes Mar 1, 2023
@jalehman
Copy link

jalehman commented Mar 1, 2023

When @joemfb removes his changes requested we'll reconsider merging this. For now, looks like this is still under deliberation.

Copy link
Collaborator

@joemfb joemfb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will do (with a caveat about the newt usage pattern)

@ashelkovnykov ashelkovnykov merged commit f20e238 into urbit:develop Mar 9, 2023
@ashelkovnykov ashelkovnykov deleted the cue branch March 11, 2023 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Khan/Conn: Working client for sending commands and returning output to an urbit from outside of it.

5 participants