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 2021/12/02 15:50:50 UTC

[GitHub] [daffodil-vscode] mbeckerle opened a new issue #57: need config dialog ability to setup daffodil classpath

mbeckerle opened a new issue #57:
URL: https://github.com/apache/daffodil-vscode/issues/57


   Standard schema file layout uses src/main/resources as a root for include/import files, as well as src/test/resources. Hundreds of DFDL schemas exist using the standard DFDL schema project layout: https://daffodil.apache.org/dfdl-layout/
   
   Users need a way to conveniently specify the directories which must be classpath roots. This can be rudimentary at first. (based on a folder/file chooser)
   
   Furthermore, these directories can span mulltiple different directories - e.g., the PCAP DFDL schema (https://github.com/DFDLSchemas/PCAP) includes the ethernetIP DFDL schema (both are available on github).  So for PCAP one is going to need at least 4 classpath entries.
   
   We need a way to point vscode at the src/main/resource and src/test/resource directories for multiple such schemas. Order on the classpath also matters of course, as schemas sometimes have test resources that must be superceded by DFDL schemas that include/import them. 
   
   Eventually it would be good if vscode had a capability like 'sbt eclipse' for the Eclipse IDE, which outputs a detailed .classpath file that Eclipse uses to setup the classpath properly based on managed dependencies expressed in the build.sbt file. 
   
   Creating something that becomes part of (or is referenced from) the launch.json automatically will be important for dealing with large schemas that include other schemas using managed dependencies. 
   
   (See https://www.scala-sbt.org/1.x/docs/sbt-1.1-Release-Notes.html#VS+Code+extension+update as some sbt support already exists in vscode)


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



[GitHub] [daffodil-vscode] jw3 commented on issue #57: need config dialog ability to setup daffodil classpath

Posted by GitBox <gi...@apache.org>.
jw3 commented on issue #57:
URL: https://github.com/apache/daffodil-vscode/issues/57#issuecomment-991951579


   We began looking into this last week.  It will require some changes to the launch parameters, launch wizard GUI, and then to add support for the new classpath parameter on the debugging backend.
   
   My vote is to proceed to release 1.0.0 without the classpath support and we add that in the next release.


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



[GitHub] [daffodil-vscode] Shanedell commented on issue #57: need config dialog ability to setup daffodil classpath

Posted by GitBox <gi...@apache.org>.
Shanedell commented on issue #57:
URL: https://github.com/apache/daffodil-vscode/issues/57#issuecomment-994125067


   So @mbeckerle I was able successfully debug the PCAP schema using the extension, with the updates I created. I plan to push my updates here soon just want to make sure to scan over everything for issues.
   
   But all I did was follow your instructions above of. Then create this `.vscode/launch.json`
   
   ```
   {
       "version": "0.2.0",
       "configurations": [
           {
               "request": "launch",
               "type": "dfdl",
               "name": "Wizard Config",
               "program": "/FULL/PATH/TO/dfdl-pcap/src/main/resources/com/tresys/pcap/xsd/pcap.dfdl.xsd",
               "data": "/FULL/PATH/TO/dfdl-pcap/src/test/resources/com/tresys/pcap/data/dns.cap",
               "debugServer": 4711,
               "infosetOutput": {
                   "type": "file",
                   "path": "${workspaceFolder}/infoset.xml"
               },
               "trace": true,
               "stopOnEntry": true,
               "useExistingServer": false,
               "openHexView": false,
               "openInfosetView": false,
               "openInfosetDiffView": false,
               "daffodilDebugClasspath": "/FULL/PATH/TO/dfdl-ethernet/target/dfdl-ethernetip-1.0.0.jar"
           }
       ]
   }
   ```
   
   With this I was able to start the extension debugging on the schema with successful launch. Was able to step into, then once hit continue the infoset was successfully created.
   
   I also wasn't sure that when the user clicks `Browse` for the file picker for jar files if it should just replace the value already in the config or append to it so I made two check boxes where the person running the wizard can chose replace or append.
   
   When I make a PR I will make a steps to tests that I did to get it to fully work.
   


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



[GitHub] [daffodil-vscode] mbeckerle commented on issue #57: need config dialog ability to setup daffodil classpath

Posted by GitBox <gi...@apache.org>.
mbeckerle commented on issue #57:
URL: https://github.com/apache/daffodil-vscode/issues/57#issuecomment-992620979


   This issue stands between me and being even able to evaluate the debugger seriously with respect to 1.0.0 readiness. 
   
   E.g., the list of schemas above. I need to be able to point it at those and single step and look at some data for them without it crashing (much).  
   
   I can't do the evaluation if I have to restructure the schemas to accommodate the debugger. That's far too much work. 


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



[GitHub] [daffodil-vscode] mbeckerle commented on issue #57: need config dialog ability to setup daffodil classpath

Posted by GitBox <gi...@apache.org>.
mbeckerle commented on issue #57:
URL: https://github.com/apache/daffodil-vscode/issues/57#issuecomment-994752287


   This looks good. A few questions.
   
   Can you step into and breakpoint an element on a schema that is in the jar, not in the schema being debugged. In this case, can you step on some child element in the ethernet-ip jar? (You can in Daffodil CLI, so I imagine this will just work.)
   
   Can you do this debug without any jar files, i.e., somehow point the debug classpath at src/main/resources and src/test/resources of both the pcap and the ethernetIP schema directories without creating jar files? 
   


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



[GitHub] [daffodil-vscode] Shanedell closed issue #57: need config dialog ability to setup daffodil classpath

Posted by GitBox <gi...@apache.org>.
Shanedell closed issue #57:
URL: https://github.com/apache/daffodil-vscode/issues/57


   


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



[GitHub] [daffodil-vscode] Shanedell commented on issue #57: need config dialog ability to setup daffodil classpath

Posted by GitBox <gi...@apache.org>.
Shanedell commented on issue #57:
URL: https://github.com/apache/daffodil-vscode/issues/57#issuecomment-994795606


   This would be good to test if you are not using Windows.
   
   I setup a Windows VM last night to test out some of the changes but it seems the launchWizard style sheet and script aren't getting loaded in Windows so I am looking into that.
   
   I can also look into the breakpoint matter you had mentioned above
   


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



[GitHub] [daffodil-vscode] jw3 commented on issue #57: need config dialog ability to setup daffodil classpath

Posted by GitBox <gi...@apache.org>.
jw3 commented on issue #57:
URL: https://github.com/apache/daffodil-vscode/issues/57#issuecomment-992593989


   > I would call it verion 0.1.0, not as I don't think it is ready to be used.
   
   Is this issue the only one you see as a gap?  If so, perhaps we should just dig in an knock this out and get 1.0.0 out rather than a short lived pre-release.


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



[GitHub] [daffodil-vscode] mbeckerle commented on issue #57: need config dialog ability to setup daffodil classpath

Posted by GitBox <gi...@apache.org>.
mbeckerle commented on issue #57:
URL: https://github.com/apache/daffodil-vscode/issues/57#issuecomment-987014901


   I am not sure how others feel about making this a requirement for v1.0.0 of the debugger. 
   
   To me, so long as a "single directory" schema, consisting of multiple files (like ethernetIP) is the bare minimum. 
   
   Schemas that really require the classpath, like PCAP (which uses ethernetIP via classpath) may be something people are willing to wait for a subsequent release. 
   
   


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



[GitHub] [daffodil-vscode] mbeckerle commented on issue #57: need config dialog ability to setup daffodil classpath

Posted by GitBox <gi...@apache.org>.
mbeckerle commented on issue #57:
URL: https://github.com/apache/daffodil-vscode/issues/57#issuecomment-992580269


   We can create an initial pre-production kind of release if the team wants to.
   
   I would call it verion 0.1.0, not as I don't think it is ready to be used. 
   
   I would not announce this widely as a version 1.0.0 nor promote its use, nor use it when teaching DFDL, until these class path issues, and the ability to just point the tool at a realistic and useful DFDL schema, like any of the below, are resolved. 
   
   PCAP and ethernetIP
   NACHA
   ISO8583
   iCalendar
   IBM4690-TLOG
   GIF
   EDIFACT
   CSV
   BMP
   AIS
   NITF (with JPEG images embedded)
   MagVar
   Syslog
   vCard
   shapeFile
   PNG
   JPEG
   
   


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



[GitHub] [daffodil-vscode] Shanedell edited a comment on issue #57: need config dialog ability to setup daffodil classpath

Posted by GitBox <gi...@apache.org>.
Shanedell edited a comment on issue #57:
URL: https://github.com/apache/daffodil-vscode/issues/57#issuecomment-994006759


   @mbeckerle Okay I followed those steps.
   
   After this to get setup for debugging, what files need to added to the classpath? I will test adding them via my updates then try debugging through the extension to make sure it works.
   
   You would just need to add the `dfdl-ethernetip-1.0.0.jar` to the classpath for everything to work?


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



[GitHub] [daffodil-vscode] Shanedell commented on issue #57: need config dialog ability to setup daffodil classpath

Posted by GitBox <gi...@apache.org>.
Shanedell commented on issue #57:
URL: https://github.com/apache/daffodil-vscode/issues/57#issuecomment-993851271


   @mbeckerle I believe I have an update ready for having the Launch Config Wizard allowing the user to select multiple jar files or a folder full of jar files to the classpath.
   
   However, I am having a difficult time testing if the changes I made are working properly. I was able to get PCAP to start debugging so that is a good thing there. But when I get to a certain step it seems to break or if I just hit continue it doesn't seem to output anything in the infoset file.
   
   Also when I try debugging the ethernetIP schema I get a no global elements error.
   
   Would you be able to point me towards some documentation of how things need setup to debug a schema?
   
   @jw3 and I had a talk yesterday about this, I was able to get further from where we at when we stopped chatting but one thing we did notice is in the ethernetIP it is now using daffodil `3.2.0` where the extension uses `3.1.0` wasn't sure how big of a factor that would be.
   
   But also for being able to build the schemas so we could get the required jars we had to this to `build.sbt`
   
   ```
   enablePlugins(UniversalPlugin, JavaAppPackaging)
   ```
   
   We also had to add a `project/plugins.sbt` with
   ```
   addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.8.1")
   ```
   to be able to run `sbt universal:stage`.
   
   Would you be able to clear some of this up as well how should be building these schemas to get the jars?


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



[GitHub] [daffodil-vscode] mbeckerle commented on issue #57: need config dialog ability to setup daffodil classpath

Posted by GitBox <gi...@apache.org>.
mbeckerle commented on issue #57:
URL: https://github.com/apache/daffodil-vscode/issues/57#issuecomment-993932816


   Ok, so ethernetIP has no global elements because its test elements are defined in the TDML files. 
   
   It's a schema that just defines global types, and the notion is that schemas that use eithernetIP, like PCAP, but also some other schemas, they get the job of defining the elements. 
   
   No reason not to change this and add some test elements directly to ethernetIP however so that it can be debugged directly without need of anything from the TDML file.
   
   So go ahead and add:
   
       <xs:element name="testRoot">
         <xs:complexType>
           <xs:sequence>
             <xs:element name="Ethernet" type="eth:Ethernet"/>
           </xs:sequence>
         </xs:complexType>
       </xs:element>
   
   You will need to create test data from testEthernet.tdml also. There are no files of test data in ethernetIP. The test data is all expressed in hex in the tdml file. 
   
   I know I said for sure see if you can debug PCAP/EthernetIP, but.... turns out you've hit PCAP and ethernetIP in this 3.2.0 release transition currently. 
   
   I was in the middle of updating all the various published DFDL schemas to reference 3.2.0 daffodil, and update other libraries, etc. when we found the daffodil 3.2.0 release has a bad unparser bug that is preventing ethernetIP and hence PCAP from working with checksum calculations, which are a primary feature 3.2.0 was supposed to enable.  
   
   Suggest you back out to the prior tagged release of ethernetIP (tag 1.0.0), and prior git hash for PCAP the ghit hash you want is one back from the current master branch head, so git hash 87b4b28cc56a8ce9383af2f52711182a87013a3c. 
   
   Or do git checkout master; git checkout HEAD^ 
   
   I just did this and it worked:
   
   cd dfdl-ethernet # where I have ethernetIP cloned
   git checkout 1.0.0
   sbt test
   sbt publishLocal
   cd ../dfdl-pcap
   git checkout master
   git checkout HEAD^
   sbt test
   
   All tests pass, so at this point you should be able to debug PCAP on some of its data files which are under src/test/resources/com/tresys/pcap/data. 
   
   
   
   
   


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



[GitHub] [daffodil-vscode] Shanedell commented on issue #57: need config dialog ability to setup daffodil classpath

Posted by GitBox <gi...@apache.org>.
Shanedell commented on issue #57:
URL: https://github.com/apache/daffodil-vscode/issues/57#issuecomment-994006759


   @mbeckerle Okay I followed those steps.
   
   After this to get setup for debugging, what files need to added to the classpath? I will test adding them via my updates then try debugging through the extension to make sure it works.


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



[GitHub] [daffodil-vscode] Shanedell edited a comment on issue #57: need config dialog ability to setup daffodil classpath

Posted by GitBox <gi...@apache.org>.
Shanedell edited a comment on issue #57:
URL: https://github.com/apache/daffodil-vscode/issues/57#issuecomment-994125067


   So @mbeckerle I was able successfully debug the PCAP schema using the extension, with the updates I created. I plan to push my updates here soon just want to make sure to scan over everything for issues.
   
   But all I did was follow your instructions above of. Then create this `.vscode/launch.json`
   
   ```
   {
       "version": "0.2.0",
       "configurations": [
           {
               "request": "launch",
               "type": "dfdl",
               "name": "Wizard Config",
               "program": "/FULL/PATH/TO/dfdl-pcap/src/main/resources/com/tresys/pcap/xsd/pcap.dfdl.xsd",
               "data": "/FULL/PATH/TO/dfdl-pcap/src/test/resources/com/tresys/pcap/data/dns.cap",
               "debugServer": 4711,
               "infosetOutput": {
                   "type": "file",
                   "path": "${workspaceFolder}/infoset.xml"
               },
               "trace": true,
               "stopOnEntry": true,
               "useExistingServer": false,
               "openHexView": false,
               "openInfosetView": false,
               "openInfosetDiffView": false,
               "daffodilDebugClasspath": "/FULL/PATH/TO/dfdl-ethernet/target/dfdl-ethernetip-1.0.0.jar"
           }
       ]
   }
   ```
   
   With this I was able to start the extension debugging on the schema with successful launch. Was able to step into, then once hit continue the infoset was successfully created.
   
   I also wasn't sure that when the user clicks `Browse` for the file picker for jar files if it should just replace the value already in the config or append to it so I made two check boxes where the person running the wizard can chose replace or append.
   
   When I make a PR I will make a steps to tests, with what I did to get it to fully work.
   


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



[GitHub] [daffodil-vscode] mbeckerle commented on issue #57: need config dialog ability to setup daffodil classpath

Posted by GitBox <gi...@apache.org>.
mbeckerle commented on issue #57:
URL: https://github.com/apache/daffodil-vscode/issues/57#issuecomment-994752742


   Is this ready for me to try out, or are you still doing fixups?


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