stinb / UnderstandForVSCode

VS Code extension for Understand
https://www.scitools.com
MIT License
1 stars 0 forks source link

Polish for release #2

Closed RobbyCBennett closed 3 months ago

RobbyCBennett commented 5 months ago
RobbyCBennett commented 5 months ago

@groke and @HeidiJoe I'm done with the coding part of this issue. I'm just waiting for the blue checkmark and also to publicize this repo.

RobbyCBennett commented 5 months ago

Okay. We are verified.

image

However, I just thought of another thing that probably should happen before a release. I've added it to the list.

RobbyCBennett commented 5 months ago

I don't know if I should spend the time to add "Automatically analyze all files or prompt on project config changed" right now. It seems that even Understand doesn't have a pop up for this when opening the project. It's just for when the GUI closes and it checks the config diff right there.

RobbyCBennett commented 5 months ago

@katescitools will you please test Understand for VS Code? It's an extension for VS Code. All of the features to test are in the README.md and lots of other info is there, like setup and FAQ.

  1. Install VS Code if you don't have it.
  2. Install this extension, which is the .vsix file in the releases. See this for installing from a .vsix file. Once we publicize it, it will be easier to install directly from the extensions marketplace.
RobbyCBennett commented 5 months ago

@groke I don't know if Kate has access to this repo right now.

groke commented 5 months ago

I've added the Understand team to this repo now.

katescitools commented 4 months ago

Hi @RobbyCBennett , I'm assuming that the test focuses only in VS Code and nothing in Understand since the Beta Release description mentioned that 'This plugin displays Understand errors, warnings, CodeCheck results, references, and hover information in VS Code.' Is that correct?

I installed VS Code and the understand.vsix in VS Code but I have some clarifications below. For example: (I put numbering so you can reply easily but below are just sample questions on my end as I'm not yet able to imagine the whole picture of this task)

  1. How do I test that 'Remove all right-click menu items that might not work' was done successfully? What are the right click menu items that were removed?
  1. Add all features to documentation

  2. Fix code action lightbulb on wrong line (actually, the lightbulb is supposed to be above, but the happens with left-clicking anywhere but the left of the token because the client is inconsistent with sending back diagnostics)

This is a sample of lightbulb I'm seeing in VS Code after installing the extension, is this what you're referring to? Note that I'm using the source code zip file from this: https://github.com/stinb/UnderstandForVSCode/releases/tag/v0.9.2-beta and fastgrep project to test this

I would appreciate if you can share any file you're using to work on this so we can have same reference as I'm not sure if the current project I'm using is enough to test this.

Curious too if we're strict with the lightbulb color as I can sometimes see yellow, sometimes blue camouflaging the code: image

image

  1. Make sure that references and others have commands
    • 4.1what commands are we referring to? Do we have a list for this? For example, here's a reference list I saw, what commands are we expecting here? image

This is what I sometimes see:

image

and this: (Curious if it's expected for the right context menu to be different depending on the project?) image

  1. Use setContext to make a new context called understandFile to narrow down available commands

    • Is this QA applicable for testing? Or only for developers hence out of scope for testing? If covered in testing, can you provide more info about setContext.
  2. Remove duplicate violations (https://github.com/stinb/sti/issues/3146)

    • I've not observed duplicate violations when I tested using Fastgrep project. Looks like this one is working fine.
  3. Wait for the verified blue checkmark on the marketplace (should be at latest Tuesday, Feb 6)

    • No verified blue mark on my end: (We're supposed to see it in the extension part of VS Code right? image
  4. Automatically analyze all files or prompt on database wrong version

    • should the automatic analysis start upon project opening? I'm not seeing one when I opened a new project. Also, do we have a way to know when it was last analyzed to confirm that it was indeed analyzed?
  5. Automatically analyze all files or prompt on project config changed

    • How is this happening? Is this about the analysis happening after I modify and save the changes?
    • This is what I'm seeing first upon opening fastgrep.und and I wasn't really able to see an analysis showing after opening the project:

image

  1. The feature in readme file is actually talking about this plugin understanding different languages. How exactly do we confirm that the plugin understood the language? Is it by automatically adding styles to it? Or should we expect something else? image

Or is this making sure that it is already connected to Understand?: image

RobbyCBennett commented 4 months ago

@katescitools Thanks for your thorough comment.

I would appreciate if you can share any file you're using to work on this so we can have same reference as I'm not sure if the current project I'm using is enough to test this.

Here are copies of some of the sample projects that I've already made and configured with some background CodeChecks. Once you have projects, VS Code is the only program that is needed to be opened.

Hi @RobbyCBennett , I'm assuming that the test focuses only in VS Code and nothing in Understand since the Beta Release description mentioned that 'This plugin displays Understand errors, warnings, CodeCheck results, references, and hover information in VS Code.' Is that correct?

Yes, the main part of this is to be done only in VS Code. However, under "Setup: Project Creation" in README.md, it says that projects need to be created and configured with CodeCheck outside of VS Code.

I'm not yet able to imagine the whole picture of this task.

Sorry that I wasn't very clear about what I wanted to be tested. I should have made a fresh issue to avoid confusion.

The checklist at the top of this issue was just intended for things for me to do to polish this product before releasing it. I just wanted you to test the features listed in the readme file. Here they are with simplified descriptions of the main things to look for.

Answers to the numbered questions:

Screenshot of status bar "Connected to the Understand language server and ready"

The reason that you see some of those in your first example is because you don't have a .und project and also because that's a markdown file. Some other extension has added those references to the markdown file. We don't support the markdown language. You see all 12 commands in regexp.h because there's a .und folder and C is a language we support.

katescitools commented 4 months ago

Thanks a lot for the info you provided, @RobbyCBennett ! You gave a very detailed information and I appreciate that a lot, really!!! :)

Kindly see below for the test continuation: Note that there are pending clarification/failed items as I need a confirmation if they are a valid bug or expected. :)

  1. I tried all the und projects you provided and they are all looking fine on my end when I opened them in the VS Code. However, I can only see 3 options when Understand is connected, I don't see the 'Explore Current File In Understand' option (FAILED)

Actual: image

Expected based on your screenshot: image

I'm also not sure if we're strict with the order they are shown. For example, on my end, Analyze is the first option for the user to see, but in your screenshot, I'm seeing 'Select .und projects' as the first option.

  1. See or Go To References (PENDING/ FAILED?)
    • definitions are observed (PASSED)
    • references (Peek/ Go to/ Side Bar) are observed, user is also able to navigate when there are multiple references shown (PASSED)
    • however, I can't see an example for declarations, implementations, and type definition... Do you have an example for this? I tried with different entities, data types but maybe I'm just not looking at the right thing. (PENDING/ FAILED?)

https://github.com/stinb/UnderstandForVSCode/assets/106690270/e79d599b-1766-443f-90cd-84db4b46304e

  1. See Hover Information (FAILED)
    • Hover information is available, however it's not the same as Understand's. It's just showing the entity itself in the hover info. It actually looks redundant since it's the same info seen in the editor: image

This is Understand's hover info using the same entity: image

  1. See Errors and Warnings (see error/warning squiggles, possibly with ignores/fixes with the lightbulb) (PENDING/ FAILED)
    • errors and warnings/ squiggles are observed with the lightbulb (PASSED)
    • Warnings from your selected CodeCheck is observed. Also tried modifying the codeCheck config and reopening the VS Code. It's reflecting the modified config after reopening and violations were shown accordingly. (PASSED)
    • Detailed descriptions of CodeCheck violations are observed. (PASSED)
    • Violations are observed available in the editor, file explorer [side bar] and problems [panel]. (PASSED)
    • ignore option is available, however is it expected for the ignore option to be selected multiple times? It looks like there was nothing ignored since there's still the squiggle and fix it /ignore option. See clip below: (PENDING/ FAILED)

https://github.com/stinb/UnderstandForVSCode/assets/106690270/90099ce2-0e9f-4d10-8600-09991f96e8b8

  1. Quickly Analyze Your Code (analyze automatically on save or manually) (PASSED)

    • Automatic analysis is observed on save (PASSED)
    • Automatic analysis is observed when there's an .und project, user opens a code file, and the project has not been analyzed after the last change. @RobbyCBennett , I'm assuming this means that automatic analysis is not happening upon loading the und folder in VS Code, instead, it should automatically analyze once the code file is opened in the VS Code's editor. (PASSED)
    • Analysis is observed when the user manually clicks on Analyze All files or Analyze Change Files (PASSED)
  2. Explore in Understand (able to go into a file in Understand from VS Code) (PENDING/ FAILED)

    • @RobbyCBennett , I tried this using 2 scenarios. One with Understand closed before clicking the option 'explore in Understand', and one with Understand already opened. When Understand is closed, my screen is changing, I'm correctly being redirected to Understand and I can see the file accordingly. However when Understand is already opened, my screen that is currently in VS Code is not changing instead of showing me Understand. Only if I go to Understand manually will I be able to see the 'prompt' to switch projects or to see the file I used in VS Code. Is this a limitation from VS Code or can we get Understand to show always whenever we click 'explore in understand' option?
  3. Understand's command palette is observed with 12 commands. (PASSED)

PS. I followed the instructions you gave for the settings and that worked! Thank you!

RobbyCBennett commented 4 months ago
  1. The behavior is expected, but I'll fix the screenshot. I removed "Explore current file in Understand" from that menu because it doesn't work well for unresolved files, and I don't like having an inconsistent menu.

  2. Here are some examples. I'll fix this by adding some info into the readme.

    • Type Definition: In TheAlgorithms in the file TheAlgorithms/DataStructures/HashMap/Hashing/HashMap.java the object buckets has a type definition of LinkedList but hsize has no type definition because int is a primitive type.
    • Implementations: In TheAlgorithms in the file TheAlgorithms/DataStructures/DynamicArray/DynamicArray.java the type Iterable has 2 different implementing classes that we can see. There's also another one that's compressed and we don't currently show compressed files in VS Code.
    • Declaration: In FastGrep in the file regexp.c the function regcomp has a declaration in the header file regexp.h.
  3. That's currently the expected behavior. I made it that way to conform to how other language servers work, especially C/C++ ones. I agree that it looks redundant right there at the declaration/definition, but it actually is helpful elsewhere. However, I think that a user should be able to configure exactly what they see. I'll make an issue for this https://github.com/stinb/UnderstandForVSCode/issues/3.

  4. Right now, the user is supposed to analyze afterward. I see how confusing this is, so I'll add to the readme and add an issue to automatically analyze with ignores/fixes https://github.com/stinb/UnderstandForVSCode/issues/4.

  5. It looks like there's an easy fix for that, so I'll fix that now so that it starts automatically if there's a .und folder and also add to the readme.

  6. This isn't a limitation of VS Code or my extension. The cause is either the OS or maybe Understand. My extension behaves just like launching Understand from a terminal. I'll make an issue about this. https://github.com/stinb/sti/issues/3156

  7. Great!

RobbyCBennett commented 4 months ago

I made some documentation here for anyone else who will test this and wants to avoid the annoying popup too.

It also says that we should never open a .code-workspace file that we didn't create because they can enable arbitrary code execution and then immediately execute arbitrary code.

katescitools commented 4 months ago

Wow thank you so much for all the feedback from the testing! I appreciate you creating the issues as you confirm them too. I've checked item 2 above for the Go To Implementations, Type Definition, and Declaration and I was able to see them working in VS Code.

Since there are already separate issues for the other items that need fix, I'll just wait for item 5 and retest once the fix for that is available.

When fix becomes available for item 5, I'll re-assign this to you for you to close or continue with the other unselected checkboxes. Thanks again, @RobbyCBennett !

RobbyCBennett commented 4 months ago

Okay, @HeidiJoe. This extension is ready for the next person to test. You mentioned someone specific to test it.

RobbyCBennett commented 4 months ago

Here's the link to all of the releases of the extension, with the latest one showing first.

https://github.com/stinb/UnderstandForVSCode/releases

RobbyCBennett commented 4 months ago

Also, the tester should probably read this to avoid any frustrations with VS Code.

groke commented 4 months ago

@RobbyCBennett I made the repo public to help with some testing issues.

RobbyCBennett commented 4 months ago

Okay. Since you did that, I just fixed the README so that the images are visible in the editor. That's only possible when the repo is public. I released it as 0.9.4, which is the latest beta release right now.

RobbyCBennett commented 4 months ago

Now it's fixed again, for real, in case you downloaded it in the last 6 minutes.

RobbyCBennett commented 4 months ago

I will release to the VS Code extension marketplace once we push our next release of Understand.

RobbyCBennett commented 3 months ago

Published