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



##########
File path: 
server/core/src/main/scala/org.apache.daffodil.debugger.dap/Parse.scala
##########
@@ -364,7 +363,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())

Review comment:
       So, not so much about this bug, but the jar-file limiations..... 
   
   You are having to jump through hoops like this here, because startElement 
doesn't give you anyway to get the jar file URL that you could open to get the 
source when that element's decl is coming from a jar. The schemaLocation is 
likely some absolute path that has to do with when directory structure when the 
jar was created, not how to retrieve the source from that jar file. 
   
   Let's think of what exactly you would want startElement to have on it to 
make this debug front end as simple as possible, then we can figure out how to 
make it easy to get that. 
   
   I think you need a URI/URL that you can do openConnection on to grab the 
source of the schema file, and you need the relative path to it - for labeling 
it meaningfully on the display of files without having a bunch of URI-jar 
artifacts in the name, and finally, you do need a status of exactly what jar 
that came from, and the fact that it came from a classpath jar, not just a 
directory. 
   
   Basically, I am suggesting we enhance the SchemaFileLocation object to have 
exactly the needed information on it. 




-- 
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]


Reply via email to