You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "stricklandrbls (via GitHub)" <gi...@apache.org> on 2025/08/28 17:18:41 UTC

[PR] Fixed TDML Saved File w/o TDML Extension (Non-Windows OSes) [daffodil-vscode]

stricklandrbls opened a new pull request, #1384:
URL: https://github.com/apache/daffodil-vscode/pull/1384

   Added shorthand conditional return when saving the generated TDML file in case the `.tdml` extension is not automatically appended when selected within the dialog.
   
   Closes #1383 


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


Re: [PR] Fixed TDML Saved File w/o TDML Extension (Non-Windows OSes) [daffodil-vscode]

Posted by "stricklandrbls (via GitHub)" <gi...@apache.org>.
stricklandrbls commented on PR #1384:
URL: https://github.com/apache/daffodil-vscode/pull/1384#issuecomment-3272364279

   > I think we need the following changes:
   > 
   >     * We're missing a `$` after the .tdml.xml case
   > 
   >     * We shouldn't be using `/m` as pathStr shouldn't ever contain newlines
   > 
   >     * We should be using `/i` because .TDML is a valid extension in at least Windows
   > 
   >     * I don't think we need the `.*` before the extension (since we're not using `^`). Some regex libraries force match on a whole string, but I don't believe this is one of them.
   > 
   
   @michael-hoke - Resolved
   


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


Re: [PR] Fixed TDML Saved File w/o TDML Extension (Non-Windows OSes) [daffodil-vscode]

Posted by "JeremyYao (via GitHub)" <gi...@apache.org>.
JeremyYao commented on PR #1384:
URL: https://github.com/apache/daffodil-vscode/pull/1384#issuecomment-3303777865

   It should be noted that my Ubuntu 24.04 VM that I used to test this PR has the following GUI toolkits:
   Desktop environment toolkit-- GNOME
   
   GUI toolkits installed:
   
   ```bash
   @JeremyYao:/$ dpkg -l | grep -E "libgtk|qtbase"
   ii  libgtk-3-0t64:amd64                           3.24.41-4ubuntu1.3                       amd64        GTK graphical user interface library
   ii  libgtk-3-bin                                  3.24.41-4ubuntu1.3                       amd64        programs for the GTK graphical user interface library
   ii  libgtk-3-common                               3.24.41-4ubuntu1.3                       all          common files for the GTK graphical user interface library
   ii  libgtk-4-1:amd64                              4.14.5+ds-0ubuntu0.5                     amd64        GTK graphical user interface library
   ii  libgtk-4-bin                                  4.14.5+ds-0ubuntu0.5                     amd64        programs for the GTK graphical user interface library
   ii  libgtk-4-common                               4.14.5+ds-0ubuntu0.5                     all          common files for the GTK graphical user interface library
   ii  libgtk-4-media-gstreamer                      4.14.5+ds-0ubuntu0.5                     amd64        GStreamer media backend for the GTK graphical user interface library
   ii  libgtk2.0-0t64:amd64                          2.24.33-4ubuntu1.1                       amd64        GTK graphical user interface library - old version
   ii  libgtk2.0-bin                                 2.24.33-4ubuntu1.1                       amd64        programs for the GTK graphical user interface library
   ii  libgtk2.0-common                              2.24.33-4ubuntu1.1                       all          common files for the GTK graphical user interface library
   ii  libgtk3-perl                                  0.038-3                                  all          Perl bindings for the GTK+ graphical user interface library
   ii  libgtkmm-3.0-1t64:amd64                       3.24.9-1                                 amd64        C++ wrappers for GTK+ (shared libraries)
   ii  libgtkmm-4.0-0:amd64                          4.10.0-4build3                           amd64        C++ wrappers for GTK4 (shared libraries)
   ii  libgtksourceview-5-0:amd64                    5.12.0-1build1                           amd64        shared libraries for the GTK 4 syntax highlighting widget
   ii  libgtksourceview-5-common                     5.12.0-1build1                           all          common files for the GTK 4 syntax highlighting widget
   ```


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


Re: [PR] Fixed TDML Saved File w/o TDML Extension (Non-Windows OSes) [daffodil-vscode]

Posted by "michael-hoke (via GitHub)" <gi...@apache.org>.
michael-hoke commented on PR #1384:
URL: https://github.com/apache/daffodil-vscode/pull/1384#issuecomment-3282019670

   I'm testing on linux and did test.TDML as the filename, and it appends .tdml to the end. I know it's not technically the spirit of the change, but the regex should be working regardless of OS - I'll see if I can figure out what's going on, but the regex looks good to me now.


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


Re: [PR] Fixed TDML Saved File w/o TDML Extension (Non-Windows OSes) [daffodil-vscode]

Posted by "michael-hoke (via GitHub)" <gi...@apache.org>.
michael-hoke commented on PR #1384:
URL: https://github.com/apache/daffodil-vscode/pull/1384#issuecomment-3282938841

   None of the changed code is causing what I'm seeing. If I step through and check the `fileUri` variable in the then block after the vscode.window.showSaveDialog, it already has the `.tdml` extension appended to it (even if I try to do a tdml.xml extension). This could possibly be implementation-specific based on OS. Will poke around a bit more in the morning to see what else I can find.


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


Re: [PR] Fixed TDML Saved File w/o TDML Extension (Non-Windows OSes) [daffodil-vscode]

Posted by "JeremyYao (via GitHub)" <gi...@apache.org>.
JeremyYao commented on PR #1384:
URL: https://github.com/apache/daffodil-vscode/pull/1384#issuecomment-3303719071

   Worked with @rthomas320 on working through the issues he's seeing on his end. I observed that on my Ubuntu 24.04 VM, I'm able to write to `/tmp` whereas on @rthomas320's Ubuntu 24.04, he was not able to. 
   
   From our conversation, @rthomas320 said to disregard the issues and results he's seeing on his Ubuntu 24.04 machine and to rely on my results instead. 


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


Re: [PR] Fixed TDML Saved File w/o TDML Extension (Non-Windows OSes) [daffodil-vscode]

Posted by "michael-hoke (via GitHub)" <gi...@apache.org>.
michael-hoke commented on PR #1384:
URL: https://github.com/apache/daffodil-vscode/pull/1384#issuecomment-3285779834

   Yeah, this is unfortunately going to be implementation-specific on the part of the file dialog. I think Windows should be expected to append the extension, and most Linux/Mac platforms will as well, but it's not guaranteed.
   
   I'd probably use a couple of regexes to solve this - something like this (I'm also dropping the global flag - I don't think we want it here):
   ``` 
   // Create capture groups for the path
   // Capture Group 2 will be all valid extensions potentially chained at the end of the path
   // Capture Group 1 will be the rest of the filename (before the valid extensions)
   matches = pathStr.match(/(^.*)((\.tdml|\.tdml\.xml)*)$/i)
   if (matches) {
     // We want to grab the first valid extension found from the previous regex's Capture Group 2
     //    and append that to the filename with TDML extensions stripped (previous regex's Capture Group 1)
     extMatches = matches[2].match(/^\.tdml.xml|^\.tdml/i)
     return matches[1] + extMatches
   }
   
   // If our regex didn't match, we don't have a valid extension and it's safe to add one
   return pathStr + '.tdml'
   ```
   
   Also, if you add 'tdml.xml' to the filters argument of `showSaveDialog`, will that work like I think it will and show files with both extensions? Will it also default to still appending `.tdml` if it's first in the list? I don't know if I think we should make this change or not. I'd be slightly inclined to make it just so that `.tdml.xml` on the user's system show up in the dialog window


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


Re: [PR] Fixed TDML Saved File w/o TDML Extension (Non-Windows OSes) [daffodil-vscode]

Posted by "rthomas320 (via GitHub)" <gi...@apache.org>.
rthomas320 commented on PR #1384:
URL: https://github.com/apache/daffodil-vscode/pull/1384#issuecomment-3299685762

   After creating a new launch.json file I am nolonger seeing the error below on Ubuntu 24.04.
   
   I re-cloned the repo on Ubuntu 24.04, then pulled in the code for PR# 1384. I am to compile and run the code. I am still getting an error when I try to create a TDML file. The TDML file does not get written to the /tmp directory (as it does on Ubuntu 22.04) after running the debugger.
   <img width="433" height="262" alt="490169226-0b3efdf1-391f-4f96-b700-b04458f1e4cb" src="https://github.com/user-attachments/assets/37c5543b-3579-4c46-82d8-96b386adcc02" />
   


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


