arosien commented on code in PR #990:
URL: https://github.com/apache/daffodil-vscode/pull/990#discussion_r1521814189
##########
debugger/src/main/scala/org.apache.daffodil.debugger.dap/DAPodil.scala:
##########
@@ -748,11 +748,24 @@ object DAPodil extends IOApp {
copy(value = value + (uri.normalize -> lines))
def contains(location: Location): Boolean =
- value.exists {
- // format: off
- case (uri, lines) =>
- uri == location.uri && lines.exists(_ == location.line)
- // format: on
+ value.exists { case (uri, lines) =>
Review Comment:
The sibling code of the normalized breakpoint URL is [the normalization of
the schema location from
Daffodil](https://github.com/arosien/daffodil-vscode/blob/92194c1830fd73e999fbde5a7bd1af085396eb50/debugger/src/main/scala/org.apache.daffodil.debugger.dap/Parse.scala):
```scala
def createLocation(loc: SchemaFileLocation): DAPodil.Location =
DAPodil.Location(
URI.create(loc.uriString).normalize,
DAPodil.Line(loc.lineNumber.map(_.toInt).getOrElse(0))
)
```
so any change in `Breakpoints.contains` should match. The current
implementation, with `normalize`, was intended to make equivalent URLs compare
as equals. So is that not the case, and this Windows-specific "extra
normalization" is required?
--
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]