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/06/23 17:50:07 UTC

[GitHub] [daffodil-vscode] lrbarber opened a new issue, #200: Need to be able to supply values for variables.

lrbarber opened a new issue, #200:
URL: https://github.com/apache/daffodil-vscode/issues/200

   When running Daffodil from the command line, it is possible to supply values for variables using:
   ```
   -D VARIABLE=VALUE 
   ```
   A method to provide these values when working with the debugger is needed.


-- 
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.apache.org

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


[GitHub] [daffodil-vscode] arosien commented on issue #200: Need to be able to supply values for variables.

Posted by "arosien (via GitHub)" <gi...@apache.org>.
arosien commented on issue #200:
URL: https://github.com/apache/daffodil-vscode/issues/200#issuecomment-1419938862

   @lrbarber @mbeckerle is it most useful to define the variables/tunables before the run (supplied by config file, etc.), or are you preferring something definable at runtime (which may be tedious to define one-by-one)? I'm guessing the former, but just trying to clarify.


-- 
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] arosien commented on issue #200: Need to be able to supply values for variables.

Posted by "arosien (via GitHub)" <gi...@apache.org>.
arosien commented on issue #200:
URL: https://github.com/apache/daffodil-vscode/issues/200#issuecomment-1421345452

   Hmm, I think what I'm thinking may be different from what I'm hearing. I'm thinking one would augment the existing debug launch configuration, adding variables and tunables fields:
   ```json
   {
         "request": "launch",
         "type": "dfdl",
         "name": "EDIFACT",
         "program": "/Users/arosien/nteligen/EDIFACT/src/main/resources/EDIFACT-SupplyChain-D03B/EDIFACT-SupplyChain-Messages-D.03B.xsd",
         "data": "/Users/arosien/nteligen/EDIFACT/src/test/resources/EDIFACT-SupplyChain-D03B/TestData/INVOIC_D.03B_Interchange_with_UNA.txt",
         "debugServer": 4711,
         "infosetOutput": {
           "type": "file",
           "path": "${workspaceFolder}/infoset.xml"
         },
         "trace": true,
         "stopOnEntry": true,
         "openHexView": false,
         "openInfosetView": false,
         "openInfosetDiffView": false,
         "variables": {
           "foo": "bar"
         },
         "tunables": {
           "maxOccursBounds": "256"
         }
       }
   ```
   That being said, it doesn't offer a lot of abstraction, where you might want to store common sets of variables or tunables in their own named unit. But it's easy.


-- 
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 #200: Need to be able to supply values for variables.

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

   To clarify, we do need to be able to specify tunables and variables in the UI, without question. 
   
   But replicating the options the CLI can specify so that you also have those in the GUI is not enough. 
   
   This feature should not be about parameterizing a run only, (as it is in the CLI) but about authoring, with GUI support, the config file that captures those parameters for repeated use from either the GUI or the command line, or in an application program that uses the Daffodil API. 
   
   (Similarly to testing a schema should serve double-duty both as a way of doing the test, and of authoring the TDML file so the test is captured and repeatable. There's a separate issue/ticket for this.)
   
   Regardless of all of the above, the important point is that the place all of Daffodil gets the list of say, tunables, and the list of all the suppressable warnings, is by processing the XSD for config files. The scala code gets generated from that by the daffodil-propgen module. 
   
   Daffodil propgen can also simultaneously create whatever typescript, or json data or whatever the GUI needs to be able to support a nice UI for properties and warning suppression etc. All the per-tunable and per warning-flag boilerplate can be generated. 
   
   We add new tunables and new warning flags all the time, so generating this code for the UI automatically would help keep things in sync between the engine and the UI. 
   
   


-- 
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] arosien commented on issue #200: Need to be able to supply values for variables.

Posted by "arosien (via GitHub)" <gi...@apache.org>.
arosien commented on issue #200:
URL: https://github.com/apache/daffodil-vscode/issues/200#issuecomment-1421354185

   Other comments aside, I'm a bit unsure of the configuration semantics of variables. In my bogus example above, the schema doesn't have a `foo` variable, and daffodil rejects the parse because `foo` isn't defined in the schema, or wherever variables can be defined. Is that the intended validation semantics?
   
   In other programs, undefined configuration parameters are ignored rather than rejected with an error.


-- 
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] arosien closed issue #200: Need to be able to supply values for variables.

Posted by "arosien (via GitHub)" <gi...@apache.org>.
arosien closed issue #200: Need to be able to supply values for variables.
URL: https://github.com/apache/daffodil-vscode/issues/200


-- 
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] lrbarber commented on issue #200: Need to be able to supply values for variables.