Re: [PR] Fixed TDML Saved File w/o TDML Extension (Non-Windows OSes) [daffodil-vscode]

Posted by "michael-hoke (via GitHub)" <gi...@apache.org>.
michael-hoke commented on PR #1384:
URL: https://github.com/apache/daffodil-vscode/pull/1384#issuecomment-3238223747

   > > Please change .includes to .endsWith. The filename is user-defined and potentially could include .tdml as a part of the filename.
   > 
   > Resolved.
   
   Just checked the apache page for TDML and it lists .tdml.xml as a valid extension as well (even though we're not using that here)
   
   Would the following work?
   
     return (file.endsWith('.tdml') || file.endsWith('.tdml.xml')) ? file : file + '.tdml'


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


Re: [PR] Fixed TDML Saved File w/o TDML Extension (Non-Windows OSes) [daffodil-vscode]

Posted by "stricklandrbls (via GitHub)" <gi...@apache.org>.
stricklandrbls commented on code in PR #1384:
URL: https://github.com/apache/daffodil-vscode/pull/1384#discussion_r2326430412


##########
src/adapter/activateDaffodilDebug.ts:
##########
@@ -103,6 +103,18 @@ function normalizePath(path: string): string {
   return path
 }
 
+/**
+ * Configures the file path string of an intended TDML save file if the
+ * extension is malformed.
+ * @param pathStr
+ * @returns file path string with a valid TDML file extension.
+ */
+function validateTDMLFilePath(pathStr: string): string {
+  return !pathStr.match(/.*tdml[.]xml|.*tdml$/gm)

Review Comment:
   Yeah good catch. I had that extension string in mind from when I was trying to utilize a function about it's filepath which strips the `.` and just gives you the extension text.
   
   Resolved this with the latest commit.



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


Re: [PR] Fixed TDML Saved File w/o TDML Extension (Non-Windows OSes) [daffodil-vscode]

Posted by "JeremyYao (via GitHub)" <gi...@apache.org>.
JeremyYao commented on PR #1384:
URL: https://github.com/apache/daffodil-vscode/pull/1384#issuecomment-3303917661

   When I create a tdml file with the name `tdml_xml_extension.tdml.xml`, the file name is `tdml_xml_extension.tdml.xml`. 


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


Re: [PR] Fixed TDML Saved File w/o TDML Extension (Non-Windows OSes) [daffodil-vscode]

Posted by "rthomas320 (via GitHub)" <gi...@apache.org>.
rthomas320 commented on PR #1384:
URL: https://github.com/apache/daffodil-vscode/pull/1384#issuecomment-3298588742

   Testing PR #1384 on laptop running Ubuntu 24.04.  I get this error message when I attempt to compile and debug the extension code.
   <img width="1521" height="927" alt="image" src="https://github.com/user-attachments/assets/ea72f7fa-0bf4-4faf-bcbd-a45b4ae4cbf2" />
   The daffodil-vscode/.vscode/launch.json file appears to be identical to the file in the Ubuntu 22.04 VM where the compile and debug launch works successfully.
   Yarn test and yarn package complete successfully on the Ubuntu 24.04 laptop.  After I installed the created extension, ran it to create an infoset then clicked "Create TDML FIle", I get this error popup at the bottom of the screen.
   <img width="1521" height="927" alt="image" src="https://github.com/user-attachments/assets/2ccc3833-9b4a-4162-b3a4-c735eed35201" />
   


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


Re: [PR] Fixed TDML Saved File w/o TDML Extension (Non-Windows OSes) [daffodil-vscode]

Posted by "stricklandrbls (via GitHub)" <gi...@apache.org>.
stricklandrbls commented on PR #1384:
URL: https://github.com/apache/daffodil-vscode/pull/1384#issuecomment-3238960961

   @michael-hoke - Pushed up a commit that uses regex to match and if the match is invalid it appends a default `.tdml` extension.


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


Re: [PR] Fixed TDML Saved File w/o TDML Extension (Non-Windows OSes) [daffodil-vscode]

Posted by "scholarsmate (via GitHub)" <gi...@apache.org>.
scholarsmate commented on code in PR #1384:
URL: https://github.com/apache/daffodil-vscode/pull/1384#discussion_r2325681404


##########
src/adapter/activateDaffodilDebug.ts:
##########
@@ -103,6 +103,18 @@ function normalizePath(path: string): string {
   return path
 }
 
+/**
+ * Configures the file path string of an intended TDML save file if the
+ * extension is malformed.
+ * @param pathStr
+ * @returns file path string with a valid TDML file extension.
+ */
+function validateTDMLFilePath(pathStr: string): string {
+  return !pathStr.match(/.*tdml[.]xml|.*tdml$/gm)

Review Comment:
   Probably ought to make sure the file name ends with `.tdml` not just `tdml` (e.g., foo.tdml vs footdml).



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


Re: [PR] Fixed TDML Saved File w/o TDML Extension (Non-Windows OSes) [daffodil-vscode]

Posted by "stricklandrbls (via GitHub)" <gi...@apache.org>.
stricklandrbls commented on PR #1384:
URL: https://github.com/apache/daffodil-vscode/pull/1384#issuecomment-3282974120

   > None of the changed code is causing what I'm seeing. If I step through and check the `fileUri` variable in the then block after the vscode.window.showSaveDialog, it already has the `.tdml` extension appended to it (even if I try to do a tdml.xml extension). This could possibly be implementation-specific based on OS. Will poke around a bit more in the morning to see what else I can find.
   
   Yeah I see the same. In fact, the _only_ time I see the no .tdml appendage is on my PopOS machine using a specific file browser as my system's default (The default PopOS _Files_ app). Even if I'm debugging the extension from an SSH tunneled VSCode the VSCode text-based file browser also correctly appends the .tdml extension.


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


Re: [PR] Fixed TDML Saved File w/o TDML Extension (Non-Windows OSes) [daffodil-vscode]

Posted by "rthomas320 (via GitHub)" <gi...@apache.org>.
rthomas320 commented on PR #1384:
URL: https://github.com/apache/daffodil-vscode/pull/1384#issuecomment-3298583663

   Testing PR #1384. Testing on Ubuntu 22.04 VM I get this error message when I click "Create TDML File".
   <img width="2261" height="1375" alt="image" src="https://github.com/user-attachments/assets/45ba22ed-9c97-4efb-a3b1-edd234ad5f37" />
   My launch.json has TDML action set to "generate"
   <img width="1417" height="897" alt="image" src="https://github.com/user-attachments/assets/ff31e73e-be4d-42a6-9abb-71001594128e" />
   This error message appears in the debug console.
   <img width="1509" height="317" alt="image" src="https://github.com/user-attachments/assets/84350527-c362-4890-baee-bfba89c98713" />
   


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


Re: [PR] Fixed TDML Saved File w/o TDML Extension (Non-Windows OSes) [daffodil-vscode]

Posted by "stricklandrbls (via GitHub)" <gi...@apache.org>.
stricklandrbls commented on PR #1384:
URL: https://github.com/apache/daffodil-vscode/pull/1384#issuecomment-3238211253

   > Please change .includes to .endsWith. The filename is user-defined and potentially could include .tdml as a part of the filename.
   
   Resolved.


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


Re: [PR] Fixed TDML Saved File w/o TDML Extension (Non-Windows OSes) [daffodil-vscode]

Posted by "JeremyYao (via GitHub)" <gi...@apache.org>.
JeremyYao commented on PR #1384:
URL: https://github.com/apache/daffodil-vscode/pull/1384#issuecomment-3267141554

   +1 on W10. Tested with generating a TDML file where I only entered `test` in the file dialog and it appended `.tdml` to the file name. Tried creating `t.tdml` and an extra `.tdml` was not appended


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


Re: [PR] Fixed TDML Saved File w/o TDML Extension (Non-Windows OSes) [daffodil-vscode]

Posted by "stricklandrbls (via GitHub)" <gi...@apache.org>.
stricklandrbls merged PR #1384:
URL: https://github.com/apache/daffodil-vscode/pull/1384


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


Re: [PR] Fixed TDML Saved File w/o TDML Extension (Non-Windows OSes) [daffodil-vscode]

Posted by "scholarsmate (via GitHub)" <gi...@apache.org>.
scholarsmate commented on PR #1384:
URL: https://github.com/apache/daffodil-vscode/pull/1384#issuecomment-3293518406

   @stricklandrbls, this one is ready for merging.


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


Re: [PR] Fixed TDML Saved File w/o TDML Extension (Non-Windows OSes) [daffodil-vscode]

Posted by "stricklandrbls (via GitHub)" <gi...@apache.org>.
stricklandrbls commented on PR #1384:
URL: https://github.com/apache/daffodil-vscode/pull/1384#issuecomment-3299248483

   May consider closing this and the related issue as it seems to be a very specific case for both operating system and file browser.


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


Re: [PR] Fixed TDML Saved File w/o TDML Extension (Non-Windows OSes) [daffodil-vscode]

Posted by "stricklandrbls (via GitHub)" <gi...@apache.org>.
stricklandrbls commented on PR #1384:
URL: https://github.com/apache/daffodil-vscode/pull/1384#issuecomment-3238410789

   > > > Please change .includes to .endsWith. The filename is user-defined and potentially could include .tdml as a part of the filename.
   > > 
   > > 
   > > Resolved.
   > 
   > Just checked the apache page for TDML and it lists .tdml.xml as a valid extension as well (even though we're not using that here)
   > 
   > Would the following work?
   > 
   > return (file.endsWith('.tdml') || file.endsWith('.tdml.xml')) ? file : file + '.tdml'
   
   I think the best solution would be to determine to beginning of the extension text `file.indexOf('.')` or `file.split('.')` and the using `extStr.includes('tdml')`
   
   I'll try to work something in along those lines.


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


Re: [PR] Fixed TDML Saved File w/o TDML Extension (Non-Windows OSes) [daffodil-vscode]

Posted by "JeremyYao (via GitHub)" <gi...@apache.org>.
JeremyYao commented on PR #1384:
URL: https://github.com/apache/daffodil-vscode/pull/1384#issuecomment-3299827107

   Ubuntu 24.04-- appended the `.tdml` extension
   RHEL9 -- I get the following error when using the following config
   
   <img width="467" height="132" alt="image" src="https://github.com/user-attachments/assets/9a061840-235f-47db-9650-7995c8b276cf" />
   
   ```JSON
   {
       "version": "0.2.0",
       "configurations": [
           {
               "request": "launch",
               "type": "dfdl",
               "name": "Wizard Config",
               "schema": {
                   "path": "${command:AskForSchemaName}",
                   "rootName": null,
                   "rootNamespace": null
               },
               "data": "${command:AskForDataName}",
               "debugServer": 4711,
               "infosetFormat": "xml",
               "infosetOutput": {
                   "type": "file",
                   "path": "${workspaceFolder}/target/infoset.xml"
               },
               "tdmlConfig": {
                   "action": "generate",
                   "name": "undefined",
                   "description": "undefined",
                   "path": "undefined"
               },
               "trace": true,
               "stopOnEntry": true,
               "useExistingServer": false,
               "openDataEditor": false,
               "openInfosetView": false,
               "openInfosetDiffView": false,
               "daffodilDebugClasspath": [],
               "dataEditor": {
                   "port": 6969,
                   "logging": {
                       "file": "${workspaceFolder}/dataEditor-${omegaEditPort}.log",
                       "level": "info"
                   }
               },
               "dfdlDebugger": {
                   "logging": {
                       "file": "${workspaceFolder}/daffodil-debugger.log",
                       "level": "INFO"
                   }
               }
           }
       ]
   }
   ```
   
   However, using this launch.json config worked
   
   ```JSON
   {
       "version": "0.2.0",
       "configurations": [
           {
               "request": "launch",
               "type": "dfdl",
               "name": "Wizard Config",
               "schema": {
                   "path": "${command:AskForSchemaName}",
                   "rootName": null,
                   "rootNamespace": null
               },
               "data": "${command:AskForDataName}",
               "debugServer": 4711,
               "infosetFormat": "xml",
               "infosetOutput": {
                   "type": "file",
                   "path": "${workspaceFolder}/target/infoset.xml"
               },
               "tdmlConfig": {
                   "action": "generate",
                   "path": "/tmp/generatedTDML.tdml",
                   "name": "Default Test Case"
               },
               "trace": true,
               "stopOnEntry": true,
               "useExistingServer": false,
               "openDataEditor": false,
               "openInfosetView": false,
               "openInfosetDiffView": false,
               "daffodilDebugClasspath": [],
               "dataEditor": {
                   "port": 6969,
                   "logging": {
                       "file": "${workspaceFolder}/dataEditor-${omegaEditPort}.log",
                       "level": "info"
                   }
               },
               "dfdlDebugger": {
                   "logging": {
                       "file": "${workspaceFolder}/daffodil-debugger.log",
                       "level": "INFO"
                   }
               }
           }
       ]
   }
   ```
   
   and naming the file `test_robert_extension` in the file dialog resulted in in `test_robert_extension.tdml` file being made. 
   
   Also putting `test.tdml` in the file dialog resulted in `test.tdml` being made. No extra appended `.tdml` was observed when `.tdml` extension is specified in file name. 
   
   


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


Re: [PR] Fixed TDML Saved File w/o TDML Extension (Non-Windows OSes) [daffodil-vscode]

Posted by "JeremyYao (via GitHub)" <gi...@apache.org>.
JeremyYao commented on PR #1384:
URL: https://github.com/apache/daffodil-vscode/pull/1384#issuecomment-3303894478

   Doing an `xprop` on the file picker, we get 
   
   ```
   MACHINE:/$ xprop
   _XWAYLAND_ALLOW_COMMITS(CARDINAL) = 1
   WM_STATE(WM_STATE):
   		window state: Normal
   		icon window: 0x0
   _NET_WM_DESKTOP(CARDINAL) = 0
   _GTK_EDGE_CONSTRAINTS(CARDINAL) = 170
   _NET_WM_ALLOWED_ACTIONS(ATOM) = _NET_WM_ACTION_MOVE, _NET_WM_ACTION_RESIZE, _NET_WM_ACTION_CHANGE_DESKTOP, _NET_WM_ACTION_CLOSE, _NET_WM_ACTION_ABOVE, _NET_WM_ACTION_BELOW
   _NET_WM_STATE(ATOM) = _NET_WM_STATE_MODAL, _NET_WM_STATE_SKIP_TASKBAR, _NET_WM_STATE_FOCUSED
   WM_HINTS(WM_HINTS):
   		Client accepts input or input focus: True
   		Initial state is Normal State.
   		window id # of group leader: 0xe00001
   _GTK_THEME_VARIANT(UTF8_STRING) = "dark"
   WM_TRANSIENT_FOR(WINDOW): window id # 0xc000b7
   XdndAware(ATOM) = BITMAP
   _NET_WM_OPAQUE_REGION(CARDINAL) = 38, 23, 1207, 12, 26, 35, 1231, 937
   _GTK_FRAME_EXTENTS(CARDINAL) = 26, 26, 23, 29
   _MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x2, 0x0, 0x0, 0x0, 0x0
   WM_WINDOW_ROLE(STRING) = "GtkFileChooserDialog"
   _NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DIALOG
   _NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 14695018, 14695019
   _NET_WM_USER_TIME_WINDOW(WINDOW): window id # 0xe03a69
   WM_CLIENT_LEADER(WINDOW): window id # 0xe00001
   _NET_WM_PID(CARDINAL) = 394793
   WM_LOCALE_NAME(STRING) = "en_US.UTF-8"
   WM_CLIENT_MACHINE(STRING) = "MACHINE"
   WM_NORMAL_HINTS(WM_SIZE_HINTS):
   		program specified minimum size: 831 by 426
   		program specified base size: 0 by 0
   		window gravity: NorthWest
   WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING, _NET_WM_SYNC_REQUEST
   WM_CLASS(STRING) = "code", "Code"
   WM_ICON_NAME(STRING) = "Save TDML File"
   _NET_WM_ICON_NAME(UTF8_STRING) = "Save TDML File"
   WM_NAME(STRING) = "Save TDML File"
   _NET_WM_NAME(UTF8_STRING) = "Save TDML File"
   
   ```


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


Re: [PR] Fixed TDML Saved File w/o TDML Extension (Non-Windows OSes) [daffodil-vscode]

Posted by "stricklandrbls (via GitHub)" <gi...@apache.org>.
stricklandrbls commented on PR #1384:
URL: https://github.com/apache/daffodil-vscode/pull/1384#issuecomment-3300133441

   @rthomas320 - I think there was an issue with how the old version of the `Create TDML File` was working:
   ```ts
     file = await vscode.window
       .showSaveDialog({
         saveLabel: label,
         title: title,
         filters: {
           TDML: ['tdml'],
         },
       })
       .then((fileUri) => {
         if (fileUri) {
           return normalizePath(fileUri.fsPath)
         }
   
         return ''
       })
   ```
   Previously, this block was already inside an `async` function then calling `await` on another asynchronous function while also providing a `.then` clause _and_ a return value. I updated this to `await` then moved the clause out.


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


Re: [PR] Fixed TDML Saved File w/o TDML Extension (Non-Windows OSes) [daffodil-vscode]

Posted by "michael-hoke (via GitHub)" <gi...@apache.org>.
michael-hoke commented on PR #1384:
URL: https://github.com/apache/daffodil-vscode/pull/1384#issuecomment-3266603907

   I think we need the following changes:
   - We're missing a `$` after the .tdml.xml case
   - We shouldn't be using `/m` as pathStr shouldn't ever contain newlines
   - We should be using `/i` because .TDML is a valid extension in at least Windows
   - I don't think we need the `.*` before the extension (since we're not using `^`). Some regex libraries force match on a whole string, but I don't believe this is one of them.
   
   And a note: It looks like there are potential encoding issues when using `pathStr.toLowerCase().endsWith(...)` that a regex sidesteps, so the regex ends up being a better solution.


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


Re: [PR] Fixed TDML Saved File w/o TDML Extension (Non-Windows OSes) [daffodil-vscode]

Posted by "stricklandrbls (via GitHub)" <gi...@apache.org>.
stricklandrbls commented on PR #1384:
URL: https://github.com/apache/daffodil-vscode/pull/1384#issuecomment-3285975866

   > Also, if you add 'tdml.xml' to the filters argument of `showSaveDialog`, will that work like I think it will and show files with both extensions? Will it also default to still appending `.tdml` if it's first in the list? 
   
   Let me try this out and I'll get back to you.


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


Re: [PR] Fixed TDML Saved File w/o TDML Extension (Non-Windows OSes) [daffodil-vscode]

Posted by "michael-hoke (via GitHub)" <gi...@apache.org>.
michael-hoke commented on PR #1384:
URL: https://github.com/apache/daffodil-vscode/pull/1384#issuecomment-3237866465

   Please change `.includes` to `.endsWith`. The filename is user-defined and potentially could include .tdml as a part of the filename.


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


Re: [PR] Fixed TDML Saved File w/o TDML Extension (Non-Windows OSes) [daffodil-vscode]

Posted by "michael-hoke (via GitHub)" <gi...@apache.org>.
michael-hoke commented on PR #1384:
URL: https://github.com/apache/daffodil-vscode/pull/1384#issuecomment-3238443943

   A valid filename here could be test.tdml.gif.final.tdml - I really think we need to use endsWith instead of indexOf/split/includes.
   
   We're using a saveFileDialog in this specific case, and I'm not sure what kind of convenience method we could use for a save - typically, those return the last chunk of text after the last dot (eg. they'll return .gz for a .tar.gz file), and we wouldn't want to force append .tdml to a .tdml.xml extension.


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