intersystems-community / vscode-objectscript

InterSystems ObjectScript extension for Visual Studio Code
https://docs.intersystems.com/components/csp/docbook/DocBook.UI.Page.cls?KEY=GVSCO
Other
106 stars 48 forks source link

Handling of projects gets confused when class package root name matches webapp root name #1407

Closed gjsjohnmurray closed 1 month ago

gjsjohnmurray commented 1 month ago

Type: Bug

  1. Have a namespace with a Coffee package and a /coffee webapp.
  2. Set up an ISFS workspace accessing this namespace.
  3. Use the Projects view to add a project (e.g. Coffee).
  4. Use the Projects view to add items to this project.
  5. Select the coffee folder but not the Coffee package.
  6. Try browsing the project in the Projects view.

:bug: the CSP Files folder contains nothing but the Classes folder shows a subfolder named 'coffee' which is empty when expanded.

Extension version: 2.12.7-beta.1 VS Code version: Code 1.91.1 (f1e16e1e6214d7c44d078b1f0607b2388f29d729, 2024-07-09T22:06:49.809Z) OS version: Windows_NT x64 10.0.22631 Modes:

isc-bsaviano commented 1 month ago

@gjsjohnmurray Can you export your project and send it to me so I can use it to debug this?

gjsjohnmurray commented 1 month ago

Show1407.zip

  1. Add a /show1407 web application to your IRIS server, making it a copy of the existing /csp/user one but appending \show1407 to its physical path.
  2. Import the .xml file in the attached ZIP into your USER namespace, e.g. from Studio. This should do the following:
  1. In VS Code use Server Manager to find the project, then create a workspace to edit its contents.
  2. Compare what Explorer shows with what the Projects view shows:

image

Notice that Explorer only shows the class.

To see the issue originally reported, proceed as follows:

  1. From a context menu in Projects view, create a new project "New1407".
  2. Use the "Add Items" context menu option to add the "show1407" folder but not the "Show1407" package.
  3. Explore the "New1407" project in Projects view:

image

Notice that the Classes folder unexpectedly contains "show1407", presumably because a package of the same (case-insensitively) name exists in the namespace.

Also notice that the CSP files folder doesn't contain the "show1407" folder despite that being what I added to the project.

isc-bsaviano commented 1 month ago

Thanks, John. I will look at this.