Skip to content
This repository has been archived by the owner on Dec 8, 2020. It is now read-only.

Don't show the output channel if checking is an action on save #133

Merged
merged 5 commits into from
Mar 2, 2017

Conversation

KalitaAlexey
Copy link
Member

@KalitaAlexey KalitaAlexey commented Mar 1, 2017

This PR changes how the extension behave when checking (Cargo: Check) is executed because the user set "rust.actionOnSave" to "check".
Before the PR the output channel was opened if the user hadn't set "rust.showOutput" to false.
After the PR the output channel will not be opened.
It is breaking change, but I think it is the behavior we all expect.

Fixes #129

@KalitaAlexey
Copy link
Member Author

@sinkuu @redactedscribe,
What do you think about it?

@redactedscribe
Copy link
Contributor

redactedscribe commented Mar 1, 2017

@KalitaAlexey I have no problem with this change. Using "rust.executeCargoCommandInTerminal": true provides more detailed compiler messages than the Output channel anyway.

It also might be a good idea to improve the comment above the rust.showOutput configuration parameter, for example, rust.showOutput has no effect when "rust.executeCargoCommandInTerminal": true. Detailing that build and check do not affect rust.showOutput may be needed also. This information should be in the documentation, but good comments will avoid the need to read through docs for those simple answers.

@KalitaAlexey
Copy link
Member Author

@redactedscribe,
Don't we have that it the documentation?

@redactedscribe
Copy link
Contributor

@KalitaAlexey The docs do not say that rust.showOutput only functions under certain conditions.

Maybe better than commenting finer details about each configuration parameter in the settings file, you could write "See documentation for details" on params that have certain conditions for them to work.

@KalitaAlexey
Copy link
Member Author

@redactedscribe,
Okay. I will do that before merging the PR.

@KalitaAlexey
Copy link
Member Author

@redactedscribe,
Can you describe that in the documentation?
You have access to the branch.

@redactedscribe
Copy link
Contributor

@KalitaAlexey I will tomorrow.


## Configuration Parameters

### Show Output

The `"rust.showOutput"` configuration parameter controls whether the output channel should be shown when [a cargo command is started executing](../cargo_command_execution.md).
The `"rust.showOutput"` configuration parameter controls whether the Output channel should be shown when [a Cargo command starts executing](../cargo_command_execution.md). All Cargo command other than `build` and `check` trigger this event.
Copy link
Member Author

Choose a reason for hiding this comment

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

Why capital O in Output?


## Configuration Parameters

### Show Output

The `"rust.showOutput"` configuration parameter controls whether the output channel should be shown when [a cargo command is started executing](../cargo_command_execution.md).
The `"rust.showOutput"` configuration parameter controls whether the Output channel should be shown when [a Cargo command starts executing](../cargo_command_execution.md). All Cargo command other than `build` and `check` trigger this event.
Copy link
Member Author

Choose a reason for hiding this comment

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

Replace all with any or add s to command.
Actually the PR make different other than you are describing.
I am going to write what the PR does.


However, it may be changed.
### Executing Cargo commands in the integrated temrinal
Copy link
Member Author

Choose a reason for hiding this comment

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

Typo: te mr inal

Copy link
Member Author

Choose a reason for hiding this comment

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

Why the?

Copy link
Contributor

@redactedscribe redactedscribe Mar 2, 2017

Choose a reason for hiding this comment

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

I will replace the with a if it makes more sense. Will fix typo.

Copy link
Member Author

Choose a reason for hiding this comment

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

@redactedscribe,
We talking about any integrated terminal, not about the only specific terminal.


Unfortunately, there is no way to parse output of an integrated terminal.
By default, the extension executes a Cargo command as a child process. It then parses the output of the command and publishes diagnostics. This is useful if you need to run a binary and enter some text.
Copy link
Member Author

Choose a reason for hiding this comment

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

Replace This is useful with Executing Cargo command in an integrated terminal is useful.
Why do you write a Cargo? I thought the correct variant was "Cargo" because it is the tool's name.

Copy link
Contributor

Choose a reason for hiding this comment

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

It's either "Executing a Cargo command…" or "Executing Cargo commands…". It doesn't sound right without the a or plural.

Copy link
Member Author

Choose a reason for hiding this comment

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

@redactedscribe,
I don't mind to keep a Cargo, but replace how I suggested This is useful.

@KalitaAlexey
Copy link
Member Author

@redactedscribe,
I have changed the PR's description.

@redactedscribe
Copy link
Contributor

@KalitaAlexey Do I need to mention anything about the build action on save? Your PR does not mention that.

Copy link
Member Author

@KalitaAlexey KalitaAlexey left a comment

Choose a reason for hiding this comment

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

A few minor questions.


The possible values:

* `true` - the output channel should be shown
* `false` - the output channel shouldn't be shown

When `"rust.executeCargoCommandInTerminal"` is set to `true`, `"rust.showOutput"` has no effect.
The output channel will not be shown under the following conditions:
Copy link
Member Author

Choose a reason for hiding this comment

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

For me, as not native speaker, it is ambiguous if the output channel will not be shown if all the conditions are met or at least one.

Copy link
Contributor

Choose a reason for hiding this comment

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

Good point.

- `"rust.executeCargoCommandInTerminal"` is set to `true`
- `"rust.actionOnSave"` is set to `"check"`

### Executing Cargo commands in a integrated terminal
Copy link
Member Author

Choose a reason for hiding this comment

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

Shouldn't that be an instead of a?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yep, you are correct, Sorry, I am tired today.


The `"rust.executeCargoCommandInTerminal"` configuration parameter controls whether [a Cargo command should be executed](../cargo_command_execution.md) in an integrated terminal.

By default, the extension executes a Cargo command as a child process. It then parses the output of the command and publishes diagnostics. This is useful if you need to run a binary and enter some text.
By default, the extension executes Cargo commands as a child process. It then parses the output of the command and publishes diagnostics. Executing Cargo commands in an integrated terminal is useful if you need to run a binary and enter some text.
Copy link
Member Author

Choose a reason for hiding this comment

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

For me it sounds weird Cargo commands as a child process.
How about you?

Copy link
Contributor

Choose a reason for hiding this comment

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

It should be better now.

@KalitaAlexey
Copy link
Member Author

Good. Thanks.

@KalitaAlexey KalitaAlexey merged commit 15a4c55 into master Mar 2, 2017
@KalitaAlexey KalitaAlexey deleted the fix-129 branch March 2, 2017 13:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants