Releases: interactive-data-language/vscode-idl
4.7.1
Fixed an issue with the IDL Webview that showed a blank tab when opened. This affect things like the profiler in the extension.
If there are unexpected errors in the webview, we now try to catch them and alert the user. Errors should be printed to the logs and a button will appear to make it easy to report an issue if this happens in the future.
Added basic support for symbolic links and managing files that have symbolic links. This includes tests for baseline user experience as well.
When we encounter a file with a symbolic link, we report problems for the true file on disk (not the path including the link). This means you won't see problems actively reported for the file if you edit it as a link.
Resolved an issue where task file generation wouldn't update your original code with a main level program if you didn't have one.
v4.7.0
4.7.0 - November 2024
Added the ability to statically determine the return types for functions and function methods that don't have documentation. This means that, for the following example, we properly detect that we return an IDL Long (because of compile_opt idl2
):
function myFunc
compile_opt idl2
return, 42 ; or is it 84?
end
This marks the first step of an iterative process to automatically detect types from code when you don't have strict documentation. We can also, in the future, check to make sure actual return values match docs.
In order to detect types from your code, we had to make some pretty big changes to the language server in order to properly resolve types that don't come from documentation. With that, if you notice any odd behaviors or issues, please reach out to us on Github to let us know of any problems. For large workspaces, such as the IDL lib folder, this means it will take about 1.5-2.5 more seconds to parse your code (depending on complexity of your code base and how many routines are called in other files).
In order for our type detection functionality to work correctly, we did have to revert a change we recently made to reduce long-term memory usage of the language server.
However, we did tweak the in-memory cache for parsed files to optimize performance. We no longer copy complex data structures which adds a 10-15% performance improvement parse speed and helps reduce memory usage.
Optimized the language server change detection process to focus on only routines/globals that have changed and not everything in a file (change detection is a process for validating usage of routines in other files when the source definition is updated).
Changed the error message reported when we can't find a structure definition. This adds some context for why we might not know about a structure definition to help users who aren't following best practices/standards.
Fixed a bug where code actions were not appearing in notebook cells.
Fixed an issue where code actions, in notebooks, incorrectly fixed issues on the first line of a cell.
Fixed an issue where the language server was not correctly detecting pointers being de-referenced. This caused false errors for "standalone expressions" to be reported and for formatting to not function correctly.
Update extension docs with the latest version of node.js that we require (to work around language server crashes).
Updated hover help packaged with the extension with ENVI 6.1, IDL 9.1, and ENVI Deep Learning 3.0.1 docs
Tweak the logic for how we respond to settings changes for problems that we report. This change means, as you change which problems you want reported in real-time, the problems tab in VSCode will add/remove problems that you do/don't want to see. Previously you would need to restart VSCode for the changes to take effect.
Improved the logic when checking if we report problems or not for a file to account for the folder on IDL's path being recursive or not.
Fixed an issue where, when disabling problems from duplicate routines, they were still being reported.
Updating our formatting logic to add a final line feed or carriage return after the last line of a file when formatting your code.
Potential fix to resolve canonical (true) filepaths when you have symbolic links in your workspace or on IDL's search path. This should fix a problem where the same file was incorrectly having two paths and reporting duplicate problems.
v4.6.2
Changed the language server startup process to remove all files from memory after initial startup. This reduces RAM by 0.25-0.5 GB of memory after startup, depending on the volume of code in workspaces and on your path.
When we clean up the language server (happens every 5 minutes), we now check our in-memory cache and remove any files that haven't been accessed recently. Helps reduce overall RAM when VSCode is open for long periods at a time.
Changed the way that the language server sends work to the threads that parse code. The main difference is that we no longer send the parsed version of code back to the main thread which we were doing.
For large files, this had a significant impact on perceived performance as the worker threads could get locked serializing and de-serializing objects (also leads to more memory usage). Now, large files like slicer3.pro which are included in the IDL installation, provide auto-complete and hover help in about ~0.5 seconds instead of 5+ seconds.
Fixed an issue where, from the JSON settings editor, a valid extension setting would be highlighted as being an incorrect value.
Fixed an issue where the "don't ask again" options didn't honor your choice for using IDL as the formatter.
v4.6.1
Added layer controls to the Notebook Map.
- Generic title for each layer (raster/vector)
- Slider to make transparent or not
Layers have a handle which allows you to use drag and drop to re-order them. As you re-order, the map updates with changes.
Notebook maps now listen to theme changes from VSCode and, when swapping between light and dark themes, the basemap will update to match the theme of VSCode (light map for light theme; dark map for dark theme)
Fixed an issue where we weren't properly detecting keywords for obj_destroy
when a custom object class had a ::cleanup
method present
Fixed a bug with auto-complete where, instead of variables, arguments, or functions, you would end up with procedures being suggested inside of a procedure call.
Similar to call_function()
and obj_new()
, add special auto-complete for call_procedure
to give you the list of procedure names with string literals
Fixed a bug where we were incorrectly detecting standalone expressions and reporting as problems.
Fixed a parsing issue where we would not correctly determine the end of ternary operators which could report errors incorrectly in your code.
Re-worked auto-complete to function the same way as hover help. Now, we determine types of features to send from one of our worker threads and then the main thread builds out the completion items. The advantage of this is that we can now send back documentation and other information (which doesn't exist in our worker threads).
v.4.60
Fixed an issue where we open a file that we have stopped in, even if it is compiled as a SAVE file. Now, only PRO files will be jumped to.
Fixed an issue where, if you have a comment block before and after a routine definition, the second comment block is picked. We now only use the comment block after a routine definition if we did not find one just before.
Fixed an issue where documentation after a routine definition wasn't properly reporting problems.
For both of the problems above, and for documentation inside of a routine, the interior comments must be on the next line after the definition otherwise they will not be detected. If this breaks existing behavior for you, let us know and we can change it back!
Resolved an issue where, when routine definitions changed, problems were not properly detected as they should be. Example: changing the name of a keyword should have an error appear in any file that used the old keyword.
Notebooks now support compiling files! If a cell only has comments and compile statements, then it will be executed as a batch file. This allows you to merge notebooks and traditional editing/creation of PRO code.
Updated the "Hello World" IDL Notebook example with this new behavior.
Improve auto-complete for executive commands.
For .compile
we now have auto-complete for files known to the language server.
Created a new concept called a Routine Definition File for IDL. These files allow developers, who deliver code as SAVE files or as DLLs/DLMs, to provide documentation so that other users get hover help, auto-complete, and the ability to create notebooks automatically from examples in the docs.
See the new documentation page here for more information.
Fixed an issue where we were not correctly detecting unclosed quotes when there was an escaped quote within the content of the string.
Re-work the toolbar for animations in IDL Notebooks. The new toolbar uses the same colors/style as the sidebar and will look good on most themes. There was an issue, after a library update, where colors for high contrast themes did not work with the slider and have now been fixed.
Notebook maps (requires ENVI) now have a button that will reset the view to the initial state. Helpful in case you zoom out or lose the location of your imagery while zooming/panning around.
v4.5.1
Continuing with our story of IDL Notebook user experience, each session of notebook now gets it's own instance of IDL! This means a few things:
-
You can now run more than one IDL Notebook in parallel! This makes it easy to crank through data or multi-task to your heart's content.
-
Each session of IDL notebook is sand-boxed and a separate process. This means notebooks won't interact with each other.
-
When you close an IDL Notebook, the associated IDL Kernel is automatically stopped
-
A new sidebar entry in the Notebook section, allows you to stop all IDL Notebook Kernels
Remove a false error report when you stop IDL (terminate the process) while it is running
Fixed an error where we were not automatically returning from the main level when you compiled a main level program.
Fixed an issue in IDL Notebooks where, once ENVI is started, a notebook no longer can embed multiple graphics in a single notebook cell.
When ENVI is started, as long as the UI is not present, we now embed direct graphics. If the ENVI UI is open, we don't embed direct graphics.
v4.5.0
4.5.0 - May 2024
New-and improved IDL Notebook user experience!
-
When compiling cells, we don't show you the output from compiling to focus on what runs
-
The paths for notebook cells have been cleaned up and are now easy to read (before they had IDs in the names of the paths)
-
Notebook cells now offer implied print! For main level programs (i.e. cells by default), we detect and automatically print variables, outputs from function calls, and expressions like "2 + 42". You can see some examples of this in our sample IDL Notebook included with the extension.
-
Variables that will be printed have a special semantic token highlighting applied to them to make it clear it is not being interpreted as a procedure. This depends on your VSCode theme, but should either look like other variables or stands out compared to procedure calls.
-
After running a notebook cell, we check to see if there is any output. If there is no output, we do not create notebook cell output. Previously we always added output to cells, even if there wasn't anything to track.
Fixed an issue where we incorrectly reported an error when using the property index signature to retrieve a property. This affected statements of the form "struct.(0).(0)"
Add icons for the languages that we contribute to the extension
Add human-readable names for the languages that we contribute
Fixed an edge case when reporting that a variable cannot be indexed with the !null
type
Type detection now properly handles the following cases:
-
Any statement using
&&
or||
will return boolean type -
Any statement using a logical operator should return the correct type (i.e.
eq
,ne
,le
). For example:[1,2,3] eq 5
should give a type ofArray<Boolean>
. This supports lists, hashes, orderedhashes, and dictionaries.
These type changes help fix scenarios where we were incorrectly reporting errors for extension users.
The extension now automatically detects when you have code that is "standalone" which needs to be assigned to a value (or have a value assigned to it).
When running IDL through the debug console, we now properly catch stops/breakpoints that aren't a result of manually sending commands to IDL. This supports use cases where widget/UI applications are running and hit a stop or breakpoint in a callback routine.
Moved the following features out of preview
since there have been no reported issues:
Added the ability to convert a notebook to a PDF! This requires an additional extension called ":"Markdown PDF", which you will be prompted to install. This includes:
-
A new sidebar entry for PDF generation and a button in the top-right of the notebook to generate a PDF
-
When you click the button to create a PDF, as long as your notebook is saved to disk, it will create Markdown, open it, and start the PDF generation process
-
Once finished, it closes the Markdown file
-
The Markdown and PDF file use the same base name as your notebook. Meaning if your notebook is called "My-notebook.idlnb" you will have a "My-notebook.md" and "My-notebook.pdf" file generated in the same folder
-
You do need to save your notebook to disk so we have a path to write the Markdown and PDF files
v4.4.2
Forgot to publish a release for 4.4.1 which had a minor fix. All details listed below.
4.4.2 - April 2024
For notebook cells, syntax errors are now highlighted and problems are reported on the lines that have errors. This behaves the same as PRO files when using the debug console as well.
When you run a notebook cell, and IDL stops running, we now show the line in the cell that was stopped on to help track down problems.
Syntax error and notebook decorations now cover the whole line instead of just the text on the line to help make them pop more.
Improved the user experience for breakpoints when working with IDL. Some of the new behaviors include:
-
Properly setting breakpoints when you add them to a file before IDL starts
-
When you manually compile any file, we synchronize the actual location of breakpoints with VSCode
Fixed a rare error where, when IDL was running in the debug console, we would fail to fetch internal information about IDL.
When converting notebooks to PDFs, add a short pause before generating the PDF try avoid having to click the button twice.
Fixed an issue where, when you would delete a notebook cell that had reported problems, the problems would always stick around in the "Problems" tab of VSCode
Re-worked quote formatting to not potentially break user code. There are a few edge cases where the quotes cause errors when they were flipped from single to double (or double to single). Now, all quotes preserve the interior content of the string so that IDL interprets them the same.
Fixed a small issue with syntax highlighting where we weren't detecting escaped quotes (and highlighting them) as we should have.
Tweak setting IDL's DLM path when launching so that users can specify custom paths through normal environment variables and have it be supported.
When IDL starts up for notebooks, we now check to make sure you have at least IDL 8.8.0 which has some required updates in order for the notebooks to function as expected.
Updated the main README and notebooks docs to reflect the version requirements.
When IDL starts for Notebooks, we update the kernel indicator in the top-right of the notebook to show the version of IDL we are using. We use this now instead of the pop-up window that used to appear.
4.4.1 April 2024
Fix a bug where watch variables were being executed and causing chaos in IDL debug sessions
v4.4.0
Fixed an issue where the names of ENVI and IDL tasks were incorrectly lower-case instead of what the user had specified in the task files.
Resolved a long-time bug where internal output would appear in the debug console when running IDL in VSCode.
Reworked routine signatures that appear in hover help to be more user friendly!
-
You can now copy/paste the signature blocks and each one is valid IDL code
-
No brackets surrounding optional parameters
-
For functions and function methods, the return type is added before the routine syntax
Changed the output from IDL in the debug console so that it no longer prints "IDL>" or "ENVI>" for a new user experience compared to the IDL Workbench.
Fixed an issue with fast parsing where line continuations and comments were not handled correctly which would make parsing miss keywords, arguments, and make some up.
Add back in the Terminal commands and buttons to the IDL sidebar for users that prefer to use terminals instead of the debug console.
Fixed a bug that incorrectly reported a type incompatibility when using statements like val eq !null
To help accentuate syntax errors in files, lines are now highlighted.
As part of the syntax error line highlights, we have the framework to support code coverage in the future! Which should be coming in a release at some point.
Tweak the snippets for for loops to use n_elements() on a variable instead of having a static value
Re-work the logic for running files to be much more flexible. Here's how it behaves:
-
If you have a main level program, compile the file and then run the main program
-
If you have a procedure or function as the bottom-most routine, attempt to call without any arguments keywords
-
If you have a function method or procedure method as the bottom-most routine, we do not run anything
-
If we detect a syntax error when we compile your file, we stop before running
Fixed an issue where, when a parameter had the name "file", "http", "https", "s3", or "ftp", it would incorrectly be skipped with docs parsing.
v4.3.1
4.3.1 February 2024
Resolved an issue where the language server would take a while to startup when you didn't have any workspace folders open. It should be almost instantaneous now!
Resolved an issue where problems were not correctly reported (or honoring settings changes) for files that didn't belong to a workspace.
Added more controls to help fine-tune problem reporting and be able to disable it altogether:
-
Add code actions for being able to easily disable problem codes from within the editor for a workspace or user settings
-
Code actions work for notebooks or PRO files
-
Added an IDL comment-based API to control how problems are reported for files and lines of IDL code
-
Added a new preference that will disable problem reporting altogether
Update documentation for all problem codes to point to our configuration guide for how to disable problems
Fixed an issue where, after the new documentation was added to the extension, that we no longer correctly opened example notebooks.
With the addition of new commands for code actions and fixing reported problems, we have retroactively removed some from the command palette that were meant for internal use.