You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "Shanedell (via GitHub)" <gi...@apache.org> on 2023/04/13 19:11:38 UTC

[GitHub] [daffodil-vscode] Shanedell opened a new pull request, #582: omega-edit client get specified port from launch.json

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

   omega-edit client get specified port from launch.json
   
   - Updated the omega-edit client to loop through all configuartions inside of launch.json.
     - If dataEditor.omegaEdit is set the omegaEditPort variable will be updated.
     - If multiple configurations set dataEditor.omegaEdit the last one to set it is the value used.
   
   Closes #579


-- 
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 merged pull request #582: omega-edit client get specified port from launch.json

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


-- 
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] scholarsmate commented on pull request #582: omega-edit client get specified port from launch.json

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

   @arosien, will you review this please?  Thanks.


-- 
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 a diff in pull request #582: omega-edit client get specified port from launch.json

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


##########
src/dataEdit/client.ts:
##########
@@ -80,9 +80,29 @@ function getPidFile(serverPort: number) {
 
 async function getOmegaEditPort() {
   if (omegaEditPort === 0) {
-    omegaEditPort = vscode.workspace
-      .getConfiguration('dataEditor')
-      .get<number>('omegaEditPort', DEFAULT_OMEGA_EDIT_PORT)
+    /**

Review Comment:
   (the json configuration is using the literal property `dataEditor.omegaEditPort` (a property with a name that has a period in it), so this code doesn't work. I would recommend changing the configuration property to be hierarchical (no period) so that the current code will 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] arosien commented on a diff in pull request #582: omega-edit client get specified port from launch.json

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


##########
src/dataEdit/client.ts:
##########
@@ -80,9 +80,29 @@ function getPidFile(serverPort: number) {
 
 async function getOmegaEditPort() {
   if (omegaEditPort === 0) {
-    omegaEditPort = vscode.workspace
-      .getConfiguration('dataEditor')
-      .get<number>('omegaEditPort', DEFAULT_OMEGA_EDIT_PORT)
+    /**

Review Comment:
   ah thanks, i misread the update of the property name in the new 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


[GitHub] [daffodil-vscode] Shanedell commented on a diff in pull request #582: omega-edit client get specified port from launch.json

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


##########
src/dataEdit/client.ts:
##########
@@ -80,9 +80,29 @@ function getPidFile(serverPort: number) {
 
 async function getOmegaEditPort() {
   if (omegaEditPort === 0) {
-    omegaEditPort = vscode.workspace
-      .getConfiguration('dataEditor')
-      .get<number>('omegaEditPort', DEFAULT_OMEGA_EDIT_PORT)
+    /**

Review Comment:
   @arosien The current code does work. The reason
   
   ```ts
       omegaEditPort = vscode.workspace
         .getConfiguration('dataEditor')
         .get<number>('omegaEditPort', DEFAULT_OMEGA_EDIT_PORT)
   ```
   
   didn't work is because it gets the default config setup in the `package.json` unless in debug mode. In debug mode it actually worked perfectly fine. The current update makes it work by looking at configs inside of `.vscode/launch.json`. The name of the variable wasn't the issue it was that the config desired wasn't being parsed yet.



-- 
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 a diff in pull request #582: omega-edit client get specified port from launch.json

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


##########
src/dataEdit/client.ts:
##########
@@ -80,9 +80,29 @@ function getPidFile(serverPort: number) {
 
 async function getOmegaEditPort() {
   if (omegaEditPort === 0) {
-    omegaEditPort = vscode.workspace
-      .getConfiguration('dataEditor')
-      .get<number>('omegaEditPort', DEFAULT_OMEGA_EDIT_PORT)
+    /**

Review Comment:
   I don't think this code is necessary; see https://github.com/apache/daffodil-vscode/issues/579#issuecomment-1512406554



-- 
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 a diff in pull request #582: omega-edit client get specified port from launch.json

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


##########
src/dataEdit/client.ts:
##########
@@ -80,9 +80,29 @@ function getPidFile(serverPort: number) {
 
 async function getOmegaEditPort() {
   if (omegaEditPort === 0) {
-    omegaEditPort = vscode.workspace
-      .getConfiguration('dataEditor')
-      .get<number>('omegaEditPort', DEFAULT_OMEGA_EDIT_PORT)
+    /**

Review Comment:
   @arosien The current code does work. The reason
   
   ```ts
       omegaEditPort = vscode.workspace
         .getConfiguration('dataEditor')
         .get<number>('omegaEditPort', DEFAULT_OMEGA_EDIT_PORT)
   ```
   
   didn't work is because it gets the default config setup in the `package.json` unless in debug mode. In debug mode it actually worked perfectly fine. The current update makes it work without needing to be in debug mode, by looking at all configs inside of `.vscode/launch.json`. The name of the variable wasn't the issue it was that the config desired wasn't being parsed yet.



-- 
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 a diff in pull request #582: omega-edit client get specified port from launch.json

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


##########
src/dataEdit/client.ts:
##########
@@ -80,9 +80,29 @@ function getPidFile(serverPort: number) {
 
 async function getOmegaEditPort() {
   if (omegaEditPort === 0) {
-    omegaEditPort = vscode.workspace
-      .getConfiguration('dataEditor')
-      .get<number>('omegaEditPort', DEFAULT_OMEGA_EDIT_PORT)
+    /**

Review Comment:
   the json configuration is using the literal property `dataEditor.omegaEditPort` (a property with a name that has a period in it), so this code doesn't work. I would recommend changing the configuration property to be hierarchical (no period) so that the current code will 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] stricklandrbls commented on pull request #582: omega-edit client get specified port from launch.json

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

   lgtm +1, wish I had that green checkmark though haha


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