-
Notifications
You must be signed in to change notification settings - Fork 9
Description
Type: Bug
When I use an extrinsic function with a period (".") in its name within embedded SQL, VSCode highlights it in red and indicates it as a "problem", even though it compiles and runs with no problems.
For example: make a routine FunctionBox.mac within a package Demo, and within FunctionBox.mac define a public routine GiveLength(myString) which just returns $LENGTH(myString). Then, in a separate file RunQuery.mac (either within Demo or elsewhere), use an embedded SQL query of the form
&sql(DECLARE myCursor CURSOR FOR SELECT $$GiveLength^Demo.FunctionBox() INTO :length FROM
)(substituting whatever table and field you want) to calculate the length of every element of the field in the table
The extension highlights everything after the "." in "Demo.FunctionBox" in red, and indicates it in the "PROBLEMS" tab, but the RunQuery routine should run with no problems: you can iterate over the cursor and display every value of the length variable with no problems, and SQLCODE comes back as one would expect (0 until you reach the end of the table, at which point it's set to 100). So this looks to me like the extension is incorrectly identifying a syntax error where none exists.
I've attached an XML file which can be imported into InterSystems IRIS (I'm using 2025.1) to obtain a package "Demo", containing a routine "FunctionBox.mac" which defines the extrinsic function and another "RunQuery.mac" which uses it in embedded SQL. My RunQuery.mac references the Title field of the Cinema.Show table (pulled from the SAMPLES database which used to ship with Cache). These can be changed to work with whatever table you have available to test it on.
Extension version: 2.8.0
VS Code version: Code 1.106.2 (1e3c50d64110be466c0b4a45222e81d2c9352888, 2025-11-19T16:56:50.023Z)
OS version: Windows_NT x64 10.0.26100
Modes:
System Info
| Item | Value |
|---|---|
| CPUs | 12th Gen Intel(R) Core(TM) i7-1265U (12 x 2688) |
| GPU Status | 2d_canvas: enabled 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 trees_in_viz: disabled_off video_decode: enabled video_encode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled webgpu: enabled webnn: disabled_off |
| Load (avg) | undefined |
| Memory (System) | 31.44GB (6.71GB free) |
| Process Argv | --crash-reporter-id 70c444e1-2e5e-4fa7-a773-592ae7407fa2 |
| Screen Reader | no |
| VM | 0% |
A/B Experiments
vsliv368:30146709
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
6518g693:31334701
aj953862:31281341
nes-set-on:31340697
6abeh943:31336334
0574c672:31404437
cloudbuttont:31379625
todos-1:31405332
v66_all_req:31402695
treatment_gpt5applypatchexclusively:31412086
3efgi100_wstrepl:31403338
trigger-command-fix:31379601
auto_model_enabled:31385282
use-responses-api:31390855
anonusage:31403420
d5i5i512:31419924
ec5jj548:31422691
terminalsuggestdisabled:31426256
cp_cls_c_966_ss:31426491
chatvisible:31426294
defaulttokens:31426298
c0683394:31419495