-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
new default null behaviour #198
Comments
I saw one issue of this, so far only in our SCDB instance. For me this is not an issue. |
I guess this sums it up: object template test;
variable a ?= undef;
variable a ?= null;
variable a ?= 42;
'/a' = a;
|
We have discovered the same problem.
and then there is some later code that does: Fix is straight forward ( |
@stdweird I had no time yet to test 10.7 but I'm pretty sure it'll cause problem in some parts of the template library as we tended to use Anyway #175 has been a major behaviour change introduced in panc as I said in one of my comment in #93 (unfortunately I was not available to participate more actively in the discussion). It has always been intentional that variable A ?= if ( cond1 ) {
'x';
} else {
null;
}; and then later (may be in another template): variable A ?= 'the_default'; Identifying all the occurences like this may be painful and quite difficult, as may depend on some conditions not well tested by our current configuration. I'm not sure to understand what the real use case for the change was (#93 (comment) was expected to work exactly as it worked before the change). And for me the initial example given in #93 with: final variable TEST2 = null;
variable TEST2 ?= 'something'; producing an error is quite consistent with It's probably too late but I'd really like to see #175 reverted until we have better understanding of the use case that may require the change and its consequences on existing templates, in particular the template library. |
I just gave a try to 10.7 and confirm that it doesn't work for us. It breaks We had also several site-specific templates that are broken but I managed to fix them and I didn't find a showstopper at this point... |
@jrha are you ready to accept the change from |
we recompiled and fixed templates until the results were identical. @ned21 wrt deleting a variable, i thought we agreed that noone needed this. (also, for the example you have, you can use wrt |
@jouvin I have one more day in the office before holiday, so it's really too late for 18.6, I'd prefer that we ensure that the release notes make it clear that there are known issues using the library with panc 10.7. |
@jhra you are the boss, I let you decide! At the same time, the 2 PRs are really very minimal changes and I cannot really expect problems (in particular for the Docker one as the templates are new in 18.6). |
We never expect problems, but yet they seem to keep occurring 😄 |
I'll see what I can do. FYI, the changed in the PR have been deployed in production at LAL (which is running mainly 17.7 at this point but I don't think there was any change to these parts of the TL since then). |
the new default null behaviour (from #175 / issue #93) cuases some issues with our templates, due to the following:
(obviously not in the same template).
anywhow, the 2nd default assignment is now skipped, since null is a valid default value.
?= null
is used quite a lot in the core libraries it seems, so there might be quite some fallout.i still stand by
#175
, but at least the template released should use?= undef
instead of?= null
The text was updated successfully, but these errors were encountered: