System for marking obsolete methods
As mentioned in #730 we want to be able to mark something in the main branch as obsolete/deprecated, so it should print a warning that it will be removed soon.
We could do something like Semigroups with its obsolete.gi file, but we should think about how to do this in a nice way with synonyms.
This should probably be a function called something like DIGRAPHS_DeclareObsoleteSynonym that installs a new global function with the desired name that prints a warning and then simply calls the existing thing.
@mtorpey @james-d-mitchell I had a suggestion on how to implement https://github.com/digraphs/Digraphs/issues/735 as well (as an extension to https://github.com/digraphs/Digraphs/pull/730):
- We could define a helper function
DeclareDeprecatedSynonymwhich creates something like a wrapper that prints the warning and uses theApplyfucntion of GAP to forward the arbitrary number of arguments to the new function. - We can then bind this wrapper to the name
DigraphDijkstra(astringas can be seen inDeclareSynonym) using aDeclareDeprecatedSynonym. This way every call toDigraphDijkstratriggers the warning before executingDigraphShortestPathsand then can run the updated function name which isDigraphShortestPathsin this case.
@devansh2605 is going to ty this!
@mtorpey @james-d-mitchell This is also complete can we pls move this to under review?