You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by GitBox <gi...@apache.org> on 2021/12/09 16:18:39 UTC

[GitHub] [daffodil] tuxji opened a new pull request #701: Rename version.h to daffodil_version.h

tuxji opened a new pull request #701:
URL: https://github.com/apache/daffodil/pull/701


   StringDataInputStreamForUnparse.scala: Restore // $COVERAGE-ON$
   because there's a // $COVERAGE-OFF$ preceding it (misc fix too small
   for its own JIRA issue).
   
   .clang-format: Move from resources to c so it will be included
   alongside Makefile in C code generator's output directory (Makefile
   has a "format" goal which needs our .clang-format to do it right).
   
   daffodil_getopt.c: Include renamed version.h and add iwyu comment.
   
   version.h: Rename to daffodil_version.h (looks better in dired).
   
   DAFFODIL-2592


-- 
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] stevedlawrence commented on a change in pull request #701: Rename version.h to daffodil_version.h

Posted by GitBox <gi...@apache.org>.
stevedlawrence commented on a change in pull request #701:
URL: https://github.com/apache/daffodil/pull/701#discussion_r765952027



##########
File path: daffodil-runtime2/src/main/resources/org/apache/daffodil/runtime2/c/libcli/daffodil_getopt.c
##########
@@ -17,10 +17,10 @@
 
 // clang-format off
 #include "daffodil_getopt.h"
-#include <string.h>      // for strcmp, strrchr
-#include <unistd.h>      // for optarg, getopt, optopt, optind
-#include "cli_errors.h"  // for CLI_UNEXPECTED_ARGUMENT, CLI_HELP_USAGE, CLI_INVALID_COMMAND, CLI_INVALID_INFOSET, CLI_INVALID_OPTION, CLI_MISSING_COMMAND, CLI_MISSING_VALUE, CLI_PROGRAM_ERROR, CLI_PROGRAM_VERSION
-#include "version.h"
+#include <string.h>            // for strcmp, strrchr
+#include <unistd.h>            // for optarg, getopt, optopt, optind
+#include "cli_errors.h"        // for CLI_UNEXPECTED_ARGUMENT, CLI_HELP_USAGE, CLI_INVALID_COMMAND, CLI_INVALID_INFOSET, CLI_INVALID_OPTION, CLI_MISSING_COMMAND, CLI_MISSING_VALUE, CLI_PROGRAM_ERROR, CLI_PROGRAM_VERSION
+#include "daffodil_version.h"  // for daffodil_program_version

Review comment:
       `CodeGenerator.scala` also needs a change to reference `daffodil_version.h` instead of `version.h`, since it overwrites the file with the correct version number.
   
   Though, another option might be to create an sbt resource generator that generates `daffodil_version.h` rather than having a dummy file that the code generator overwrites.  I can see if I can whip that up if you like that better.




-- 
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] stevedlawrence commented on a change in pull request #701: Rename version.h to daffodil_version.h

Posted by GitBox <gi...@apache.org>.
stevedlawrence commented on a change in pull request #701:
URL: https://github.com/apache/daffodil/pull/701#discussion_r765963255



##########
File path: daffodil-runtime2/src/main/resources/org/apache/daffodil/runtime2/c/libcli/daffodil_getopt.c
##########
@@ -17,10 +17,10 @@
 
 // clang-format off
 #include "daffodil_getopt.h"
-#include <string.h>      // for strcmp, strrchr
-#include <unistd.h>      // for optarg, getopt, optopt, optind
-#include "cli_errors.h"  // for CLI_UNEXPECTED_ARGUMENT, CLI_HELP_USAGE, CLI_INVALID_COMMAND, CLI_INVALID_INFOSET, CLI_INVALID_OPTION, CLI_MISSING_COMMAND, CLI_MISSING_VALUE, CLI_PROGRAM_ERROR, CLI_PROGRAM_VERSION
-#include "version.h"
+#include <string.h>            // for strcmp, strrchr
+#include <unistd.h>            // for optarg, getopt, optopt, optind
+#include "cli_errors.h"        // for CLI_UNEXPECTED_ARGUMENT, CLI_HELP_USAGE, CLI_INVALID_COMMAND, CLI_INVALID_INFOSET, CLI_INVALID_OPTION, CLI_MISSING_COMMAND, CLI_MISSING_VALUE, CLI_PROGRAM_ERROR, CLI_PROGRAM_VERSION
+#include "daffodil_version.h"  // for daffodil_program_version

Review comment:
       Fair enough. Another thought, should the `ifndef`/`define` in the file be changed from `VERSION_H` to `DAFFODIL_VERSION_H`?




-- 
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] tuxji merged pull request #701: Rename version.h to daffodil_version.h

Posted by GitBox <gi...@apache.org>.
tuxji merged pull request #701:
URL: https://github.com/apache/daffodil/pull/701


   


-- 
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] tuxji commented on a change in pull request #701: Rename version.h to daffodil_version.h

Posted by GitBox <gi...@apache.org>.
tuxji commented on a change in pull request #701:
URL: https://github.com/apache/daffodil/pull/701#discussion_r765960280



##########
File path: daffodil-runtime2/src/main/resources/org/apache/daffodil/runtime2/c/libcli/daffodil_getopt.c
##########
@@ -17,10 +17,10 @@
 
 // clang-format off
 #include "daffodil_getopt.h"
-#include <string.h>      // for strcmp, strrchr
-#include <unistd.h>      // for optarg, getopt, optopt, optind
-#include "cli_errors.h"  // for CLI_UNEXPECTED_ARGUMENT, CLI_HELP_USAGE, CLI_INVALID_COMMAND, CLI_INVALID_INFOSET, CLI_INVALID_OPTION, CLI_MISSING_COMMAND, CLI_MISSING_VALUE, CLI_PROGRAM_ERROR, CLI_PROGRAM_VERSION
-#include "version.h"
+#include <string.h>            // for strcmp, strrchr
+#include <unistd.h>            // for optarg, getopt, optopt, optind
+#include "cli_errors.h"        // for CLI_UNEXPECTED_ARGUMENT, CLI_HELP_USAGE, CLI_INVALID_COMMAND, CLI_INVALID_INFOSET, CLI_INVALID_OPTION, CLI_MISSING_COMMAND, CLI_MISSING_VALUE, CLI_PROGRAM_ERROR, CLI_PROGRAM_VERSION
+#include "daffodil_version.h"  // for daffodil_program_version

Review comment:
       I'd made/tested my changes in a generated output directory and I'd forgotten about CodeGenerator.scala, sigh.  
   
   Your sbt resource generator sounds good, but I'll go ahead and update CodeGenerator.scala since that'll be quicker.  Total number of lines of code probably will be smaller this way too.




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