supercollider / supercollider

An audio server, programming language, and IDE for sound synthesis and algorithmic composition.
http://supercollider.github.io
GNU General Public License v3.0
5.52k stars 750 forks source link

Compile sclang library in Safe Mode #1423

Open crucialfelix opened 9 years ago

crucialfelix commented 9 years ago

When the user has a broken library that cannot compile due to duplicate or missing classes and messed up include paths, they should be able to recompile in safe mode without any extra active includes.

Add a menu item: Recompile Class Library (safe mode)

To implement this the IDE merely needs to compile and not pass any config file to sclang.

crucialfelix commented 9 years ago

possible problem: if they then startup Quarks they would not see anything installed. If they then install something then it would write to the default config file. Maybe that would be just like starting from nothing and it would be fine.

crucialfelix commented 9 years ago

extra: when compile fails due to duplicates/missing it can post the suggestion to recompile in safe mode. other IDEs would need to have a similar concept of safe mode.

scztt commented 9 years ago

This is a great idea. I would tentatively suggest that safe-mode actually be an sclang flag, that loads the normal lang config, stores the include / exclude paths normally -- EXCEPT it ignores those paths during compilation. That way, you can add/remove quarks and modify your current sclang from the language in any ways you might expect to be able to, you'll just avoid the compile errors. This would make using it / implementing easier for other ide's as well. This would, incidentally, also allow booting of sclang as a sort of standalone quarks configuration utility.

crucialfelix commented 9 years ago

The idea has been talked about for years. But right now its really easy to implement.

What you suggest would be a more complicated approach and would invite more problems I think.

currently quarks just reads whatever config was used when booting up. It could have a button and dialog to open one of the other config files and read that.

On Fri, Apr 17, 2015 at 4:43 AM scztt notifications@github.com wrote:

This is a great idea. I would tentatively suggest that safe-mode actually be an sclang flag, that loads the normal lang config, stores the include / exclude paths normally -- EXCEPT it ignores those paths during compilation. That way, you can add/remove quarks and modify your current sclang from the language in any ways you might expect to be able to, you'll just avoid the compile errors. This would make using it / implementing easier for other ide's as well. This would, incidentally, also allow booting of sclang as a sort of standalone quarks configuration utility.

— Reply to this email directly or view it on GitHub https://github.com/supercollider/supercollider/issues/1423#issuecomment-93881814 .

scztt commented 9 years ago

I suppose, implementation details aside, the request is simply: I want to boot into safe mode and avoid compiling includes, but still look at / edit my current quarks configuration as I normally would.

crucialfelix commented 9 years ago

that is more complicated.

I think the first feature is: my supercollider is broken help ! how can I fix it ? and the answer can be: recompile in safe mode.

second feature: allow to read config file and not have to install everything all over again. Quarks already does read the config file to show what is installed. but in safe mode there is no config file.

On Sun, Apr 19, 2015 at 12:16 AM scztt notifications@github.com wrote:

I suppose, implementation details aside, the request is simply: I want to boot into safe mode and avoid compiling includes, but still look at / edit my current quarks configuration as I normally would.

— Reply to this email directly or view it on GitHub https://github.com/supercollider/supercollider/issues/1423#issuecomment-94205625 .

telephon commented 9 years ago

Could one not switch to a safe default config file that has nothing installed? Then you could still look at the other config file without recompiling and see what quarks were in there.

muellmusik commented 9 years ago

This makes sense to me. safe and unsafe. One could have an option to clear config as well, the toggle seems the crucial thing

On 19 Apr 2015, at 09:30, Chris Sattinger notifications@github.com wrote:

that is more complicated.

I think the first feature is: my supercollider is broken help ! how can I fix it ? and the answer can be: recompile in safe mode.

second feature: allow to read config file and not have to install everything all over again. Quarks already does read the config file to show what is installed. but in safe mode there is no config file.

On Sun, Apr 19, 2015 at 12:16 AM scztt notifications@github.com wrote:

I suppose, implementation details aside, the request is simply: I want to boot into safe mode and avoid compiling includes, but still look at / edit my current quarks configuration as I normally would.

— Reply to this email directly or view it on GitHub https://github.com/supercollider/supercollider/issues/1423#issuecomment-94205625 .

— Reply to this email directly or view it on GitHub.

crucialfelix commented 9 years ago

Well it in no way implies that normal usage of supercollider is unsafe. There is no "unsafe" mode.

