Skip to content

[Fall 2021] Step 3: List running servers when pyre command is ambiguous #88

@onionymous

Description

@onionymous

Overview

Commands like pyre stop and pyre query should directly list out all running servers when the user doesn't run the command already cd'd into a directory or provide one explicitly with pyre -l.

Right now it prints

λ  my_folder  (8a600fe2b) pyre stop
ƛ Using unstable client. If you encounter issues, you can use the stable client via `export PYRE_CLIENT_RELEASE="stable"`.
ƛ No running Pyre server to stop.

We should list running servers like the current pyre servers command:

λ  my_folder  (8a600fe2b) pyre servers
ƛ Using unstable client. If you encounter issues, you can use the stable client via `export PYRE_CLIENT_RELEASE="stable"`.
Running Servers:

    PID  Global Root                      Relative Local Root    Version
-------  -------------------------------  ---------------------  ----------------------------------------
2947260  /home/my_folder                  tools/pyre             faf095772322e992aeeb382eac91202cdf52ee70

We can also prompt the user to specify a server. For example, right now for commands that don't imply a server is already running (pyre, pyre start), it lists out possible servers to start in recently-used local roots:

λ  my_folder  (8a600fe2b) pyre
ƛ Using unstable client. If you encounter issues, you can use the stable client via `export PYRE_CLIENT_RELEASE="stable"`.
ƛ No running Pyre server to stop.
ƛ Would you like to run the command with a local root?

Recently-used local roots:
0. tools/pyre [default]
1. my_folder/tools
Enter the number of the local root you want to use (`Enter` for the default; any other key to quit):

Otherwise, just warn the user to specify a specific server or use pyre init.

Code pointers

Documentation

Metadata

Metadata

Labels

Fall 2021Issues related to the Pysa project for MLH Fellowship cohort of Fall 2021step 3

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions