<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, May 29, 2014 at 7:41 PM, Jed Brown <span dir="ltr"><<a href="mailto:jed@jedbrown.org" target="_blank">jed@jedbrown.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>> writes:<br>
> We could have a deprecation interface that checks each option on input<br>
> to the DB, compares to a list of deprecated options, and gives the<br>
> replacement in the error message. It would have to look for suffixes I<br>
> guess.<br>
<br>
That sounds like a centralized list of deprecated options. I think I'd<br>
rather keep the deprecated statement located at the original site.<br></blockquote><div><br></div><div>This has advantages. but I wanted early termination.</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
ierr = PetscObjectOptionsBegin((PetscObject)dm);CHKERRQ(ierr);<br>
<br>
// ... in DA implementation code<br>
ierr = PetscOptionsDeprecatedAlias("-da_view","-dm_view");CHKERRQ(ierr);<br>
<br>
This would interpret the prefix correctly, so we would just get an<br>
unused warning for options that were previously unused, but deprecated<br>
error/warning for actually deprecated options. In this case, we<br>
trivially know how to interpret -da_view, so could get away with just<br>
warning. Perhaps also<br>
<br>
PetscOptionsDeprecated("-old_option","Explain that objects changed so that -various -new_options are needed");<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener
</div></div>