You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by ol...@apache.org on 2026/10/13 17:32:02 UTC
(daffodil) branch main updated: Remove withRetryIfBlocking and make the typed equality operators inline
This is an automated email from the ASF dual-hosted git repository.
olabusayoT pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/daffodil.git
The following commit(s) were added to refs/heads/main by this push:
new 816f2253c Remove withRetryIfBlocking and make the typed equality operators inline
816f2253c is described below
commit 816f2253c0a8ad752d999b3857ff0e504193d7ae
Author: olabusayoT <50...@users.noreply.github.com>
AuthorDate: Tue Oct 13 13:10:01 2026 -0400
Remove withRetryIfBlocking and make the typed equality operators inline
withRetryIfBlocking ran its body once and let a RetryableException propagate to the suspension machinery, which retries it later, so all it added was a closure per call. It is removed along with the commented-out coroutine notes in DState, call sites evaluate the expression directly, and getLength no longer takes a DState.
The typed equality operators (=#=, !=#=, =:=, !=:=, _eq_, _ne_) are extension methods with inline receivers and operands, so each call site compares with its operands' static types and neither a wrapper object nor a boxed operand is created. TypeEquality is now only the compile-time proof that the two types are related; it is an inline using parameter that is never evaluated, and its givens are inline. Files that use the operators import the equality package with a wildcard.
No functional change.
DAFFODIL-3065
---
.../daffodil/core/dsom/RuntimePropertyMixins.scala | 2 +-
.../grammar/primitives/ElementCombinator.scala | 2 +-
.../org/apache/daffodil/lib/TypedEquality.scala | 53 +++++++------
.../lib/schema/annotation/props/ByHandMixins.scala | 2 +-
.../org/apache/daffodil/lib/xml/QNameBase.scala | 2 +-
.../daffodil/runtime1/dpath/DFDLFunctions2.scala | 46 ++++++-----
.../apache/daffodil/runtime1/dpath/DState.scala | 89 +---------------------
.../daffodil/runtime1/dpath/UpDownMoves.scala | 17 ++---
.../daffodil/runtime1/infoset/InfosetImpl.scala | 3 +-
.../runtime1/processors/PackedBinaryTraits.scala | 2 +-
.../runtime1/processors/dfa/Registers.scala | 2 +-
.../unparsers/runtime1/DelimitedUnparsers.scala | 2 +-
.../io/TestInputSourceDataInputStream.scala | 2 +-
13 files changed, 67 insertions(+), 157 deletions(-)
diff --git a/daffodil-core/src/main/scala/org/apache/daffodil/core/dsom/RuntimePropertyMixins.scala b/daffodil-core/src/main/scala/org/apache/daffodil/core/dsom/RuntimePropertyMixins.scala
index 4145d8fed..59413a139 100644
--- a/daffodil-core/src/main/scala/org/apache/daffodil/core/dsom/RuntimePropertyMixins.scala
+++ b/daffodil-core/src/main/scala/org/apache/daffodil/core/dsom/RuntimePropertyMixins.scala
@@ -17,7 +17,7 @@
package org.apache.daffodil.core.dsom
-import org.apache.daffodil.lib.equality.TypeEqual
+import org.apache.daffodil.lib.equality.*
import org.apache.daffodil.lib.exceptions.Assert
import org.apache.daffodil.lib.schema.annotation.props.Found
import org.apache.daffodil.lib.schema.annotation.props.TextStandardExponentRepMixin
diff --git a/daffodil-core/src/main/scala/org/apache/daffodil/core/grammar/primitives/ElementCombinator.scala b/daffodil-core/src/main/scala/org/apache/daffodil/core/grammar/primitives/ElementCombinator.scala
index 0dcc7ad5c..fb5ee24af 100644
--- a/daffodil-core/src/main/scala/org/apache/daffodil/core/grammar/primitives/ElementCombinator.scala
+++ b/daffodil-core/src/main/scala/org/apache/daffodil/core/grammar/primitives/ElementCombinator.scala
@@ -22,7 +22,7 @@ import org.apache.daffodil.core.grammar.EmptyGram
import org.apache.daffodil.core.grammar.Gram
import org.apache.daffodil.core.grammar.NamedGram
import org.apache.daffodil.core.grammar.Terminal
-import org.apache.daffodil.lib.equality.TypeEqual
+import org.apache.daffodil.lib.equality.*
import org.apache.daffodil.lib.exceptions.Assert
import org.apache.daffodil.lib.schema.annotation.props.gen.LengthKind
import org.apache.daffodil.lib.schema.annotation.props.gen.Representation
diff --git a/daffodil-core/src/main/scala/org/apache/daffodil/lib/TypedEquality.scala b/daffodil-core/src/main/scala/org/apache/daffodil/lib/TypedEquality.scala
index bea388363..c23ca9b94 100644
--- a/daffodil-core/src/main/scala/org/apache/daffodil/lib/TypedEquality.scala
+++ b/daffodil-core/src/main/scala/org/apache/daffodil/lib/TypedEquality.scala
@@ -43,9 +43,12 @@ package object equality {
// Convertible types - strongly typed equality
- implicit class ViewEqual[T](val left: T) extends AnyVal {
- @inline def =#=(right: T) = left == right
- @inline def !=#=(right: T) = left != right
+ // The operators are inline extension methods with inline receivers so each
+ // call site compares with its operands' static types, and neither a wrapper
+ // object nor a boxed operand is created.
+ extension [T](inline left: T) {
+ inline def =#=(inline right: T): Boolean = left == right
+ inline def !=#=(inline right: T): Boolean = left != right
}
// implicit class ViewEqual[L](val left: L) extends AnyVal {
// def =#=[R](right: R)(implicit equality: ViewEquality[L, R]): Boolean =
@@ -87,41 +90,43 @@ package object equality {
// Type wise - allows bi-directional subtypes, not just subtype on right.
- implicit class TypeEqual[L <: AnyRef](val left: L) extends AnyVal {
- @inline def =:=[R <: AnyRef](right: R)(implicit equality: TypeEquality[L, R]): Boolean =
- equality.areEqual(left, right)
- @inline def !=:=[R <: AnyRef](right: R)(implicit equality: TypeEquality[L, R]): Boolean =
- !equality.areEqual(left, right)
- @inline def _eq_[R <: AnyRef](right: R)(implicit equality: TypeEquality[L, R]): Boolean =
- equality.areEq(left, right)
- @inline def _ne_[R <: AnyRef](right: R)(implicit equality: TypeEquality[L, R]): Boolean =
- !equality.areEq(left, right)
+ // The given TypeEquality is only the compile-time proof that L and R are
+ // in a subtype relationship; it is an inline parameter so it is never evaluated.
+ extension [L <: AnyRef](inline left: L) {
+ inline def =:=[R <: AnyRef](inline right: R)(using
+ inline equality: TypeEquality[L, R]
+ ): Boolean =
+ left == right
+ inline def !=:=[R <: AnyRef](inline right: R)(using
+ inline equality: TypeEquality[L, R]
+ ): Boolean =
+ left != right
+ inline def _eq_[R <: AnyRef](inline right: R)(using
+ inline equality: TypeEquality[L, R]
+ ): Boolean =
+ left eq right
+ inline def _ne_[R <: AnyRef](inline right: R)(using
+ inline equality: TypeEquality[L, R]
+ ): Boolean =
+ left ne right
}
@implicitNotFound("Typed equality requires ${L} and ${R} to be in a subtype relationship!")
- private[equality] sealed trait TypeEquality[L <: AnyRef, R <: AnyRef] {
- def areEqual(left: L, right: R): Boolean
- def areEq(left: L, right: R): Boolean
- }
+ private[equality] sealed trait TypeEquality[L <: AnyRef, R <: AnyRef]
private[equality] object TypeEquality extends LowPriorityTypeEqualityImplicits {
- @inline implicit def rightSubtypeOfLeftEquality[L <: AnyRef, R <: L]: TypeEquality[L, R] =
+ inline given rightSubtypeOfLeftEquality[L <: AnyRef, R <: L]: TypeEquality[L, R] =
AnyTypeEquality.asInstanceOf[TypeEquality[L, R]]
}
private[equality] trait LowPriorityTypeEqualityImplicits {
- @inline implicit def leftSubtypeOfRightEquality[R <: AnyRef, L <: R]: TypeEquality[L, R] =
+ inline given leftSubtypeOfRightEquality[R <: AnyRef, L <: R]: TypeEquality[L, R] =
AnyTypeEquality.asInstanceOf[TypeEquality[L, R]]
}
// must be public or scala compiler complains that it can't embed the
// static reference.
//
- object AnyTypeEquality extends TypeEquality[AnyRef, AnyRef] {
- @inline override def areEqual(left: AnyRef, right: AnyRef): Boolean =
- left == right
- @inline override def areEq(left: AnyRef, right: AnyRef): Boolean =
- left eq right
- }
+ object AnyTypeEquality extends TypeEquality[AnyRef, AnyRef]
// exact type equality
//
diff --git a/daffodil-core/src/main/scala/org/apache/daffodil/lib/schema/annotation/props/ByHandMixins.scala b/daffodil-core/src/main/scala/org/apache/daffodil/lib/schema/annotation/props/ByHandMixins.scala
index cc1229a58..92052dcdf 100644
--- a/daffodil-core/src/main/scala/org/apache/daffodil/lib/schema/annotation/props/ByHandMixins.scala
+++ b/daffodil-core/src/main/scala/org/apache/daffodil/lib/schema/annotation/props/ByHandMixins.scala
@@ -31,7 +31,7 @@ import org.apache.daffodil.lib.cookers.TextStandardInfinityRepCooker
import org.apache.daffodil.lib.cookers.TextStandardNaNRepCooker
import org.apache.daffodil.lib.cookers.TextStandardZeroRepCooker
import org.apache.daffodil.lib.cookers.TextStringPadCharacterCooker
-import org.apache.daffodil.lib.equality.ViewEqual
+import org.apache.daffodil.lib.equality.*
import org.apache.daffodil.lib.exceptions.Assert
import org.apache.daffodil.lib.exceptions.ThrowsSDE
import org.apache.daffodil.lib.iapi.DaffodilTunables
diff --git a/daffodil-core/src/main/scala/org/apache/daffodil/lib/xml/QNameBase.scala b/daffodil-core/src/main/scala/org/apache/daffodil/lib/xml/QNameBase.scala
index 6ed812a6e..8c44cef2c 100644
--- a/daffodil-core/src/main/scala/org/apache/daffodil/lib/xml/QNameBase.scala
+++ b/daffodil-core/src/main/scala/org/apache/daffodil/lib/xml/QNameBase.scala
@@ -21,7 +21,7 @@ import java.net.URI
import java.net.URISyntaxException
import scala.util.Try
-import org.apache.daffodil.lib.equality.TypeEqual
+import org.apache.daffodil.lib.equality.*
import org.apache.daffodil.lib.exceptions.Assert
import org.apache.daffodil.lib.iapi.UnqualifiedPathStepPolicy
diff --git a/daffodil-core/src/main/scala/org/apache/daffodil/runtime1/dpath/DFDLFunctions2.scala b/daffodil-core/src/main/scala/org/apache/daffodil/runtime1/dpath/DFDLFunctions2.scala
index fa3c0153f..dfd87721a 100644
--- a/daffodil-core/src/main/scala/org/apache/daffodil/runtime1/dpath/DFDLFunctions2.scala
+++ b/daffodil-core/src/main/scala/org/apache/daffodil/runtime1/dpath/DFDLFunctions2.scala
@@ -32,32 +32,30 @@ sealed abstract class DFDLLengthFunctionBase(kind: String, recipes: List[Compile
protected def lengthState(elt: DIElement): LengthState
- protected def getLength(elt: DIElement, units: LengthUnits, dstate: DState): ULong = {
+ protected def getLength(elt: DIElement, units: LengthUnits): ULong = {
val len: ULong =
- DState.withRetryIfBlocking(dstate) {
- units match {
- case LengthUnits.Bits => lengthState(elt).lengthInBits
- case LengthUnits.Bytes => lengthState(elt).lengthInBytes
- case LengthUnits.Characters => {
- //
- // TODO: We could warn about taking lengthInCharacters of something
- // that isn't all text, but it's not required that it be purely
- // text. DFDL lets you mix text and binary and then search it for
- // delimiters or run regex patterns to parse it. You have to know what
- // you are doing.
- // Furthermore, in fixed-width encodings, this length can be computed
- // from the length-in-bits by just dividing by a codepoint width
- // code point width.
- //
- val nyi = new IllegalArgumentException(
- "dfdl:%sLength's second argument of 'characters' is not yet supported.".format(
- kind
- )
+ units match {
+ case LengthUnits.Bits => lengthState(elt).lengthInBits
+ case LengthUnits.Bytes => lengthState(elt).lengthInBytes
+ case LengthUnits.Characters => {
+ //
+ // TODO: We could warn about taking lengthInCharacters of something
+ // that isn't all text, but it's not required that it be purely
+ // text. DFDL lets you mix text and binary and then search it for
+ // delimiters or run regex patterns to parse it. You have to know what
+ // you are doing.
+ // Furthermore, in fixed-width encodings, this length can be computed
+ // from the length-in-bits by just dividing by a codepoint width
+ // code point width.
+ //
+ val nyi = new IllegalArgumentException(
+ "dfdl:%sLength's second argument of 'characters' is not yet supported.".format(
+ kind
)
- elt.erd.SDE(nyi)
- // lengthState(elt).lengthInCharacters
- }
+ )
+ elt.erd.SDE(nyi)
+ // lengthState(elt).lengthInCharacters
}
}
len
@@ -89,7 +87,7 @@ sealed abstract class DFDLLengthFunctionBase(kind: String, recipes: List[Compile
)
}
- val jLen: JLong = getLength(elt, units, dstate).longValue
+ val jLen: JLong = getLength(elt, units).longValue
jLen
}
}
diff --git a/daffodil-core/src/main/scala/org/apache/daffodil/runtime1/dpath/DState.scala b/daffodil-core/src/main/scala/org/apache/daffodil/runtime1/dpath/DState.scala
index 183eeb21d..e0590a8fe 100644
--- a/daffodil-core/src/main/scala/org/apache/daffodil/runtime1/dpath/DState.scala
+++ b/daffodil-core/src/main/scala/org/apache/daffodil/runtime1/dpath/DState.scala
@@ -31,7 +31,6 @@ import org.apache.daffodil.runtime1.infoset.DISimple
import org.apache.daffodil.runtime1.infoset.DataValue
import org.apache.daffodil.runtime1.infoset.FakeDINode
import org.apache.daffodil.runtime1.infoset.InfosetNoNextSiblingException
-import org.apache.daffodil.runtime1.infoset.RetryableException
import org.apache.daffodil.runtime1.processors.ParseOrUnparseState
import org.apache.daffodil.runtime1.processors.SchemaSetRuntimeData;
object EqualityNoWarn2 { EqualitySuppressUnusedImportWarning() }
@@ -142,60 +141,12 @@ case class DState(
def mode = _mode
- //
- // The purpose of this commented out code was to retry expressions, not
- // from the begining, but closer to where the expression failed. That is
- // for a big complex expression, we would not redo the whole thing, but would
- // block the co-routine right where it was unable to proceed e.g., in a call to
- // node.dataValue, such that when it was resumed, it would resume right there.
- // retry the call to node.dataValue, and then carry on with the rest of the
- // expression.
- //
- // If we don't do this, then we're not taking advantage of that optimization
- // Then we don't really need coroutines at all to implement blocking. We just
- // keep the saved/cloned state around, and retry whatever needed to be done, from scratch.
- //
- // The vast bulk of expressions are going to be fairly small, so this extra
- // overhead vs. the complexity of coroutines?? I think we should move away
- // From coroutines.
- //
- // However, if expressions were to block on the infoset, by queuing themselves
- // adjacent to what they need, then... well you can still just retry the whole
- // expression again, this time knowing it won't block in the same place.
- //
- // private var thisExpressionCoroutine_ : Maybe[Coroutine[AnyRef]] = Nope
- //
- // def setThisExpressionCoroutine(co: Maybe[Coroutine[AnyRef]]) {
- // Assert.usage(mode eq UnparserBlocking)
- // thisExpressionCoroutine_ = co
- // }
- //
- // def thisExpressionCoroutine = {
- // Assert.usage(mode eq UnparserBlocking)
- // thisExpressionCoroutine_
- // }
- //
- // private var coroutineToResumeIfBlocked_ : Maybe[Coroutine[AnyRef]] = Nope
- //
- // def setCoroutineToResumeIfBlocked(co: Maybe[Coroutine[AnyRef]]) {
- // Assert.usage(mode eq UnparserBlocking)
- // coroutineToResumeIfBlocked_ = co
- // }
- //
- // def coroutineToResumeIfBlocked = {
- // Assert.usage(mode eq UnparserBlocking)
- // coroutineToResumeIfBlocked_
- // }
-
def resetValue(): Unit = {
_currentValue = DataValue.NoValue
}
def currentValue: DataValuePrimitiveNullable = {
- if (_currentValue.isEmpty)
- withRetryIfBlocking {
- currentSimple.dataValue
- }
+ if (_currentValue.isEmpty) currentSimple.dataValue
else _currentValue
}
@@ -363,44 +314,6 @@ case class DState(
def fnExists(): Unit = {
// do nothing
}
-
- // @inline // TODO: Performance maybe this won't allocate a closure if this is inline? If not replace with macro
- final def withRetryIfBlocking[T](body: => T): T =
- DState.withRetryIfBlocking(this)(body)
-}
-
-object DState {
-
- // private object ToBeIgnored
-
- // @inline
- final def withRetryIfBlocking[T](ds: DState)(body: => T): T = { // TODO: Performance maybe this won't allocate a closure if this is inline? If not replace with macro
- ds.mode match {
- case _: ParserMode => body
- case UnparserNonBlocking => body
- case UnparserBlocking => {
- var isDone = false
- var res: T = null.asInstanceOf[T]
- while (!isDone) {
- try {
- res = body
- isDone = true
- } catch {
- case e: RetryableException => {
- // we're to block here, and retry subsequently.
- isDone = false
- // if (ds.thisExpressionCoroutine.isDefined && ds.coroutineToResumeIfBlocked.isDefined) {
- // ds.thisExpressionCoroutine.get.resume(ds.coroutineToResumeIfBlocked.get, ToBeIgnored)
- // } else {
- throw e
- // }
- }
- }
- }
- res
- }
- }
- }
}
class DStateForConstantFolding(
diff --git a/daffodil-core/src/main/scala/org/apache/daffodil/runtime1/dpath/UpDownMoves.scala b/daffodil-core/src/main/scala/org/apache/daffodil/runtime1/dpath/UpDownMoves.scala
index d64cff1f6..51a1a682f 100644
--- a/daffodil-core/src/main/scala/org/apache/daffodil/runtime1/dpath/UpDownMoves.scala
+++ b/daffodil-core/src/main/scala/org/apache/daffodil/runtime1/dpath/UpDownMoves.scala
@@ -73,7 +73,7 @@ case class DownElement(nqn: NamedQName) extends RecipeOp {
val now = dstate.currentComplex
// TODO PE ? if doesn't exist should be a processing error.
// It will throw and so will be a PE, but may be poor diagnostic.
- val c = dstate.withRetryIfBlocking(now.getChild(nqn, dstate.tunable))
+ val c = now.getChild(nqn, dstate.tunable)
dstate.setCurrentNode(c.asInstanceOf[DIElement])
}
@@ -100,14 +100,9 @@ case class DownArrayOccurrence(nqn: NamedQName, indexRecipe: CompiledDPath)
// current node to null. And future calls depend on a current node to be set
dstate.setCurrentNode(savedCurrentElement)
val childArrayElementERD =
- dstate.withRetryIfBlocking(
- savedCurrentElement.getChildArray(nqn, dstate.tunable).asInstanceOf[DIArray].erd
- )
- val arr = dstate.withRetryIfBlocking(
- savedCurrentElement.getChildArray(childArrayElementERD, dstate.tunable)
- )
- val occurrence =
- dstate.withRetryIfBlocking(arr(index)) // will throw on out of bounds
+ savedCurrentElement.getChildArray(nqn, dstate.tunable).asInstanceOf[DIArray].erd
+ val arr = savedCurrentElement.getChildArray(childArrayElementERD, dstate.tunable)
+ val occurrence = arr(index) // will throw on out of bounds
dstate.setCurrentNode(occurrence.asInstanceOf[DIElement])
}
@@ -124,7 +119,7 @@ case class DownArray(nqn: NamedQName) extends RecipeOp {
override def run(dstate: DState): Unit = {
val now = dstate.currentComplex
- val arr = dstate.withRetryIfBlocking(now.getChildArray(nqn, dstate.tunable))
+ val arr = now.getChildArray(nqn, dstate.tunable)
Assert.invariant(arr ne null)
dstate.setCurrentNode(arr.asInstanceOf[DIArray])
}
@@ -139,7 +134,7 @@ case class DownArrayExists(nqn: NamedQName) extends RecipeOp {
override def run(dstate: DState): Unit = {
val now = dstate.currentComplex
- val arr = dstate.withRetryIfBlocking(now.getChildArray(nqn, dstate.tunable))
+ val arr = now.getChildArray(nqn, dstate.tunable)
if ((arr eq null) || arr.length == 0)
throw new InfosetNoSuchChildElementException(now, nqn)
diff --git a/daffodil-core/src/main/scala/org/apache/daffodil/runtime1/infoset/InfosetImpl.scala b/daffodil-core/src/main/scala/org/apache/daffodil/runtime1/infoset/InfosetImpl.scala
index 5edb5196e..6d798b92b 100644
--- a/daffodil-core/src/main/scala/org/apache/daffodil/runtime1/infoset/InfosetImpl.scala
+++ b/daffodil-core/src/main/scala/org/apache/daffodil/runtime1/infoset/InfosetImpl.scala
@@ -46,8 +46,7 @@ import org.apache.daffodil.api.metadata.SimpleElementMetadata
import org.apache.daffodil.io.DataOutputStream
import org.apache.daffodil.io.DirectOrBufferedDataOutputStream
import org.apache.daffodil.lib.calendar.DFDLCalendar
-import org.apache.daffodil.lib.equality.TypeEqual
-import org.apache.daffodil.lib.equality.ViewEqual
+import org.apache.daffodil.lib.equality.*
import org.apache.daffodil.lib.exceptions.Assert
import org.apache.daffodil.lib.exceptions.ThinException
import org.apache.daffodil.lib.exceptions.ThrowsSDE
diff --git a/daffodil-core/src/main/scala/org/apache/daffodil/runtime1/processors/PackedBinaryTraits.scala b/daffodil-core/src/main/scala/org/apache/daffodil/runtime1/processors/PackedBinaryTraits.scala
index a29163c3c..1a8591671 100644
--- a/daffodil-core/src/main/scala/org/apache/daffodil/runtime1/processors/PackedBinaryTraits.scala
+++ b/daffodil-core/src/main/scala/org/apache/daffodil/runtime1/processors/PackedBinaryTraits.scala
@@ -22,7 +22,7 @@ import java.math.BigInteger as JBigInteger
import java.nio.charset.StandardCharsets
import org.apache.daffodil.io.processors.charset.StandardBitsCharsets
-import org.apache.daffodil.lib.equality.TypeEqual
+import org.apache.daffodil.lib.equality.*
import org.apache.daffodil.lib.exceptions.Assert
import org.apache.daffodil.lib.schema.annotation.props.gen.YesNo
import org.apache.daffodil.lib.util.Maybe
diff --git a/daffodil-core/src/main/scala/org/apache/daffodil/runtime1/processors/dfa/Registers.scala b/daffodil-core/src/main/scala/org/apache/daffodil/runtime1/processors/dfa/Registers.scala
index 171012cc1..4cdeca203 100644
--- a/daffodil-core/src/main/scala/org/apache/daffodil/runtime1/processors/dfa/Registers.scala
+++ b/daffodil-core/src/main/scala/org/apache/daffodil/runtime1/processors/dfa/Registers.scala
@@ -19,7 +19,7 @@ package org.apache.daffodil.runtime1.processors.dfa
import org.apache.daffodil.io.DataInputStream
import org.apache.daffodil.io.FormatInfo
-import org.apache.daffodil.lib.equality.ViewEqual
+import org.apache.daffodil.lib.equality.*
import org.apache.daffodil.lib.util.Pool
import org.apache.daffodil.lib.util.Poolable
import org.apache.daffodil.runtime1.processors.DelimiterIterator
diff --git a/daffodil-core/src/main/scala/org/apache/daffodil/unparsers/runtime1/DelimitedUnparsers.scala b/daffodil-core/src/main/scala/org/apache/daffodil/unparsers/runtime1/DelimitedUnparsers.scala
index bbb681444..eba9b6392 100644
--- a/daffodil-core/src/main/scala/org/apache/daffodil/unparsers/runtime1/DelimitedUnparsers.scala
+++ b/daffodil-core/src/main/scala/org/apache/daffodil/unparsers/runtime1/DelimitedUnparsers.scala
@@ -20,7 +20,7 @@ package org.apache.daffodil.unparsers.runtime1
import java.nio.charset.MalformedInputException
import java.nio.charset.UnmappableCharacterException
-import org.apache.daffodil.lib.equality.ViewEqual
+import org.apache.daffodil.lib.equality.*
import org.apache.daffodil.lib.schema.annotation.props.gen.GenerateEscape
import org.apache.daffodil.lib.util.Logger
import org.apache.daffodil.lib.util.Maybe
diff --git a/daffodil-core/src/test/scala/org/apache/daffodil/io/TestInputSourceDataInputStream.scala b/daffodil-core/src/test/scala/org/apache/daffodil/io/TestInputSourceDataInputStream.scala
index 967eae726..8602d387f 100644
--- a/daffodil-core/src/test/scala/org/apache/daffodil/io/TestInputSourceDataInputStream.scala
+++ b/daffodil-core/src/test/scala/org/apache/daffodil/io/TestInputSourceDataInputStream.scala
@@ -24,7 +24,7 @@ import java.util.regex.Pattern
import org.apache.daffodil.core.util.TestUtils.intercept
import org.apache.daffodil.io.processors.charset.StandardBitsCharsets
-import org.apache.daffodil.lib.equality.TypeEqual
+import org.apache.daffodil.lib.equality.*
import org.apache.daffodil.lib.schema.annotation.props.gen.BitOrder
import org.apache.daffodil.lib.schema.annotation.props.gen.ByteOrder
import org.apache.daffodil.lib.schema.annotation.props.gen.EncodingErrorPolicy