GSoC/GCI Archive
Google Code-in 2010 Parrot Foundation and The Perl Foundation

Warnings function for experimental features

completed by: Fernando Brito

mentors: whiteknight

Task Description: The parrot community designates certain features of Parrot to be "supported", "deprecated", or "experimental". Deprecated features are old features which are planned to be changed or removed. Experimental features are things that are new, and are not yet able to be relied upon. Parrot provides a mechanism for warning the user when a deprecated feature is used in their software. The function Parrot_warn_deprecated() in src/warnings.c prints out a warning message if the user has set a flag to see those types of messages. We would like the same thing for experimental features as well.

To complete this task:

  1. Create a fork of the parrot/parrot repository on github.
  2. Add a new flag PARROT_WARNINGS_EXPERIMENTAL_FLAG to the list in include/parrot/warnings.h
  3. Create a new function Parrot_warn_experimental() in src/warnings.c that mirrors the functionality of Parrot_warn_deprecated in that same function. Include documentation in the same format.
  4. Look through the file DEPRECATED.pod. For every feature listed as experimental, try to insert a call to the new Parrot_warn_experimental function
  5. Run "make test" to verify that all existing tests pass
  6. Test your new feature by using "parrot -w" to set your new warning flag, and execute a small test script to see that a warning message is printed. If you run the same program without the "-w" command line option, it should print no message
  7. Open a pull request on parrot/parrot to get your changes merged in.