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

Wait for terminal initialization for CodeChecker log command #54

Merged
merged 1 commit into from
Jan 27, 2022

Conversation

csordasmarton
Copy link
Contributor

Closes #50

Wait some time until the terminal is initialized properly when getting CodeChecker log command.

For now there is no elegant solution for this problem than to wait some time by using setTimeout function.

Wait some time until the terminal is initialized properly when getting
`CodeChecker log` command.

For now there is no elegant solution for this problem than to wait some
time by using `setTimeout` function.
@csordasmarton csordasmarton added this to the 1.0.1 milestone Jan 26, 2022
@Discookie
Copy link
Collaborator

Another possible workaround can be to send a dummy newline before the command with terminal.sendText('');, but I don't have the environment to test that.

Copy link
Collaborator

@Discookie Discookie left a comment

Choose a reason for hiding this comment

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

Other than testing the extra newline, the rest LGTM.

@csordasmarton
Copy link
Contributor Author

Your proposed solution is not working properly. My terminal will look like this:

~/CodeChecker/bin/CodeChecker log --output "/home/username/compile_commands.json" --build "make"direnv: loading ../.envrc
csordasmarton@0000 ~/helloworld $ 
csordasmarton@0000 ~/helloworld $ ~/CodeChecker/bin/CodeChecker log --output "/home/username/compile_commands.json" --build "make"

So the CodeChecker log command is printed twice.

With my solution we will wait until the terminal is initialized and it will print the command only once. So the terminal will look like this:

direnv: loading ../.envrc
csordasmarton@0000 ~/helloworld $ ~/CodeChecker/bin/CodeChecker log --output "/home/username/compile_commands.json" --build "make"

Copy link
Collaborator

@Discookie Discookie left a comment

Choose a reason for hiding this comment

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

Worth a shot at least - hopefully Code adds some kind of syncing mechanism in the future.
Otherwise, LGTM!

@Discookie Discookie merged commit f6e0031 into Ericsson:main Jan 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CodeChecker generated log command is mixed up in the terminal
2 participants