Skip to content

Commit

Permalink
Add initial logging rework deprecation warnings to docs. #168
Browse files Browse the repository at this point in the history
  • Loading branch information
amykyta3 committed Apr 21, 2023
1 parent 37496b7 commit 0b7eeec
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/api/messages.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ Exceptions

Message Handling
----------------

.. warning::

The ``MessagePrinter`` and ``MessageHandler`` classes will be deprecated in
a future release. See the following page for details: https://github.com/SystemRDL/systemrdl-compiler/issues/168

.. autoclass:: systemrdl.messages.MessagePrinter
:members:

Expand Down
4 changes: 4 additions & 0 deletions systemrdl/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ def __init__(self, **kwargs: Any):
raise TypeError("got an unexpected keyword argument '%s'" % list(kwargs.keys())[0])

#: Reference to the compiler's :class:`~systemrdl.messages.MessageHandler` object
#:
#: .. warning::
#:
#: This will be deprecated in a future release. See this page for more details: https://github.com/SystemRDL/systemrdl-compiler/issues/168
self.msg = self.env.msg

self.namespace = NamespaceRegistry(self.env) # type: NamespaceRegistry
Expand Down
4 changes: 4 additions & 0 deletions systemrdl/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ def __init__(self, compiler: RDLCompiler):
self.compiler = compiler

#: Reference to the compiler message handler
#:
#: .. warning::
#:
#: This will be deprecated in a future release. See this page for more details: https://github.com/SystemRDL/systemrdl-compiler/issues/168
self.msg = compiler.env.msg

#: Source reference used by default when not specified in importer
Expand Down

0 comments on commit 0b7eeec

Please sign in to comment.