[PATCH] build: Print item UID in case of errors

Kinsey Moore kinsey.moore at oarcorp.com
Mon Mar 6 16:04:57 UTC 2023


Looks good. A welcome improvement for anyone working on the build system.

Kinsey

On Mon, Mar 6, 2023 at 9:40 AM Sebastian Huber <
sebastian.huber at embedded-brains.de> wrote:

> This helps to identify issues in build items.
> ---
>  wscript | 14 ++++++++++++--
>  1 file changed, 12 insertions(+), 2 deletions(-)
>
> diff --git a/wscript b/wscript
> index a34cac51e2..567f42db2f 100755
> --- a/wscript
> +++ b/wscript
> @@ -214,14 +214,24 @@ class Item(object):
>              self.prepare_configure(conf, cic)
>              for p in self.links():
>                  p.configure(conf, cic)
> -            self.do_configure(conf, cic)
> +            try:
> +                self.do_configure(conf, cic)
> +            except Exception as e:
> +                raise type(e)(
> +                    "Configuration error related to item spec:{}:
> {}".format(
> +                        self.uid, str(e)))
>
>      def build(self, bld, bic):
>          if _is_enabled(bld.env.ENABLE, self.get_enabled_by()):
>              bic = self.prepare_build(bld, bic)
>              for p in self.links():
>                  p.build(bld, bic)
> -            self.do_build(bld, bic)
> +            try:
> +                self.do_build(bld, bic)
> +            except Exception as e:
> +                raise type(e)(
> +                    "Build error related to item spec:{}: {}".format(
> +                        self.uid, str(e)))
>
>      def do_defaults(self, enabled):
>          return
> --
> 2.35.3
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20230306/013a1ba0/attachment-0001.htm>


More information about the devel mailing list