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

Better handling of "Routine XYZ does not exist in namespace" Intellisense warning #328

Closed
CacioGit opened this issue May 13, 2024 · 7 comments

Comments

@CacioGit
Copy link

Type: Bug

Assume the simple code extract:

S nsp=$NAMESPACE
ZN "%SYS"
S res=$$BACKUP^DBACK("","F","Full Backup",cbkDir_"FullDBList_"$ZD($H,8)".cbk",,"./Backup/FullDBList_"$ZD($H,8)".log","NOISY",,,)
ZN nsp

Intellisense is marking the call to ^DBACK as an issue, as the routine doesnt exist in the current namespace.
I did not find any way to tell VSCode to aknoledge the "false positive" alert and ignore it.

Extension version: 2.5.0
VS Code version: Code 1.89.0 (b58957e67ee1e712cebf466b995adf4c5307b2bd, 2024-05-01T02:10:10.196Z)
OS version: Darwin x64 23.4.0
Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz (12 x 2600)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) 2, 2, 3
Memory (System) 16.00GB (0.05GB free)
Process Argv
Screen Reader no
VM 0%
@gjsjohnmurray
Copy link
Collaborator

Related: #77, #177, #206

@isc-bsaviano
Copy link
Contributor

@CacioGit Thanks for reporting this, I will try to reproduce it. There isn't a way to tell VS Code to "ignore" a specific problem, but you can turn off routine existence diagnostics temporarily if that would help. The setting is intersystems.language-server.diagnostics.routines.

@CacioGit
Copy link
Author

intersystems.language-server.diagnostics.routines did the trick and removed the quite annoying "1 issue with this code" warning flag.

From the previous discussions on similar issues, I can see how it is not really that easy to implement such a logic within the Intellisense's module.

Feel free to close the issue, unless the multiple reports of a similar request may trigger considering possible workarounds/solutions.

Thank you John and Brett.

@isc-bsaviano
Copy link
Contributor

@CacioGit This should work due to my fix for #312. My fix is probably buggy when switching namespaces. I will investigate.

@isc-bsaviano
Copy link
Contributor

@CacioGit This turned out to be a very small bug in our namespace switching detection code. You can download a version of this extension with the fix here. You'll need the darwin-x64 version because you have an Intel mac.

@CacioGit
Copy link
Author

Perfect,
thank you Brett, I really appreciate your work in fixing this so quickly!
I will test the beta build later today and drop a comment here if it doesn't resolve the issue on my VSCode instance.

isc-bsaviano added a commit that referenced this issue May 13, 2024
@isc-bsaviano
Copy link
Contributor

@CacioGit My original fix was incomplete, so I committed an updated one. The properly fixed version is here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants