You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to a recent change in the compile package, variables of type initial are no longer being included in the generated JSON listing file. I discovered this after I upgraded to the latest compile package and ran an internal tool that makes use of the JSON listing file, which flagged the missing variables.
In PR #490, I added support for overriding data+lookup variables. As part of that change, I added code so that in addition to the usual full JSON listing, we also now generate a minimal JSON listing file ({model}_min.json). In adding that, I intended to fix an issue where there were duplicate entries being included in the listing files, due to the fact that we were using initVars.
The problem with that fix is that we no longer include variables of type initial (those that are defined using the INITIAL function). These variables have their varType set to initial and their code is generated into the initLevels function by virtue of being part of the set of variables returned by initVars (the set of variables that have hasInitValue===true).
I will amend the above code so that it includes initial variables and will add a test case that covers this (since the existing tests did not cover this).
The text was updated successfully, but these errors were encountered:
I decided to go back to using initVars because that matches what is used by code gen when generating the initLevel function, and it includes initial variables. I fixed the allListedVars to remove duplicates, so that should resolve the issue that I was trying to fix the last time.
I noticed in fixing this that calling these xxxVars functions results in some redundant sorting work in the case where sde generate is used with both --list and --outformat (JSON listing in addition to code gen). I will address that separately in #528.
Due to a recent change in the
compile
package, variables of typeinitial
are no longer being included in the generated JSON listing file. I discovered this after I upgraded to the latestcompile
package and ran an internal tool that makes use of the JSON listing file, which flagged the missing variables.In PR #490, I added support for overriding data+lookup variables. As part of that change, I added code so that in addition to the usual full JSON listing, we also now generate a minimal JSON listing file (
{model}_min.json
). In adding that, I intended to fix an issue where there were duplicate entries being included in the listing files, due to the fact that we were usinginitVars
.Here's the relevant commit:
c0a184c
And a screenshot for context:
The problem with that fix is that we no longer include variables of type
initial
(those that are defined using theINITIAL
function). These variables have theirvarType
set toinitial
and their code is generated into theinitLevels
function by virtue of being part of the set of variables returned byinitVars
(the set of variables that havehasInitValue===true
).I will amend the above code so that it includes
initial
variables and will add a test case that covers this (since the existing tests did not cover this).The text was updated successfully, but these errors were encountered: