You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "naga-panchumarty (via GitHub)" <gi...@apache.org> on 2025/09/19 18:10:37 UTC
[PR] DFDL- 1369 [daffodil-vscode]
naga-panchumarty opened a new pull request, #1427:
URL: https://github.com/apache/daffodil-vscode/pull/1427
Closes #1369
## Description
This pr fixes the issue where the user is able to open multiple data editors for same file, usually after the 1st time the user opens a data editor, the subsequent data editors are empty for the same file. We want to prevent this from occurring, so the what this fix does it, if the user attempts to open another data editor for the same file, it shows a dialog box saying its already open.
## Wiki
- [ ] I have determined that no documentation updates are needed for these changes
- [ ] I have added following documentation for these changes
[List added wiki/docs documentation here for review, if applicable]
## Review Instructions including Screenshots
1. Open a data editor, using ctrl+shift+p, or using the command panel, for a sample test file
2. Open a data editor again using the same test file
3. You should see a warning saying the data editor for that file is already open
<img width="573" height="70" alt="{E22E31C5-A7DF-4315-AAFA-6D15ED8FCCD1}" src="https://github.com/user-attachments/assets/71955ed2-2bd7-44f6-b6c2-9e17d8853098" />
--
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] DFDL-1369 [daffodil-vscode]
Posted by "lrbarber (via GitHub)" <gi...@apache.org>.
lrbarber commented on PR #1427:
URL: https://github.com/apache/daffodil-vscode/pull/1427#issuecomment-3329105360
I suggest taking a quick look to see if it's a simple fix 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
Re: [PR] DFDL-1369 [daffodil-vscode]
Posted by "scholarsmate (via GitHub)" <gi...@apache.org>.
scholarsmate merged PR #1427:
URL: https://github.com/apache/daffodil-vscode/pull/1427
--
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] DFDL-1369 [daffodil-vscode]
Posted by "JeremyYao (via GitHub)" <gi...@apache.org>.
JeremyYao commented on PR #1427:
URL: https://github.com/apache/daffodil-vscode/pull/1427#issuecomment-3329839669
> The two error messages are resolved
<img width="1086" height="651" alt="image" src="https://github.com/user-attachments/assets/0f333b99-5d53-414b-851b-65a54097bafc" />
Retested on W10. Confirmed not seeing the two error messages.
--
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] DFDL-1369 [daffodil-vscode]
Posted by "JeremyYao (via GitHub)" <gi...@apache.org>.
JeremyYao commented on code in PR #1427:
URL: https://github.com/apache/daffodil-vscode/pull/1427#discussion_r2378980814
##########
src/dataEditor/dataEditorClient.ts:
##########
@@ -101,6 +100,7 @@ export const APP_DATA_PATH: string = XDGAppPaths({ name: 'omega_edit' }).data()
const HEARTBEAT_INTERVAL_MS: number = 1000 // 1 second (1000 ms)
const MAX_LOG_FILES: number = 5 // Maximum number of log files to keep TODO: make this configurable
+const OPEN_EDITORS = new Map<string, vscode.WebviewPanel>()
Review Comment:
Disregard my comment on changing the map to a set-- I didn't initially see that the .get operation is used for bringing up the previously existing Data Editor instance to be focused.
--
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] DFDL-1369 [daffodil-vscode]
Posted by "JeremyYao (via GitHub)" <gi...@apache.org>.
JeremyYao commented on PR #1427:
URL: https://github.com/apache/daffodil-vscode/pull/1427#issuecomment-3325290353
I'm seeing two extra VSCode messages pop up when I give this a quick test
<img width="1090" height="668" alt="image" src="https://github.com/user-attachments/assets/50665d60-204d-4c4f-a65e-0d04cd378e6b" />
<img width="469" height="154" alt="image" src="https://github.com/user-attachments/assets/08c7ed59-82e3-4252-837c-d5d4f1467ddb" />
Can anyone confirm they're seeing this as well?
--
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] DFDL-1369 [daffodil-vscode]
Posted by "rthomas320 (via GitHub)" <gi...@apache.org>.
rthomas320 commented on PR #1427:
URL: https://github.com/apache/daffodil-vscode/pull/1427#issuecomment-3334342293
Tested on Windows 10. Worked as expected. CI is failing for Ubuntu 22.04, a DataEditor unit test is failing. I'm not sure why the unit test would fail for only Ubuntu 22.04, but when the test is restarted it fails in the same location.
<img width="2067" height="1547" alt="image" src="https://github.com/user-attachments/assets/bacfe5db-b9a5-4151-9202-8697dd588d94" />
--
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] DFDL-1369 [daffodil-vscode]
Posted by "JeremyYao (via GitHub)" <gi...@apache.org>.
JeremyYao commented on code in PR #1427:
URL: https://github.com/apache/daffodil-vscode/pull/1427#discussion_r2376983567
##########
src/dataEditor/dataEditorClient.ts:
##########
@@ -101,6 +100,7 @@ export const APP_DATA_PATH: string = XDGAppPaths({ name: 'omega_edit' }).data()
const HEARTBEAT_INTERVAL_MS: number = 1000 // 1 second (1000 ms)
const MAX_LOG_FILES: number = 5 // Maximum number of log files to keep TODO: make this configurable
+const OPEN_EDITORS = new Map<string, vscode.WebviewPanel>()
Review Comment:
I'll change my review from a +1 to a needs-change given the scope of the suggested edits.
--
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] DFDL-1369 [daffodil-vscode]
Posted by "JeremyYao (via GitHub)" <gi...@apache.org>.
JeremyYao commented on code in PR #1427:
URL: https://github.com/apache/daffodil-vscode/pull/1427#discussion_r2376449101
##########
src/dataEditor/dataEditorClient.ts:
##########
@@ -101,6 +100,7 @@ export const APP_DATA_PATH: string = XDGAppPaths({ name: 'omega_edit' }).data()
const HEARTBEAT_INTERVAL_MS: number = 1000 // 1 second (1000 ms)
const MAX_LOG_FILES: number = 5 // Maximum number of log files to keep TODO: make this configurable
+const OPEN_EDITORS = new Map<string, vscode.WebviewPanel>()
Review Comment:
Functionality works, so my +1 will still hold, but something to consider here is potentially changing this to a set as it appears like you're only checking the keys from the map.
Additionally, the const being here may be confusing as the map is being mutated as you're adding keys. Consider changing the casing of the variable name as well as making the variable global. See if this helps: https://chatgpt.com/share/68d42453-5314-800b-b6e3-a406f30e105d
--
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] DFDL-1369 [daffodil-vscode]
Posted by "rthomas320 (via GitHub)" <gi...@apache.org>.
rthomas320 commented on PR #1427:
URL: https://github.com/apache/daffodil-vscode/pull/1427#issuecomment-3319987263
A unit test for DataEditor is failing
<img width="1002" height="694" alt="image" src="https://github.com/user-attachments/assets/935efd33-4970-41e0-ba63-0214fc04510a" />
--
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] DFDL-1369 [daffodil-vscode]
Posted by "naga-panchumarty (via GitHub)" <gi...@apache.org>.
naga-panchumarty commented on PR #1427:
URL: https://github.com/apache/daffodil-vscode/pull/1427#issuecomment-3325161024
Data Editor unit test has been resolved and its passing 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] DFDL-1369 [daffodil-vscode]
Posted by "JeremyYao (via GitHub)" <gi...@apache.org>.
JeremyYao commented on PR #1427:
URL: https://github.com/apache/daffodil-vscode/pull/1427#issuecomment-3328662306
> I saw those two extra messages on Win11 as well, but wasn't bothered by them.... It would, however, be nice to eliminate them if it could be done easily.
Should we broaden the scope of this PR to include the removal of the two error messages or address those in a separate issue/PR?
--
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] DFDL-1369 [daffodil-vscode]
Posted by "naga-panchumarty (via GitHub)" <gi...@apache.org>.
naga-panchumarty commented on PR #1427:
URL: https://github.com/apache/daffodil-vscode/pull/1427#issuecomment-3329056194
I could make a seperate issue but would that issue need to be made under 1.4.3?
--
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] DFDL-1369 [daffodil-vscode]
Posted by "naga-panchumarty (via GitHub)" <gi...@apache.org>.
naga-panchumarty commented on PR #1427:
URL: https://github.com/apache/daffodil-vscode/pull/1427#issuecomment-3329740809
The two error messages are 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] DFDL-1369 [daffodil-vscode]
Posted by "JeremyYao (via GitHub)" <gi...@apache.org>.
JeremyYao commented on PR #1427:
URL: https://github.com/apache/daffodil-vscode/pull/1427#issuecomment-3329541226
> I suggest taking a quick look to see if it's a simple fix or not.
I agree. See if the issue might be something that's easily fixed. It seems like potentially you may want to add the quick-exit and informational message logic a bit earlier in the code?
--
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] DFDL-1369 [daffodil-vscode]
Posted by "naga-panchumarty (via GitHub)" <gi...@apache.org>.
naga-panchumarty commented on PR #1427:
URL: https://github.com/apache/daffodil-vscode/pull/1427#issuecomment-3335499552
@rthomas320, I pushed a new commit that took care of the ubuntu data editor test failing, can you let me know if this is what you're seeing on your side as well
--
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] DFDL-1369 [daffodil-vscode]
Posted by "rthomas320 (via GitHub)" <gi...@apache.org>.
rthomas320 commented on PR #1427:
URL: https://github.com/apache/daffodil-vscode/pull/1427#issuecomment-3328601456
Tested on Windows 10. The behavior works as described and all unit tests are passing. However I am seeing the error messages Jeremy is seeing also.
<img width="2467" height="1603" alt="image" src="https://github.com/user-attachments/assets/c8a92130-a31f-496d-be1e-51929bc0b046" />
--
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] DFDL-1369 [daffodil-vscode]
Posted by "lrbarber (via GitHub)" <gi...@apache.org>.
lrbarber commented on PR #1427:
URL: https://github.com/apache/daffodil-vscode/pull/1427#issuecomment-3328649443
I saw those two extra messages on Win11 as well, but wasn't bothered by them.... It would, however, be nice to eliminate them if it could be done easily.
--
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] DFDL-1369 [daffodil-vscode]
Posted by "JeremyYao (via GitHub)" <gi...@apache.org>.
JeremyYao commented on code in PR #1427:
URL: https://github.com/apache/daffodil-vscode/pull/1427#discussion_r2376449101
##########
src/dataEditor/dataEditorClient.ts:
##########
@@ -101,6 +100,7 @@ export const APP_DATA_PATH: string = XDGAppPaths({ name: 'omega_edit' }).data()
const HEARTBEAT_INTERVAL_MS: number = 1000 // 1 second (1000 ms)
const MAX_LOG_FILES: number = 5 // Maximum number of log files to keep TODO: make this configurable
+const OPEN_EDITORS = new Map<string, vscode.WebviewPanel>()
Review Comment:
Functionality works, so my +1 will still hold. Consider changing this to a set as it appears like you're only checking the keys from the map.
Additionally, the const being here is confusing as the map is being mutated as you're adding keys. Consider changing the casing of the variable name as well as making the variable global. See if this helps: https://chatgpt.com/share/68d42453-5314-800b-b6e3-a406f30e105d
--
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] DFDL-1369 [daffodil-vscode]
Posted by "JeremyYao (via GitHub)" <gi...@apache.org>.
JeremyYao commented on PR #1427:
URL: https://github.com/apache/daffodil-vscode/pull/1427#issuecomment-3329859781
<img width="2201" height="1354" alt="image" src="https://github.com/user-attachments/assets/936fa4b1-6d66-4307-8ab1-ca6387707fca" />
Confirmed message pops up when running DFDL schema debugging sessions when the data editor is specified to be open on W10.
--
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] DFDL-1369 [daffodil-vscode]
Posted by "JeremyYao (via GitHub)" <gi...@apache.org>.
JeremyYao commented on code in PR #1427:
URL: https://github.com/apache/daffodil-vscode/pull/1427#discussion_r2378980814
##########
src/dataEditor/dataEditorClient.ts:
##########
@@ -101,6 +100,7 @@ export const APP_DATA_PATH: string = XDGAppPaths({ name: 'omega_edit' }).data()
const HEARTBEAT_INTERVAL_MS: number = 1000 // 1 second (1000 ms)
const MAX_LOG_FILES: number = 5 // Maximum number of log files to keep TODO: make this configurable
+const OPEN_EDITORS = new Map<string, vscode.WebviewPanel>()
Review Comment:
Disregard my comment on changing the map to a set-- I didn't see that the .get operation is used to bringing up the previously existing Data Editor instance to be focused.
--
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