SysX Activity.span fails with value is null exception #1163
Replies: 2 comments 1 reply
-
One idea to consider would be an Analyser project. There are a number of rules that are not hard to implement and would provide fixes and advise to developers, some that come to mind,
I know it's not a new idea, but it holds a lot of purchase with me as I have a lot of code and developers who are new to fp, analysers are great learning tools. |
Beta Was this translation helpful? Give feedback.
-
It's a part of the library that hasn't yet been converted to understand nullable references. But, to be clear, Admitedly these motivations were born in the pre-nullable reference days, and it may be worth removing the built-in nullable protections (and the My advice would be not use
Which is why in the example runtimes [it's wrapped in an
I disagree, that adds unnecessary performance overhead. The idea with the use of If you're building a runtime from scratch then I'd advise using static interface methods for stateless ad-hoc behaviours. I'll be looking at ways I can provide better built-in runtimes with v5. Of course you're completely free to implement your runtimes however you like, nothing is imposed on you, (other than the For work I am currently on a Haskell project, and we've come up with some interesting approaches to doing effectful traits that I'd like to bring inti language-ext when I get time. Also when I update to the CodeGen system to use Source-Generators, I'd like to see if there's a novel approach to generating runtimes from traits+implementations. That might be a bit pie in the sky, but the boilerplate of building the runtime should be automatable to a certain extent. |
Beta Was this translation helpful? Give feedback.
-
Any usage of Activity.span will throw a value is null exception.
See attached branch and tests for example. main...bmazzarol:language-ext:bugfix/activity_issues
Tests showing the issues
https://github.com/bmazzarol/language-ext/blob/bugfix/activity_issues/LanguageExt.Tests/ActivityTests.cs
https://github.com/bmazzarol/language-ext/blob/bugfix/activity_issues/LanguageExt.Tests/FinNullabilityIssueTests.cs
Working Activity (My copy)
https://github.com/bmazzarol/language-ext/blob/bugfix/activity_issues/LanguageExt.SysX/SysX/Diag/Activity2.cs
There are a few issues,
Starting this issue to talk through ways to resolve the follow,
Beta Was this translation helpful? Give feedback.
All reactions