Releases: Synergex/CodeGen
CodeGen 5.1.0
CodeGen Release Notes
- We added support for the conditional processing of template code based on identifiers defined on the command line.
Symphony Framework Components
- There were no Symphony Orchestrator changes in this release.
- There were no Symphony Framework template file changes in this release.
- There were no Symphony Framework CodeGen Extensions changes in this release.
CodeGen 5.0.7
CodeGen Release Notes
- We added a new structure expression .
- We added a new key loop variation called <UNIQUE_KEY>.
- We fixed a bug that was causing a crash during key segment loop processing if a key segment was defined using an overlay field. An appropriate error is now generated.
- We changed the minimum required version of the .NET Framework from 4.5 to 4.5.2.
Symphony Framework Components
- There were no Symphony Orchestrator changes in this release.
- There were no Symphony Framework template file changes in this release.
- There were no Symphony Framework CodeGen Extensions changes in this release.
CodeGen 5.0.6
CodeGen Release Notes
- We fixed an error that was interfering with the processing of case variations of the field loop expansion token <FIELD_ODBCNAME>.
- We added two new field loop expansion tokens <FIELD_NET_ALTNAME> and <FIELD_SQL_ALTNAME>. Both are also available for use in key segment loops.
- We added five new field loop expressions , , , and . These expressions can be used to determine if a field that was the very first element of an array is being processed.
Symphony Framework Components
- There were no Symphony Orchestrator changes in this release.
- There were no Symphony Framework template file changes in this release.
- There were no Symphony Framework CodeGen Extensions changes in this release.
CodeGen 5.0.5
CodeGen Release Notes
- We added a new field loop expansion token <FIELD_SELECTION_COUNT>.
- We extended the functionality of the recently added -checkversion command line option so that you can now configure CodeGen to periodically check for updates and inform you when an update is available.
- We have modified CodeGen so that it sets the Windows exit code to 1 if an error occurs during processing. This means that the standard IF ERRORLEVEL mechanism can be used to detect code generation problems when operating in batch files.
- We changed the way that field names are generated for fields from multi-dimensioned arrays. In previous versions the name of a field from a multi-dimensioned array might be presented as {"FIELD1_1_1"}, but this could result in a problem when using expansion tokens Fuchs as , or any other Pascal or camel case variant of tokens referring to the name of the field. Such tokens suppress the underscore characters and result in names like Field1111. This meant that duplicate names could be generated for fields within the same array. Consider an array field defines as {"MY_FIELD, [12,12,1]A1"}; the for {"MY_FIELD[1,11,2]"} would be MyField1112; exactly the same as for field {"MY_FIELD[11,1,2]"}. To address this we have changed the naming convention for elements in multi-dimensioned arrays such that leading zeros are now included, up to the required length based on the highest element number. For example the names produced for the earlier example will now be MyField01112 and MyField11012. If you use expansion tokens that refer to the non-DBL names of fields in multi-dimensioned arrays in such a way that those names become part of an external API then this change will break your existing code. Note that this change only applies to multi-dimensioned arrays; the behavior of fields in single-dimensioned arrays has not changed.
- We fixed a problem with the processing of the tag loop expansion token <TAGLOOP_TAG_VALUE>. Previously for an alpha field with a comparison value the comparison value would have been inserted without trailing space (e.g. "A"), now trailing spaces will be inserted if necessary (e.g. "A "). Previously for an alpha field with an empty comparison value a null string (e.g. "") would have been inserted, now an empty string with the appropriate number of spaces (e.g. " ") is inserted. The number of spaces is determined by the length of the alpha field, up to a maximum of 15 characters which is the maximum possible length for a tag comparison value.
- We fixed an error that was preventing the tag loop expression tokens and from operating correctly. Previously would only be true if no tags were present and would be true only if a single tag was present.
- We added two new structure expressions and .
Symphony Framework Components
- We corrected the column headings in the Orchestrator commands list.
- There were no Symphony Framework template file changes in this release.
- There were no Symphony Framework CodeGen Extensions changes in this release.
CodeGen 5.0.4
CodeGen Release Notes
- IMPORTANT: We changed some of the implementation details for period date fields (YYPP and YYYYPP). Previously, because there is no direct equivalent for fields of these types in environments like .NET, Java and SQL, these fields were treated as type String by various field loop tokens. We have changed this so that they are now treated as type int. This change affects the following field loop tokens: <FIELD_CSTYPE>, <FIELD_CSDEFAULT>, <FIELD_OCTYPE>, <FIELD_OCDEFAULT>, <FIELD_SNTYPE>, <FIELD_SNDEFAULT>, <FIELD_VBTYPE> and <FIELD_VBDEFAULT>. This could potentially change the behavior of your templates and the resulting code, but we decided to make the change because fields of this type are fairly rare.
- We added a new -rps command line option which allows the repository main and text files to be used to be specified on the command line, overriding other mechanisms for repository selection such as RPSDAT, RPSMFIL and RPSTFIL environment variables.
- We added a new -attach command line option which is intended for use by CodeGen developers. When specified this option causes CodeGen to wait for a key press at the very beginning of processing, making it possible to attach an external debugger to the process before processing begins.
- We added a new -time command line option that causes CodeGen to report the total elapsed time taken to process the command.
- We fixed an issue in the repository API which was causing period dates (D4 YYPP and D6 YYYYPP) to be incorrectly reported as type JULIAN instead of DATE. This in turn was causing the field loop expressions , and to fail.
- We removed an artificial limitation that was limiting the number of structures that could be processed concurrently (via the -ms command option) to five.
- We corrected a situation where recent versions of CodeGen could potentially exit and report a fail status without having displayed a corresponding error message.
- We fixed issues with the <FIELD_PRECISION> and <FIELD_PRECISION2> field loop tokens which were both inserting incorrect values. We also added a new field loop token <FIELD_PRECISION0>.
- We fixed an issue that was preventing the field loop expansion token <FIELD_SELECTIONS> from operating correctly.
- We fixed an issue that was preventing code generation without a repository structure from working.
- We fixed an issue that was preventing the field loop expressions and from operating correctly when used with structures that have no keys defined.
- We added back several sample subroutines, functions and include files to the distribution. These files were previously distributed but were accidentally excluded when we moved to the new WiX based installer. Some are still referenced by several old sample templates (mainly the UI Toolkit related templates). The files can be found in the main templates folder and we also once again set the CODEGEN_INC environment variable to point to the location of various include files that are referenced by some of the sample code.
Symphony Framework Components
- IMPORTANT: When upgrading to this version of CodeGen it it important that you update your Symphony Framework version (via NuGet) to V3.1.10. This is because of a change in the Symphony_Style template.
- In Orchestrator we added the ability to create a new command based on an existing command. The new option is available by right-clicking an existing command in the command grid, and from there you can select the required repository structure and the new commands will be created. The command grid also now allows for the selection of multiple commands.
- Orchestrator now supports being launched via a registered file association, and we have updated the installation to create a file association for orchestrator project files (.symproj). This means that you can now launch orchestrator by double-clicking on a project file, or by right-clicking a project file and selecting "Open with Symphony Orchestrator".
- Orchestrator also now supports Windows "Jump Lists". This means that if you pin the Orchestrator icon to the Task Bar, you can use right-click to display and select from a list of recently opened projects.
- There were no changes to the Symphony Framework CodeGen Extensions in this release.
CodeGen 5.0.3
CodeGen 5.0.3 Release Notes
- We added a new command line option -checkversion that allows you to check whether a you are running the latest released version of CodeGen. Your current and the latest versions will be displayed, together with a message confirming the status of your installation. This option requires Internet connectivity.
- We updated the installer so that the CodeGen documentation is now an optional component. If the documentation is not installed locally then the codegen -docs command line option will launch the Web-based documentation.
- We changed the location where we install the sample templates, which you will now find in a folder below the public documents folder (C:\Users\Public\Documents\CodeGenTemplates).
- The installation now records the CodeGen version number in the registry. This makes it easier for third-party tools that may depend on CodeGen to determine the installed version.
- Several additional Symphony Framework components are now being distributed as part of the CodeGen installation. See below for more details.
Symphony Framework Components
IMPORTANT: If you use CodeGen in conjunction with Symphony Framework then it is important that you should upgrade to Symphony Framework V3.1.9.0 BEFORE installing this version of CodeGen.
- The Symphony Framework CodeGen Extensions are now being distributed as part of the CodeGen installation and have been removed from V3.1.9.0 of the Symphony Framework installation.
- The Symphony Framework template files are now being distributed with the CodeGen installation and have been removed from V3.1.9.0 of the Symphony Framework installation.
- The folder containing the Symphony template files has changed from C:\Program Files (x86)\Synergex\SymphonyFramework\Template to C:\Users\Public\Documents\SymphonyTemplates, but the environment variable SYMPHONYTPL continues to point to the location of the Symphony templates and should be the primary mechanism used to locate them from the command prompt or batch files.
- No Symphony Framework templates were added, deleted or changed in this release.
- We added a border to the Symphony Orchestrator main window so that the application can be resized for easier use.
CodeGen 5.0.2
CodeGen Release Notes
- We corrected several documentation issues where it was stated that several command line options (-s, -t, -a, -ut and others) were limited to a maximum of ten values following the option. This limitation in previous versions of CodeGen was removed in V5.0.0.
- We fixed a bug in the Template Browser utility that was causing it to fail to start if Symphony Framework was not installed.
- We added a new file header token called <CODEGEN_FOLDER> which allows template files to specify the name of a sub-folder (below the main output folder) where output files should be created. In order to not break existing environments, template specified subfolder names won't be used unless a new -tf command line option is also used. By default, if a template file does specify a subfolder, and if a namespace is used within the template, then the subfolder name will also be appended to the namespace being used. This can be disabled if necessary by using the new -nf command line option.
- For some time the Symphony Framework has provided a utility application called Symphony Orchestrator that allows a developer to use a graphical user interface to define the various code generation tasks related to a particular development project, and then use CodeGen to perform the actual code generation. As Symphony Orchestrator is so closely related to CodeGen we have decided to ship it with the CodeGen installation instead of the Symphony Framework installation. We have also added release notes information, and will add more documentation as soon as time permits.
Symphony Orchestrator Release Notes
- Because of its close ties to CodeGen, Symphony Orchestrator has been moved from the Symphony Framework development project to the CodeGen development project. Orchestrator remains part of Symphony Framework, but will now be distributed via the CodeGen installation.
- We changed the Orchestrator version number to match the version of CodeGen that it now ships with.
- We mad a change to OrchestratorViewModel to prevent the project folder incorrectly being added to program folders.
- We changed the CommandDetails.xam view to correct the display of the token list cells.
CodeGen 5.0.1
CodeGen Release Notes
This is a bug fix release. We recommend that anyone running CodeGen V5.0.0 should upgrade to this release immediately.
Changes in this release include:
- Fixed a bug that was causing incorrect data to be output (compared to previous versions) by the <FIELD_NAME> token when the -prefix option was used in conjunction with a repository structure that contained group fields. The bug was introduced in V5.0.0.
- The current CodeGen version number is now recorded in each assembly via the Assembly File Version attribute.
CodeGen 5.0.0
CodeGen Release Notes
Important Notes and Warnings
This release represents a total re-write of the CodeGen code base, embracing best practice object-oriented development techniques, and utilizing all of the latest and greatest features of Synergy .NET. Starting with this release CodeGen is only available for use on the Windows platform.
Reporting Problems
Extensive internal and external beta testing of CodeGen V5 has taken place and we are pleased with the very high level of compatibility between this and earlier versions. But if you do discover an issue then please provide feedback via the CodePlex Issue Tracking system.
Installing This Version
- If you have an earlier version of CodeGen installed then the installer for this version will perform an upgrade as usual.
- If you previously installed any of the CodeGen V5 beta versions then you must manually remove that version before installing this version.
Symphony Framework Users
In order to use CodeGen V5 you must be using Symphony Framework V3.0.2.0 or higher.
Changes That May Break Your Code
- If you have implemented custom extensions to CodeGen then please be aware that the mechanism for implementing extensions has changed. You will need to implement a new version of your extensions in order to have them work with CodeGen V5. If you need assistance with migrating your extensions to the new environment please contact the CodeGen development team via the General Discussions page on CodePlex.
- When using the in-process CodeGen API and specifying the names of user-defined tokens it was previously necessary to include the < and > characters in the name of the user defined token. V5 does not require the < and > characters to be specified, and in fact will fail to recognize the user defined tokens if you do specify them.
- In earlier versions of CodeGen the sample templates were installed to the folder \ProgramData\Synergex\CodeGen\Templates. Starting from this version the sample templates are now installed to the folder \Program Files (x86)\Synergex\CodeGen\Templates.
- We discovered that the <FIELD_ELEMENT> field loop token was not implemented correctly. For non-array fields it was intended to not insert any data into the output stream, but in fact would insert a digit 1. Also, when processing the first element of a single-dimension array field the token would insert 0 instead of 1. Both of these have been corrected, which could change the behavior of your template files.
- We discovered that the <FIELD_ELEMENT0> field loop token was not implemented correctly. For non-array fields it was intended insert a digit 0, but in fact would insert a digit 1. Also, when processing the first element of a single-dimension array field the token would insert 0 instead of 1. Both of these have been corrected, which could change the behavior of your template files.
Other Changes and New Features
This release was primarily about re-developing the internals of CodeGen in order to take advantage of latest technologies, but also to make CodeGen more extensible for future releases. But we also managed to squeeze in a few new features along the way:
- Added new generic expansion tokens <HOST_DNS_NAME>, <HOST_IP_ADDRESS>, <RANDOM_10>, <RANDOM_100>, <RANDOM_1000> and <RANDOM_INT>.
- Added support for generic expression tokens, and added the first generic expressions , , , and .
- The existing counter tokens and expressions have been re-documented as generic tokens and generic expressions.
- Added support for structure expression tokens, and added the first structure expression tokens , , , , and <STRUCTURE_UTEXT>.
- Added new mechanisms for supporting relation loop expressions, structure loop expressions, not in loop expansion tokens and not in loop expression tokens, although none exist as yet.
- Implemented , , and as loop utility expressions, and removed them from the specific individual loops that they were previously supported in.
- The file spec provided within a <PROVIDE_FILE>file.ext</PROVIDE_FILE> construct can now include a logical name to specify the location of the file.
- Completed the set of file header tokens that allow you to specify that a particular custom expansion token is required by adding <REQUIRES_CUSTOM_LOOPUTIL_TOKEN>, <REQUIRES_CUSTOM_NOTINLOOP_TOKEN>, <REQUIRES_CUSTOM_STRUCTLOOP_TOKEN> and <REQUIRES_CUSTOM_TAG_TOKEN>.
- Added a new set of file header tokens that can be used to specify that a particular custom expression token is required. For example <REQUIRES_CUSTOM_FIELD_EXPRESSION>.
- The <REQUIRES_OPTION>SUBSET</REQUIRES_OPTION> can now be satisfied by either the -subset or -fields command line options.
- When processing multiple structures but NOT using a structure loop, we currently support up to five concurrent structures. By default the context is set to the first structure specified, and you can switch context to a different structure using the <STRUCTURE#1> through <STRUCTURE#5> tokens. Currently when using the -ms command line option, you must specify between 2 and 5 structures.
- The command line -subset option (process a subset of fields) can now be used in conjunction with the -ms option (multiple structures).
- The command line -fields option was changed to support fields from multiple structures, when processing multiple structures (-ms option). When processing multiple structures you can specify -fields STR1.FIELD1 STR1.FIELD2 STR2.FIELD1 etc. If processing multiple structures and you don't specify STR.FIELD in -fields then the first structure is used as a default.
- Added a new -mw command line option. By default, if the same task generates the same output file then it is not written to disk multiple times. This option causes each instance of the file to be written to disk. If you use the in-process interface to CodeGen then the equivalent is to set the new CodeGenTask.MultiWriteFiles property.
- Added a new -dt command line option which creates log files which detail the results of the tokenization of template files, and tree output, both before and after pre-expansion. The files are created in the output folder and are named .tokens.log.
- Added a new -c command line option which causes processing to continue even after errors have been reported. If multiple templates, files or tasks are being processed then this option allows code generation to continue even though one template/structure combination has generated an error. If you use the n-process interface to CodeGen then the equivalent is to set the new CodeGenTaskSet.ContinueAfterError property.
- We have changed the way that CodeGen installations are created. We no longer use InstallShield Limited Edition, but instead are now using WiX (Windows Installer XML), and we're also using WiX Toolset which provides Visual Studio integration.
- The CodeGen installation and all assemblies are now digitally signed by using a verifiable code signing certificate. This means that you should no longer see Windows SmartScreen warnings when executing an installation that has been downloaded from the Internet.
CodeGen 4.4.4.1
CodeGen Release Notes
Changes in This Release
This is a patch release to address a small number of issues that were discovered after the original V4.4.4 release. Most of these issues only affected the "in-process" interface to CodeGen that is used by the unreleased "Symphony Orchestrator" utility, but one of the issues also affected the processing of user-defined tokens passed in via the -ut command line option, hence this additional release.
IMPORTANT: This is the final CodeGen release that supports building with Traditional Synergy; future versions will only be supported under Synergy .NET. This means that future releases will only be available on Windows. The binary releases and source code for this version will continue to be available from CodePlex so it will be possible to continue to use this version on platforms like Linux and OpenVMS, but future enhancements will only be available on Windows. Remember that if you are developing on a platform other than Windows, you can generate code on Windows and then move that code to the other platform.
Platform Requirements
- This version of CodeGen can be used on Windows, Linux and OpenVMS (Alpha and Integrity).
- This version of CodeGen has been tested with Synergy/DE 9.5.3b, Synergy/DE 10.1.1c/d and Synergy/DE 10.2.3i (beta).
Changes in the original 4.4.4 Release
- On OpenVMS we updated the processing of the -i and -o command line options so that a Windows or Unix style period can be used to represent "current directory", in addition to the OpenVMS style notation.
- We changed the implementation of the -u (user-defined token file) command-line option. Previously all user-defined token files were required to be in the same folder as the template being processed, and were required to have a .tkn file extension. Now user-defined token files can be located anywhere and have any file extension. This change means that when using the -u command line option, you must now specify a full or relative path and file name to the token file to use. Synergy logical names can be used to specify the path.
- We fixed a bug that was preventing the various loop counter expressions from working correctly. The bug was introduced in the 4.4.3 release.
- We added new expressions in key, enum, enum member, file and button loops.
- We renamed two tag loop expressions for consistency with other loop structures. has changed to and has changed to .
- We added the ability to define a subset of fields to be processed by specifying a list of field names on the command line using the new -fields option, or via the CodeGenTask.SubsetFields property. This enables field subset processing without having to modify your repository. As with the -subset option this feature can only be used when processing a single repository structure, and can't be used at the same time as the -subset option.
- We a problem when using developer debug mode (-debug) without replace files mode (-r). CodeGen would fail to create the developer debug log file if the -r option was not being used. The log file will now be created regardless of the replace files setting.