Skip to content
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

Make the verbose-mode ("-v") UI the default UI for src action exec #224

Closed
mrnugget opened this issue Jun 10, 2020 · 2 comments · Fixed by #228
Closed

Make the verbose-mode ("-v") UI the default UI for src action exec #224

mrnugget opened this issue Jun 10, 2020 · 2 comments · Fixed by #228
Assignees
Labels
action-exec Everything related to the action exec functionality team/code-search
Milestone

Comments

@mrnugget
Copy link
Contributor

After #223 and #118 we decided that we should remove the default UI and switch to the verbose-mode UI of src action exec by default.

The reason for that is that the currently-default UI has a big limitation we can't overcome: it only shows as many repositories as you have lines in the terminal. If you have less lines, we can't show you better progress.

@mrnugget mrnugget added the action-exec Everything related to the action exec functionality label Jun 10, 2020
@joshuabezaleel
Copy link

Hi @mrnugget , I don't know if this is the right issue to ask for the first question but I hope it would be okay with you:

  1. I found from this doc that there are src actions exec (plural on action) and src action exec. Are they referring to different features?
  2. For this particular issue, would it be okay to just override the value of *verbose to true in the beginning of the handler creation?

Thank you very much in advance 🙂

@mrnugget
Copy link
Contributor Author

  1. I found from this doc that there are src actions exec (plural on action) and src action exec. Are they referring to different features?

Yep. They're aliases:

flagSet := flag.NewFlagSet("actions", flag.ExitOnError)
handler := func(args []string) error {
actionsCommands.run(flagSet, "src actions", usage, args)
return nil
}
// Register the command.
commands = append(commands, &command{
flagSet: flagSet,
aliases: []string{"action"},

For this particular issue, would it be okay to just override the value of *verbose to true in the beginning of the handler creation?

No. Verbose should still be available — to have an effect now or in the future. The UI should simply not be dependent on the verbose flag.

Off the top of my head, I think the first step would be to remove this and the whole terminal UI:

https://github.com/sourcegraph/src-cli/blob/master/cmd/src/actions_exec.go#L256-L258

Then we want the actionLogger to output progress without the -v flag, which means we need to remove the if a.verbose checks here:

https://github.com/sourcegraph/src-cli/blob/master/cmd/src/actions_exec_logger.go

@mrnugget mrnugget self-assigned this Jun 22, 2020
mrnugget added a commit that referenced this issue Jun 22, 2020
@mrnugget mrnugget added this to the 3.18 milestone Jun 22, 2020
mrnugget added a commit that referenced this issue Jun 22, 2020
* Replace terminal UI with logger-based UI

This fixes #224.

* Add reference to PR to changelog
scjohns pushed a commit that referenced this issue Apr 24, 2023
* Replace terminal UI with logger-based UI

This fixes #224.

* Add reference to PR to changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action-exec Everything related to the action exec functionality team/code-search
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants