nojanath / SublimeKSP

Fork of Nils Liberg's SublimeKSP plugin. See README for details.
GNU General Public License v3.0
87 stars 18 forks source link

PR Miscellaneous Updates #230

Closed JackWilliams-FractureSounds closed 1 year ago

JackWilliams-FractureSounds commented 1 year ago

Apologies for all the notifications about my commits - I was under the impression that the PR pulls commits up to the time of request, I'll make sure that won't happen again. Due to my misunderstanding, these commits have become a bit convoluted, so feel free to ask for more information

PR includes several miscellaneous updates.

Added Features

50c2ebbb9703586a45a551880a33488354450daf Event pars can now use '->' notation for getting and setting close #38 f56161f2379ba3464ed59621dd9e43fc6c0ac3ef Commands for compiling are now accessible through the command pallet 1e0afbabb7caba1d4b3de4a644d2000cdb39e5f4 ASTNodes can now store lines in the lexinfo. This allows access line information found in the Line class, such as namespaces or filenames 9246682902f787b93928d442141d198507d06d1f Added testing for variable declarations c8c18a1c586cc0eb70915cccde766812bd78e9da Added workflow file for automatic testing when a commit is pushed to master branch using Nil's tests.py. Test testBasicMacroInliningPartOfParameterNameInsideString will fail, but known bug. (previously put this in its own PR, but caused confusion)

Bug Fixes

2a648ee710e0dc85a86db575b0bd2c79e4df8a11 Autocompletes for Sublime Text 4 now work as intended. Close #225 078809683ab7b14c7c7fb59c1c9222bce7c6c08b Minor bug fix for checking in-built functions when evaluating constants 9ffc82e38080ede46e6b5303ffa094aeafb5f3b3 Raise error if a variable is declare outside of init callback after compilation 57f80b0915e9c31d4e2b68ae550e439ac8ab4ba1 Raise error for Automatic Number Incrementer if END_INC is not found 57f80b0915e9c31d4e2b68ae550e439ac8ab4ba1 Updated comparison tests in tests.py

I've tested all these changes thoroughly with individual case tests and with prior Kontakt instrument code, but let me know if something isn't working as expected.

blackeyedpony commented 1 year ago

Thanks for the additions Jack ! Highly appreciated ! Could you eventually add a shortened error message in case the event_par could not be found ? I think not everybody in the Kontakt community can make use of the the full callstack error in the popup box: _Traceback (most recent call last): File "/Users/felting/Library/Application Support/Sublime Text 3/Packages/Sublime KSP remote/ksp_plugin.py", line 186, in run if self.compiler.compile(callback=self.compile_on_progress): File "/Users/felting/Library/Application Support/Sublime Text 3/Packages/Sublime KSP remote/ksp_compiler3/ksp_compiler.py", line 1931, in compile func() File "/Users/felting/Library/Application Support/Sublime Text 3/Packages/Sublime KSP remote/ksp_compiler3/ksp_compiler.py", line 1900, in ('parse code', lambda: self.parse_code(), True, 1), File "/Users/felting/Library/Application Support/Sublime Text 3/Packages/Sublime KSP remote/ksp_compiler3/ksp_compiler.py", line 1793, in parse_code self.module = parse(self.code) File "/Users/felting/Library/Application Support/Sublime Text 3/Packages/Sublime KSP remote/ksp_compiler3/ksp_parser.py", line 726, in parse result = parser.parse(data, tracking=True) File "/Users/felting/Library/Application Support/Sublime Text 3/Packages/Sublime KSP remote/ply/yacc.py", line 311, in parse return self.parseopt(input,lexer,debug,tracking,tokenfunc) File "/Users/felting/Library/Application Support/Sublime Text 3/Packages/Sublime KSP remote/ply/yacc.py", line 766, in parseopt p.callable(pslice) File "/Users/felting/Library/Application Support/Sublime Text 3/Packages/Sublime KSP remote/ksp_compiler3/ksp_parser.py", line 589, in p_set_par_stmt p[0] = handle_set_par(p[1], p[3], p[5]) File "/Users/felting/Library/Application Support/Sublime Text 3/Packages/Sublime KSP remote/ksp_compiler3/ksp_ast_processing.py", line 66, in handle_set_par raise Exception("%s is not a valid control_par/event_par" % parameter.identifier) Exception: test is not a valid control_par/eventpar

JackWilliams-FractureSounds commented 1 year ago

Thanks for the additions Jack ! Highly appreciated ! Could you eventually add a shortened error message in case the event_par could not be found ? I think not everybody in the Kontakt community can make use of the the full callstack error in the popup box

No problem! Unfortunately, due to where this logic is handled, the normal error notification doesn't work. But I'll keep trying new methods and will keep you updated! :))