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

TPI: Fix Decoration Issue for Python REPL Terminal: Run Recent Command #22926

Closed
2 tasks done
anthonykim1 opened this issue Feb 16, 2024 · 1 comment
Closed
2 tasks done

Comments

@anthonykim1
Copy link

anthonykim1 commented Feb 16, 2024

Refs: #22811

Complexity: 3

Create Issue


Thank you in advance for testing this TPI.

Background Information

With allowing VS Code's Terminal: Run Recent Command for Python REPL users using MacOS and Linux, there was an issue where success/failure decoration for commands ran after the Terminal: Run Recent Command were inappropriately cached.
For example, running a Terminal: Run Recent Command that generated fail/red decoration and then trying to run successful command after that would have the decoration cached to the red failure state, instead of the correct/blue decoration.

Setup:

  1. Make sure you have Python installed in your computer.
  2. Make sure you did not turn off shell integration.

Steps:

  1. Open Python file. (aka. .py file)
  2. Write some Python code. (Ignore this step if you already have Python code in your previously set up Python file)
  3. Shift+enter on line with Python code and observe the code you just executed has been sent to Python REPL properly.
  4. Shift+enter on multiple times and send command to REPL, so we have much history to use for Terminal: Run Recent Command. Make effort to mix in code that would generate failure, thus red decoration for shell integration, and code that would generate success, thus blue decoration for shell integration.
  5. Run Terminal: Run Recent Command and select the line that lead to failure. Observe that code gets sent to REPL with red decoration.
  6. Try running successful Python command, and see if you get the correct/blue decoration.
  7. Try mixing successful, invalid code with Terminal:Run Recent Command to see whether you get appropriate decoration everytime.

@andreamah
Copy link

Great work! 👍

@andreamah andreamah removed their assignment Feb 20, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants