adedoyinNteligen opened a new pull request, #1735: URL: https://github.com/apache/daffodil-vscode/pull/1735
Closes #[issue] ## Description [Please include a summary of the change and which issue is fixed. Also include relevant context or motivation.] If a user adds a invalid tunable their launch.json either by wizard or manually dfdl extension does not fail gracefully. This PR is meant to prevent users from adding invalid tunables that would crash dfdl. From the wizard, users wont be allowed to save invalid tunables and are alerted if the tunable is invalid. In case a user creates the launch.json manually, when they try to run dfdl, they will get a error box with two options 1. Ignore Invalid tunables. This option will run dfdl and ignore the invalid tunables in the launch.json. It does NOT remove the tunable from the launch.json, just runs the config without the tunable attached 2. Cancel. This stops dfdl from running and the user goes back to correct their config. The list of valid tunables is in constants/tunables.json . This will be updated according to [DFDL tunables ](https://daffodil.apache.org/tunables/) with each release. A future will be created in the future to give users a way to bypass or add new tunables to the allowed list in case the .json is not updated properly. (The current recommendation is a switch in the launch.json which defaults to true, and the user can set it to false and tunables wont be validated anymore. This way users can remove the guiderails at their own risk ) ## Wiki - [] I have determined that no documentation updates are needed for these changes - [X ] I have added the following documentation for these changes Constants/tunables.json is a list of valid tunables. This file will be updated as necessary with each version of DFDL ## Review Instructions including Screenshots [Add review instructions including screenshots or GIFs to help explain the change visually.] ### Confirmation Testing 1. Add a invalid tunable to the launch.json manually 2. Open the wizard and scroll to where tunables are listed. You should see a invalid warning. 3. Try to save. This should fail 4. Edit the tunable to be valid. Save should now work 5. The launch json should be updated to the valid tunable. 6. Add a invalid tunable to launch.json manually 7. Try to run dfdl extension. You should fail with two options 8. Ignore valid tunable should allow you to proceed with running. Cancel should fail ### Regression Testing [OPTIONAL: Describe any regression testing performed to ensure existing functionality was not broken. List relevant test suites, manual checks, or validation steps.] -- 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]
