stevedlawrence opened a new pull request, #1537: URL: https://github.com/apache/daffodil/pull/1537
Scala 3 changed how lazy vals work so that circular lazy vals result in a deadlock. OOLAG was written to detect circular dependencies, but its internal use of lazy vals could lead to these lazy val deadlocks in cases of circular dependencies. Fortunately, the OOLAG lazy vals can be replaced with defs without any real functional changes since OOLAG already has logic to handle its own lazy evaluation--the `var value_: Maybe` is Nope until the OOLAG gets a value and is One once the OOLAG lazy evaluation complete. The existing logic already handles checking and mutating the value_ variable correctly. All that we lose by switching some lazy vals to defs is we now have to check value_ every time an OOLAG is accessed instead of storing it in a lazy val once its finally evaluated, but that should be pretty minimal overhead, especially since OOLAG values are usually stored in other variables once accessed. DAFFODIL-2986 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
