scztt / vscode-supercollider

MIT License
54 stars 6 forks source link

quark: clashes with native sc and with flucomatestsuite #20

Closed tremblap closed 10 months ago

tremblap commented 10 months ago

I've installed the quark to try to get it going on VSCode (macos monterey) and I get these 2 warnings in SCIDE (and only one in VSCode):

in both:

ERROR: duplicate Class found: 'TestResult' /Users/pa/Library/Application Support/SuperCollider/Extensions/FlucomaTestSuite/Utilities/TestResult.sc /Users/pa/Library/Application Support/SuperCollider/downloaded-quarks/UnitTest2/UnitTest.sc

and in SCIDE

ERROR: duplicate Class found: 'Document' /Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/scide_scqt/ScIDE.sc /Users/pa/Library/Application Support/SuperCollider/downloaded-quarks/LanguageServer/LSPDocument.sc

=== The former, I can sandbox our FluCoMa test suite function no problem. But is the latter normal? Does it mean using SC-on-VSCode breaks SC-on-SCIDE?

thanks

scztt commented 10 months ago

You can uninstall UnitTest2, this is only required for testing.

Unfortunately, sclang requires a Document class to interact with an IDE - there can only be one of these at a time, it's not particularly modular, so if you have the LSP quark installed (which provides a Document class), it will conflict with the SCIDE Document class. The solution here is probably to have two sclang_conf.yaml files, one with the language server quark installed (for VSCode) and one without (for SCIDE) - there are preferences in both VSCode and SCIDE to set the sclang_conf.yaml file. This should be documented better in the LSP readme file.

I'd like to improve this behavior, but it requires a major refactoring of the Document class and I haven't been able to get to it. If someone else can take this work on, I'd be happy to provide some direction, but unfortunately I don't think I'll be able to do it very soon - the Document class simply wasn't designed to be modular like this.

tremblap commented 10 months ago

ok I think I've updated the wrong issue. I can move my comment in #19 here - the clash is gone with 2 yaml files, but other conflicts have appeared. Thanks for helping and sorry for my lack of fluency.

tremblap commented 10 months ago

sorted with custom yaml file and latest compile from the dev branch