You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by GitBox <gi...@apache.org> on 2022/03/10 20:36:21 UTC

[GitHub] [daffodil-vscode] Shanedell commented on a change in pull request #87: Always use the current schema location for the breakpoint.

Shanedell commented on a change in pull request #87:
URL: https://github.com/apache/daffodil-vscode/pull/87#discussion_r824134190



##########
File path: server/core/src/main/scala/org.apache.daffodil.debugger.dap/Parse.scala
##########
@@ -364,7 +362,12 @@ object Parse {
         startElement.name.map(_.value).getOrElse("???"),
         /* If sourceReference > 0 the contents of the source must be retrieved through
          * the SourceRequest (even if a path is specified). */
-        new Types.Source(schemaPath.toString, 0),
+        Try(Paths.get(URI.create(startElement.schemaLocation.uriString)).toString())
+          .fold(
+            _ =>
+              new Types.Source(startElement.schemaLocation.uriString, null, 0), // there is no valid path if the location is a schema contained in a jar file; see #76.

Review comment:
       I agree to both side that this line does seem long but does not show up in the scala formatting. Does scalafmt not count comment string in the line width? Maybe can the comment can be moved above`new Types.Source(startElement.schemaLocation.uriString, null, 0),` instead of on the same line?




-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org