Its a well established term:

Safe mode is a diagnostic mode http://en.wikipedia.org/wiki/Diagnosis of a computer operating system http://en.wikipedia.org/wiki/Operating_system (OS). It can also refer to a mode of operation by application software http://en.wikipedia.org/wiki/Application_software. Safe mode is intended to help fix most, if not all problems within an operating system. It is also widely used for removing rogue security software http://en.wikipedia.org/wiki/Rogue_security_software.

http://en.wikipedia.org/wiki/Safe_mode

You can already clear your config by using the system preferences in the IDE.

On Sun, May 3, 2015 at 6:15 PM muellmusik notifications@github.com wrote:

This makes sense to me. safe and unsafe. One could have an option to clear config as well, the toggle seems the crucial thing

On 19 Apr 2015, at 09:30, Chris Sattinger notifications@github.com wrote:

that is more complicated.

I think the first feature is: my supercollider is broken help ! how can I fix it ? and the answer can be: recompile in safe mode.

second feature: allow to read config file and not have to install everything all over again. Quarks already does read the config file to show what is installed. but in safe mode there is no config file.

On Sun, Apr 19, 2015 at 12:16 AM scztt notifications@github.com wrote:

I suppose, implementation details aside, the request is simply: I want to boot into safe mode and avoid compiling includes, but still look at / edit my current quarks configuration as I normally would.

— Reply to this email directly or view it on GitHub < https://github.com/supercollider/supercollider/issues/1423#issuecomment-94205625

.

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub https://github.com/supercollider/supercollider/issues/1423#issuecomment-98498477 .

telephon commented 9 years ago

OK, so a menu item that says switch to safe mode that switches the language config to a clean one would be enough.

muellmusik commented 9 years ago

Yeah I know all that :-), just unsafe in the sense that you just failed to compile so you go to safe. Agreeing with you basically.

On 3 May 2015, at 17:39, Chris Sattinger notifications@github.com wrote:

Well it in no way implies that normal usage of supercollider is unsafe. There is no "unsafe" mode.

Its a well established term:

Safe mode is a diagnostic mode http://en.wikipedia.org/wiki/Diagnosis of a computer operating system http://en.wikipedia.org/wiki/Operating_system (OS). It can also refer to a mode of operation by application software http://en.wikipedia.org/wiki/Application_software. Safe mode is intended to help fix most, if not all problems within an operating system. It is also widely used for removing rogue security software http://en.wikipedia.org/wiki/Rogue_security_software.

http://en.wikipedia.org/wiki/Safe_mode

You can already clear your config by using the system preferences in the IDE.

On Sun, May 3, 2015 at 6:15 PM muellmusik notifications@github.com wrote:

This makes sense to me. safe and unsafe. One could have an option to clear config as well, the toggle seems the crucial thing

On 19 Apr 2015, at 09:30, Chris Sattinger notifications@github.com wrote:

that is more complicated.

I think the first feature is: my supercollider is broken help ! how can I fix it ? and the answer can be: recompile in safe mode.

second feature: allow to read config file and not have to install everything all over again. Quarks already does read the config file to show what is installed. but in safe mode there is no config file.

On Sun, Apr 19, 2015 at 12:16 AM scztt notifications@github.com wrote:

I suppose, implementation details aside, the request is simply: I want to boot into safe mode and avoid compiling includes, but still look at / edit my current quarks configuration as I normally would.

— Reply to this email directly or view it on GitHub < https://github.com/supercollider/supercollider/issues/1423#issuecomment-94205625

.

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub https://github.com/supercollider/supercollider/issues/1423#issuecomment-98498477 .

— Reply to this email directly or view it on GitHub.

dyfer commented 4 years ago

Per discussion in #4719 I'd like to continue discussing this issue.

jamshark70 commented 4 years ago

Was going to post this in 4719 but moving here:

If we do the following, we can improve the user experience for library-compilation failure by a few orders of magnitude:

  1. "Safe" or "emergency" mode.

  2. thisProcess.normalConfig is true if running the user's complete setup, false for safe mode.

  3. Then, in the startup sequence, if(thisProcess.normalConfig) { normal startup } { HelpBrowser.openHelpFor("Library Compilation Failed") }, taking the user to a document explaining how to use the Preferences panel to remove faulty directories (and maybe some other troubleshooting steps).

So the user experience changes from "everything is down and I don't know what to do" to "oh, thanks for the help."