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/07/13 14:26:38 UTC

[GitHub] [daffodil-vscode] shanedell opened a new pull request, #702: Fix hierarchy default values. Update how yarn scripts are ran.

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

   Fix hierarchy default values. Update how yarn scripts are ran.
   
   - Remove individual default values for all attributes of an object. Instead create a default object.
   - Run yarn scripts by calling a function from a TS file instead of doing it inline in the package.json.
     - Created build/scripts/yarn-scripts.ts which holds different methods that are the scripts that can be ran.
     - Added package run-func so it is easier to run the yarn TS script functions and makes the yarn scripts in the package.json look cleaner.
   
   Closes #698


-- 
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 #702: Fix hierarchy default values. Update how yarn scripts are ran.

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


##########
build/scripts/yarn-scripts.ts:
##########
@@ -0,0 +1,107 @@
+#!/usr/bin/env node

Review Comment:
   oh yeah this was something I was messing around with, I remove it as it not needed anymore



-- 
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 a diff in pull request #702: Fix hierarchy default values. Update how yarn scripts are ran.

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


##########
src/classes/vscode-launch.ts:
##########
@@ -17,20 +17,7 @@
 
 import { TDMLConfig } from './tdmlConfig'
 import { DataEditorConfig } from './dataEditor'
-
-export interface InfosetOutput {
-  type: string
-  file: string
-}
-
-export interface LoggingConfig {
-  level: string
-  file: string
-}

Review Comment:
   I think the `LoggingConfig` interface is generic enough and should stay here since it can be reused by the other components, like the Data Editor.



-- 
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 a diff in pull request #702: Fix hierarchy default values. Update how yarn scripts are ran.

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


##########
package.json:
##########
@@ -633,46 +627,23 @@
             "description": "Editor server default port",
             "default": 9000
           },
-          "dataEditorLogFile": {
-            "type": "string",
-            "description": "Path to log file for data editor",
-            "default": "${workspaceFolder}/dataEditor-${omegaEditPort}.log"
-          },
-          "dataEditorLogLevel": {
-            "type": "string",
-            "description": "Log level for data editor",
-            "enum": [
-              "error",
-              "warn",
-              "info",
-              "debug",
-              "trace"
-            ],
-            "default": "info"
-          },
-          "dfdlDebuggerLogLevel": {
-            "type": "string",
-            "description": "Log level for debugger",
-            "enum": [
-              "ALL",
-              "DEBUG",
-              "ERROR",
-              "INFO",
-              "OFF",
-              "TRACE",
-              "WARN"
-            ],
-            "default": "INFO"
-          },
-          "dfdlDebuggerLogFile": {
-            "type": "string",
-            "description": "Path to log file for debugger",
-            "default": "/tmp/daffodil-debugger.log"
+          "dataEditor": {

Review Comment:
   Right.  If this gets merged, we'll need to update `dataEditorClient.ts` to match.



-- 
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 a diff in pull request #702: Fix hierarchy default values. Update how yarn scripts are ran.

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


##########
package.json:
##########
@@ -633,46 +627,23 @@
             "description": "Editor server default port",
             "default": 9000
           },
-          "dataEditorLogFile": {
-            "type": "string",
-            "description": "Path to log file for data editor",
-            "default": "${workspaceFolder}/dataEditor-${omegaEditPort}.log"
-          },
-          "dataEditorLogLevel": {
-            "type": "string",
-            "description": "Log level for data editor",
-            "enum": [
-              "error",
-              "warn",
-              "info",
-              "debug",
-              "trace"
-            ],
-            "default": "info"
-          },
-          "dfdlDebuggerLogLevel": {
-            "type": "string",
-            "description": "Log level for debugger",
-            "enum": [
-              "ALL",
-              "DEBUG",
-              "ERROR",
-              "INFO",
-              "OFF",
-              "TRACE",
-              "WARN"
-            ],
-            "default": "INFO"
-          },
-          "dfdlDebuggerLogFile": {
-            "type": "string",
-            "description": "Path to log file for debugger",
-            "default": "/tmp/daffodil-debugger.log"
+          "dataEditor": {

Review Comment:
   @scholarsmate I think we'll have to modify the `dataEditorClient.ts` to accommodate this.  
   
   https://github.com/ctc-oss/daffodil-vscode/commit/257ce11c6181dfc097b5d953dc440dfda8323d0d - Looks like we changed the way logging variables were pulled in from the VSCode configuration. I'd assume `logLevel` and `logFile` are similar.



-- 
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 #702: Fix hierarchy default values. Update how yarn scripts are ran.

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

   +1


-- 
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 #702: Fix hierarchy default values. Update how yarn scripts are ran.

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


-- 
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 a diff in pull request #702: Fix hierarchy default values. Update how yarn scripts are ran.

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


##########
build/scripts/yarn-scripts.ts:
##########
@@ -0,0 +1,107 @@
+#!/usr/bin/env node

Review Comment:
   Should this go before or after the license blurb?
   
   I've also never seen a _shebang_ for a `.ts` file. Is it necessary?



-- 
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 a diff in pull request #702: Fix hierarchy default values. Update how yarn scripts are ran.

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


##########
package.json:
##########
@@ -633,46 +627,23 @@
             "description": "Editor server default port",
             "default": 9000
           },
-          "dataEditorLogFile": {
-            "type": "string",
-            "description": "Path to log file for data editor",
-            "default": "${workspaceFolder}/dataEditor-${omegaEditPort}.log"
-          },
-          "dataEditorLogLevel": {
-            "type": "string",
-            "description": "Log level for data editor",
-            "enum": [
-              "error",
-              "warn",
-              "info",
-              "debug",
-              "trace"
-            ],
-            "default": "info"
-          },
-          "dfdlDebuggerLogLevel": {
-            "type": "string",
-            "description": "Log level for debugger",
-            "enum": [
-              "ALL",
-              "DEBUG",
-              "ERROR",
-              "INFO",
-              "OFF",
-              "TRACE",
-              "WARN"
-            ],
-            "default": "INFO"
-          },
-          "dfdlDebuggerLogFile": {
-            "type": "string",
-            "description": "Path to log file for debugger",
-            "default": "/tmp/daffodil-debugger.log"
+          "dataEditor": {
+            "type": "object",
+            "description": "Configuration for Data Editor. Settings are port, logFile and logLevel",
+            "default": {
+              "port": 9000,
+              "logFile": "${workspaceFolder}/dataEditor-${omegaEditPort}.log",
+              "logLevel": "info"
+            }

Review Comment:
   I prefer the way this is done in the `dfdlDebugger` section, so make this:
   
   ```
              "default": {
                 "port": 9000,
                 "logging": {
                   "file": "${workspaceFolder}/dataEditor-${omegaEditPort}.log",
                   "level": "INFO"
                 }
               }
   ```
   
   So we don't have 2 different ways to do the same thing.



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