Replace experimental warning with deprecated warning for MzScheme

Use an 'in your face deprecation' notice to publicise the deprecation
to try help find a new maintainer for Racket.
This commit is contained in:
William S Fulton 2024-09-27 08:07:58 +01:00
parent acedb76f9f
commit 3b982b6d1b
4 changed files with 15 additions and 2 deletions

View File

@ -224,6 +224,7 @@
#define WARN_LANG_EXPERIMENTAL 524
#define WARN_LANG_DIRECTOR_FINAL 525
#define WARN_LANG_USING_NAME_DIFFERENT 526
#define WARN_LANG_DEPRECATED 527
/* -- Doxygen comments -- */

View File

@ -1304,6 +1304,12 @@ int SWIG_main(int argc, char *argv[], const TargetLanguageModule *tlm) {
"Target language %s specified by %s is an experimental language. "
"Please read about SWIG experimental languages, https://swig.org/Doc4.0/Introduction.html#Introduction_experimental_status.\n",
tlm->help ? tlm->help : "", tlm->name);
} else if (tlm->status == Deprecated) {
Swig_warning(WARN_LANG_DEPRECATED, "SWIG", 1, "Deprecated target language. "
"Target language %s specified by %s is a deprecated target language. "
"It will be removed in the next release of SWIG unless a new maintainer steps forward "
"to bring it up to experimental status, see https://swig.org/Doc4.0/Introduction.html#Introduction_experimental_status.\n",
tlm->help ? tlm->help : "", tlm->name);
}
lang->top(top);

View File

@ -64,7 +64,7 @@ static TargetLanguageModule modules[] = {
{"-javascript", swig_javascript, "Javascript", Supported},
{"-lua", swig_lua, "Lua", Supported},
{"-modula3", NULL, "Modula 3", Disabled},
{"-mzscheme", swig_mzscheme, "MzScheme/Racket", Experimental},
{"-mzscheme", swig_mzscheme, "MzScheme/Racket", Deprecated},
{"-ocaml", swig_ocaml, "OCaml", Experimental},
{"-octave", swig_octave, "Octave", Supported},
{"-perl", swig_perl5, NULL, Supported},
@ -257,6 +257,12 @@ int main(int margc, char **margv) {
Printf(stdout, " %-15s - Generate %s wrappers\n", modules[j].name, modules[j].help);
}
}
Printf(stdout, "\nDeprecated Target Language Options\n");
for (int j = 0; modules[j].name; j++) {
if (modules[j].help && modules[j].status == Deprecated) {
Printf(stdout, " %-15s - Generate %s wrappers\n", modules[j].name, modules[j].help);
}
}
// Swig_mark_arg not called as the general -help options also need to be displayed later on
}
}

View File

@ -359,7 +359,7 @@ extern "C" {
typedef Language *(*ModuleFactory) (void);
}
enum Status {Disabled, Experimental, Supported};
enum Status {Disabled, Deprecated, Experimental, Supported};
struct TargetLanguageModule {
const char *name;