Releases: nojanath/SublimeKSP
1.22.1
This update fixes several issues which arose in previous release:
-
FIXED Checking if the package has been loaded was still not correct, so automatic syntax recognition did not work properly. Now it does!
-
FIXED Several built-in variables were set up as constants, so select-case on them would overly eagerly optimize away the whole statement (issue #490)
-
FIXED Select-case optimization now doesn't optimize if built-in constants are used, even though that doesn't make a whole lot of sense (issue #490)
-
FIXED Automatic end-of-line format fixer did not work for quite some time, resulting in compilation problems like in issue #447
-
FIXED Assign statement optimization introduced in 1.22.0 would overly eagerly optimize statements containing built-in or user functions
-
ADDED Previously "hidden" Indent Size in Compiled Code option is now in the
Tools > SublimeKSP
menu -
IMPROVED Refactored how setting various SublimeKSP options works in the back end
Thanks to Nabeel from Impact Soundworks (@eitherys) for assistance in fixing the compiler optimization bugs!
That's all - have fun!
1.22.0
This update adds support for everything that was newly introduced with Kontakt 8.2.0, along with the following changes:
-
ADDED New
__IGNORE__
directive, which, if found in a file, will disallow it from being imported into other scripts -
ADDED Compiler option to specify the indentation size in compiled code (provided "Remove Indents" option is disabled)
-
ADDED "SublimeKSP Documentation" command was added to Tools > SublimeKSP menu, which links to the (now greatly updated!) Wiki of the official SublimeKSP repository
-
ADDED All actions and options of the SublimeKSP extension are now also available in Sublime Text's Command Palette (CtrlShiftP on Windows/Linux, CmdShiftP on macOS)
-
IMPROVED SublimeKSP will now use the Python 3.8 runtime in Sublime Text 4. You can expect some speedups in compilation times potentially!
-
IMPROVED F-strings are now properly syntax colored
-
IMPROVED Compiler now detects when variable references are used as lvalues and proposes their assign statements as deletable. An example: if we write
declare !arr[] := ("foo", "bar")
and we don't read from!arr
elsewhere in code, the variable won't be written to, which can save a significant amount of lines of code, for example if string arrays are declared and assigned to, but never referenced in code. Previously, the above example would always produce code with!arr
declared and the string assignment statements, even if the array was never used. -
CHANGED "Define constant was already declared" error was demoted to a warning (you can see this in Sublime Text's console log), which means that compilation can proceed normally
-
CHANGED Similar to the above change, when importing NCKP, and it was found that it contains no UI controls to import, demote this error to a note
-
CHANGED "Remove Indents and Empty Lines" action was renamed to just "Remove Indents", because empty lines are always removed during compilation, as a part of constructing the abstract syntax tree (AST)
-
CHANGED "Additional Branch Optimization Steps" action was renamed to just "Additional Branch Optimization", because it really only adds one additional compilation step, not more of them
-
CHANGED "About SublimeKSP" command was changed to open the README file from the official SublimeKSP repository
-
FIXED We were not tracking the Sublime Text plugin loaded/unloaded state, so automatic syntax detection did not work properly
-
FIXED Compiler did not optimize select-case statements if no branches matched the value expression
-
FIXED Empty if-else blocks were removed previously, which is incorrect, since this is valid boolean logic
-
FIXED When using structs or constant blocks, if any of their members started with "end", structs or constant blocks would not be closed properly
-
FIXED When compiling from command line, we did not resolve the absolute path for the source filename when getting the basepath
Thanks to Nabeel from Impact Soundworks (@eitherys) for several of the gnarlier compiler fixes and improvements!
That's all - have fun!
1.21.1
1.20.0
This update adds support for everything that was newly introduced with Kontakt 8.0, along with the following changes:
-
Added support for f-strings! These enable way easier concatenation of expressions in strings. Use
<>
tags to enclose the expression, for example:f'The value of variable a is: <a>.'
-
Fixed return types for
sgn()
andsignbit()
commands - these can return either integer or real depending on context, so they should work likeabs()
already did -
Fixed the behavior of
optimize_code
andadditional_branch_optimization
pragmas to match CLI behavior (they should have automatically enabledextra_syntax_checks
if it wasn't explicitly called) -
Fixed
-> max_value
and-> min_value
shorthands not being syntax colored -
Fixed
save_compiled_source
pragma not working with a relative path that is just a .txt file without a parent folder -
Updated activation triggers for many snippets to contain the whole word, (for example "family" instead of "fam")
Thanks to Nabeel from Impact Soundworks (@eitherys) for f-string support!
Have fun!
1.19.0
This update adds support for new engine parameters introduced with Kontakt 7.10, along with the following changes:
-
Define substitutions have been optimized to only run on new code generations, rather than multiple steps repeated over the entire compiled output, which improves compile times greatly in some cases
-
Macro arguments can now spell defines to then be re-substituted at practically endless levels (until macros themselves crash at 40 levels).
post_iterate_macro()
/post_literate_macro()
commands are thus deprecated now -
Macro expansion now records the top-level calling line into expanded lines, which allows the developer to see the line of the macro invoked in the error message
-
Fixed file associations to code lines imported via recursive directory imports
-
Fixed
optimize_code
pragma directive did not work -
Symbol list (CtrlR or CmdR on Mac) will now show the whole UI callback properly if the name of UI control contains macro
#tokens#
-
Macro
#tokens#
are now syntax colored in most cases (some edge cases where this doesn't work exist still)
Thanks to Nabeel from Impact Soundworks (@eitherys) for the define/macro/directory import fixes and improvements!
Have fun!
1.18.2
1.18.1
This hotfix update resolves teething issues caused by the addition of the new compiler option, Additional Branch Optimization Steps
-
Fixed compilation not working if task functions were used
-
Fixed incorrect default value for Additional Branch Optimization Steps option (it was set to true, even if the menu didn't show it)
-
compile_with/without
pragma directive for the new compiler option now works and is documented on Wiki (it'sextra_branch_optimization
)
Have fun!
1.18.0
This update adds support for new engine parameters and callback type introduced with Kontakt 7.8, along with the following changes:
-
Added an option which enables completions for vanilla KSP built-in constants and variables (with
$
,%
, etc. type prefixes) -
Added
.SIZE
define for literal defines (issue #99) -
Added an error message if function declaration has duplicate argument names
-
Added a compiler option to enable additional branch optimization steps - this allows using if-else with defines, which can be used in many interesting ways
-
Added
+=
and=+
operators to defines, which allows appending or prepending a literal define to the existing list of literals - see Wiki for more info! -
Improved internal structure of built-ins data file, which enables using vanilla KSP built-in constants as they were supposed to be used
(previously you couldn't use these to, for example, specify array size upon declaration) -
Improved automatic syntax detection (SublimeKSP will automatically switch syntax to KSP if enough keywords have been detected in the first 5000 characters of currently focused document)
-
Improved syntax coloring of
pers
,instpers
andread
keywords when they are placed after the UI widget specifier -
Further improved command line interface:
output_file
argument is now completely optional;save_compiled_source
pragmas are now disregarded ifoutput_file
argument is specified -
Fixed operator precedence for or, xor, .or. and .xor. operators
-
Fixed task function
return
andout
parameters not working correctly (issue #217) -
Fixed an issue where multi-dimensional arrays clashed with Combine Callbacks feature (issue #389)
-
Fixed "Optimize Compiled Code" option breaking with bitwise operators (issue #423)
-
Fixed
$CONTROL_PAR_CUSTOM_ID
missing from syntax coloring
Have fun!
1.17.2
This is a minor update with the following changes:
-
Fixes an issue introduced in 1.17.1, where import paths wouldn't be checked if they exist before compilation continued. Now works again!
-
Option "Play sound when compilation finishes" now finally works even for SublimeKSP installations done via Package Control!
Have fun!
1.17.1
Version 1.17.1
This is a minor update with the following changes:
-
Improved detection of duplicate defines - now both the name and the value of a define have to match in order to throw a compiler error
-
Removed
$ENGINE_PAR_RAUM_MIX
because it is not a valid engine parameter -
Added support for importing whole folders in one go, instead of listing them file by file
-
Pressing
Alt+O
with cursor focused on the line which imports a folder will show all .ksp files within that folder in a new Sublime Text window
Have fun!