2

When running the following code on Mathematica 10.2

SetSystemOptions[ "CompileOptions" -> "CompileReportExternal" -> True];

I received the message:

System`SetSystemOptions::obs: Developer`SetSystemOptions has been superseded by System`SetSystemOptions, and is now obsolete. It will not be included in future versions of the Wolfram Language. >>

What will SetSystemOptions become in the future?

MarcoB
  • 67,153
  • 18
  • 91
  • 189
matheorem
  • 17,132
  • 8
  • 45
  • 115
  • 5
    Read the error message again. I believe it is clear. This message has been produced since at least version 7; SetSystemOptions moved out of the `Developer`` context after version 5.2, which was a long time ago now. – Oleksandr R. Oct 13 '15 at 11:25
  • 1
    To answer the next question, this situation was probably precipitated by your use of `<<Developer``. Adding new contexts to the context path should be done cautiously and I would not recommend it just so that you can avoid typing the context for a few functions. – Oleksandr R. Oct 13 '15 at 11:30
  • @OleksandrR. Yeah! I just find this problem. I do add <<Developer – matheorem Oct 13 '15 at 11:32
  • @OleksandrR. So you are suggesting me that if I want to use ToPackedArray, then I should write Developer``ToPackedArray, right? But I still don't understand why load `Developer`` is not right and should be done cautiously? What kind of bad things can happen? – matheorem Oct 13 '15 at 11:37
  • 1
    Well, you can use `<<Developer`` if you really want to, but you run the risk of shadowing, as you discovered with the situation here. (Shadowed symbols are highlighted in red, but maybe this is not a strong enough hint that it is a problem.) Any bad thing could happen that might result from calling the wrong function unintentionally. I don't personally add the context to the context path and I would never even consider doing it in a package or other code intended for others to use. – Oleksandr R. Oct 13 '15 at 11:41
  • @OleksandrR. OK, Thank you so much for your answer. – matheorem Oct 13 '15 at 11:43
  • @OleksandrR. Oh, one more question. Like this link says http://mathematica.stackexchange.com/a/55037/4742 To set up a mingw-64 compiler, we need CCompilerDriver. If we don't load it, how can we done this? – matheorem Oct 13 '15 at 11:47
  • @OleksandrR. Oh, I understand, it is the same thing. Thank you for let me know this context thing – matheorem Oct 13 '15 at 11:53
  • CCompilerDriver\`` is a package, unlike theDeveloper`` context. It is meant to be loaded this way and should not contain any shadowing symbols to begin with. This is the responsibility of the package authors, and since this is WRI, if there are any shadowing symbols then it is a bug. I just don't think it's a good idea to add arbitrary contexts to the path as if they were packages, because they are not, and thus there are no real guarantees about what they might contain. – Oleksandr R. Oct 13 '15 at 12:09
  • @OleksandrR. It turns out that I did't understand at all before your comment. I should read documentations on context and packages. Thank you for your kind remind :) – matheorem Oct 13 '15 at 12:21
  • @OleksandrR. Though the comment is way too long. After I read the documentations, I still got confused. First, the doc say Developer is also a package. As I understand it, context is just the path of package. Second, If SetSystemOptions really has already been moved out of Developer, then loading Developer shall not shadow SetSystemOptions, because there is no SetSystemOptions in Developer, only one in System context. So current shadowing means that there is still a SetSystemOptions in Developer, am I right? – matheorem Oct 13 '15 at 13:27
  • You are right; it seems the documentation does indeed call Developer\`` a package. Although it is not a package in the ordinary sense (the context is fully populated and so the package does not need to be loaded), with such a claim being given, it should certainly be safe to add it to the context path in this way without shadowing problems, i.e. they probably should have removedDeveloper`SetSystemOptionssome time ago. If you do not like the message, you have the option toOffit, or to unprotect and removeDeveloper`SystemOptionsandDeveloper`SetSystemOptions`. – Oleksandr R. Oct 13 '15 at 16:06

0 Answers0