please icon indicating copy to clipboard operation
please copied to clipboard

Add stacktrace builtin

Open izissise opened this issue 2 years ago • 3 comments

return a list of dict containing filename, package_name, subrepo and function leading to the current scope where stacktrace was called

This useful when using breakpoint() to have a stacktrace. Also it can be useful to tag current function name to a build_rule

izissise avatar Aug 18 '23 17:08 izissise

I'm not convinced we need this. The build language is meant to be minimal and it isn't meant to need to do a lot of introspection - the syntax is Pythonic but it deliberately doesn't have a lot of Python's dynamism.

peterebden avatar Aug 20 '23 10:08 peterebden

While I understand the intention behind keeping the build language minimal, having stacktrace feature can improve debugging and development efficiency. It can also be beneficial for newcomers as a way to understand how subinclude and subrepo work.

It is true that it introduce some dynamism, but I don't see any-other alternative to able to a genrule with the current function name.

Regards, Hugues

izissise avatar Aug 21 '23 08:08 izissise

This issue has been automatically marked as stale because it has not had any recent activity in the past 90 days. It will be closed if no further activity occurs. If you require additional support, please reply to this message. Thank you for your contributions.

stale[bot] avatar Dec 15 '23 07:12 stale[bot]

I still would like this feature, to auto generate rules name from the function name or the N-1 function name. Is there an alternative way to do this ?

izissise avatar Mar 17 '24 17:03 izissise