Posted by "lrbarber (via GitHub)" <gi...@apache.org>.
lrbarber commented on issue #200:
URL: https://github.com/apache/daffodil-vscode/issues/200#issuecomment-1420780542

   I agree that it could become tiresome having to reenter values each time, so a config file is probably the best option.
   
   From: Adam Rosien ***@***.***>
   Sent: Monday, February 6, 2023 6:34 PM
   To: apache/daffodil-vscode ***@***.***>
   Cc: Larry Barber ***@***.***>; Mention ***@***.***>
   Subject: Re: [apache/daffodil-vscode] Need to be able to supply values for variables. (Issue #200)
   
   
   @lrbarber<https://usg02.safelinks.protection.office365.us/?url=https%3A%2F%2Fgithub.com%2Flrbarber&data=05%7C01%7Clarry.barber%40nteligen.com%7Cf35f692508b046ece4b508db089a9b1b%7C379c214c5c944e86a6062d047675f02a%7C0%7C0%7C638113232366074664%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=xFIZZFeZOT0RJTRacDkVUhcln%2BHfUntbklM4A3WI%2B%2FQ%3D&reserved=0> @mbeckerle<https://usg02.safelinks.protection.office365.us/?url=https%3A%2F%2Fgithub.com%2Fmbeckerle&data=05%7C01%7Clarry.barber%40nteligen.com%7Cf35f692508b046ece4b508db089a9b1b%7C379c214c5c944e86a6062d047675f02a%7C0%7C0%7C638113232366074664%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=32eTbb2%2BksZB%2BQl5wgeKTtGR4lSky%2Brd%2FwnTLjVGTi8%3D&reserved=0> is it most useful to define the variables/tunables before the run (supplied by config file, etc.), or are you preferring something definable at runtime (
 which may be tedious to define one-by-one)? I'm guessing the former, but just trying to clarify.
   
   -
   Reply to this email directly, view it on GitHub<https://usg02.safelinks.protection.office365.us/?url=https%3A%2F%2Fgithub.com%2Fapache%2Fdaffodil-vscode%2Fissues%2F200%23issuecomment-1419938862&data=05%7C01%7Clarry.barber%40nteligen.com%7Cf35f692508b046ece4b508db089a9b1b%7C379c214c5c944e86a6062d047675f02a%7C0%7C0%7C638113232366074664%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=vMQUHyY6ajxdd%2FEtIpf7WQn1sC3qwPpmM%2BiknSA4Ygk%3D&reserved=0>, or unsubscribe<https://usg02.safelinks.protection.office365.us/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FARJT6NGGYYY7HPDJ7YZ3ZMTWWGC57ANCNFSM5ZVFV4CQ&data=05%7C01%7Clarry.barber%40nteligen.com%7Cf35f692508b046ece4b508db089a9b1b%7C379c214c5c944e86a6062d047675f02a%7C0%7C0%7C638113232366074664%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=RoKdhEAA8b3hh64kjGjXFR2yuavX9CPL8FDrVGItOUE%3D&reser
 ved=0>.
   You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
   


-- 
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] lrbarber commented on issue #200: Need to be able to supply values for variables.

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

   That clarification helps, but we do still want to the ability to parameterize runs.


-- 
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 #200: Need to be able to supply values for variables.

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

   Also see: https://issues.apache.org/jira/browse/DAFFODIL-2705 which is a JIRA ticket for daffodil. 
   
   Turns out there is no single API call to just hand Daffodil a config file. Grrrrr. (Wishful thinking on my part.)
   
    You can hand it a config file for external variable bindings, but there is no API call for it to take tunables from a config file. Tunables can only be specified via API call taking a Map data structure, or as individual tunable settings one by one. 
   


-- 
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 #200: Need to be able to supply values for variables.

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

   There are daffodil tunables also. Daffodil accepts a "config file" which can contain variable bindings and settings for tunable parameters. 
   
   A schema is typically used along with a config file that "goes along with it". For example, many schemas will spit out tons of warnings that are just annoying. A tunable parameter can suppress specific warnings allowing the schema to be used without the annoying warnings. So the config file specifying that would want to become part of not just a debug "run", but of all uses of that schema by default. 
   


-- 
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] lrbarber commented on issue #200: Need to be able to supply values for variables.

Posted by "lrbarber (via GitHub)" <gi...@apache.org>.
lrbarber commented on issue #200:
URL: https://github.com/apache/daffodil-vscode/issues/200#issuecomment-1421364428

   Here's an example variable definition. Note that without the external="true", supplying a value from the command line (or config file, in this case) is invalid. I'm not sure what should be done in that case.
   
   
   <dfdl:defineVariable name="test_str" type="xs:string" external="true" defaultValue="" />
   
   


-- 
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 #200: Need to be able to supply values for variables.

Posted by "mbeckerle (via GitHub)" <gi...@apache.org>.
mbeckerle commented on issue #200:
URL: https://github.com/apache/daffodil-vscode/issues/200#issuecomment-1421165792

   Definitely a config file that is saved with the schema. 
   Often these contain permanent settings of tunables like to suppress warnings that the schema can't avoid, or to set various policy tunables. 


-- 
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] lrbarber commented on issue #200: Need to be able to supply values for variables.

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

   ```
   -T TUNABLE=VALUE
   ```


-- 
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 #200: Need to be able to supply values for variables.

Posted by "mbeckerle (via GitHub)" <gi...@apache.org>.
mbeckerle commented on issue #200:
URL: https://github.com/apache/daffodil-vscode/issues/200#issuecomment-1421532725

   I would prefer to give the location of a config file, and have a standard XML editor for config files. They are just XML, and there is an XML Schema for what they can contain. 
   
   This file is part of the schema, not part of the configuration of a UI. If you deploy the schema, this config file is part of what is packaged with the schema. 
   
   If you replicate the config file contents into the UI launch config, then you need a way to save them out to a file when the schema is being saved, etc. 


-- 
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 #200: Need to be able to supply values for variables.

Posted by "mbeckerle (via GitHub)" <gi...@apache.org>.
mbeckerle commented on issue #200:
URL: https://github.com/apache/daffodil-vscode/issues/200#issuecomment-1421537729

   When you try to set a variable from the API, the schema rejects an attempt to set a variable that doesn't exist. I believe it will also fail if the value (a string) you supply is not convertible to the type of the variable. 
   
   Often these variables are quite important and critical things like whether certain situations are to be deemed errors in the data or not. 
   


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