-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathRELEASE-NOTES
2949 lines (2415 loc) · 152 KB
/
RELEASE-NOTES
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
RELEASE NOTES for qore
see online release notes for more info:
http://docs.qore.org/current/lang/html/release_notes.html
*** end of release notes
****************
*** KNOWN ISSUES
****************
Darwin:
* Darwin does not seem to have complete support for signaling in threads;
for example, sigprocmask() has to be called after pthread_sigmask() in
order to effect changes in the thread signal mask (this is only necessary
on Darwin and discovered with trial and error).
Additionally, SIGINFO and SIGWINCH are never delivered to Qore's signal
handling thread even though the signal mask is set up appropriately (other
signals are delivered correctly though) - this only happens on Darwin
(tested with Darwin 11.3.0/OSX 10.7.3 - 12.1.0/OSX 10.8.1)
* pthread_create() on Darwin (on <= Darwin 10 - however this problem is
fixed on Darwin 11.3.0+/OSX 10.7.3+) returns 0 (= success) even though
thread creation fails - the background thread is never started. Therefore
on Darwin < 11 the maximum number of threads is set to 2560 which is the
empirically tested maximum number of threads where pthread_create() still
works.
***********************
*** LANGUAGE ISSUES ***
***********************
Garbage Collection
------------------
see https://github.com/qorelanguage/qore/wiki/Prompt-Collection
Thread Stacks Overrun
---------------------
*) BUG: on platforms without an assembler "stack guard" implementation
When the thread stack space is exhausted, the program will simply crash.
Qore is heavily threaded and uses the stack often to save thread state, so a
program like: 'sub a() { a(); } a();' will cause a core dump fairly quickly if
the stack guard option is not available for the platform in question.
Note that it is very easy to add a "stack guard" implementation for a new CPU;
there has to be a way to retrieve the value of the current stack pointer
register; this is normally a trivial operation.
The following platforms are *not* vulnerable (because they have assembly stack
guard implementations - also note that "stack guard" support does not depend
on the operating system but rather on the CPU, compiler, and assembler used -
for example on HP-UX pa-risc gcc and aCC can use different, incompatible
assemblers):
+ i386 (g++/clang++/llvm-g++, SunPro CC)
+ x86_64 (g++/clang++, SunPro CC)
+ powerpc - 32-bit only (g++)
+ sparc - 32-bit only (g++, SunPro CC)
+ itanium - 64-bit only (g++, aCC)
+ pa-risc - 32-bit only (g++, aCC)
Out of Memory Errors
--------------------
*) BUG: out of memory conditions are not handled with the c++ new
operator... I need a good solution for that. Generally the Qore program will
crash if the new operator cannot allocate the memory it needs, however work
has begun on handling out of memory errors starting in v0.5.2.
Parsing
-------
*) Note that there is a parse lock on each program object. Parsing on a
single program object is single-threaded. However, the reentrant parser is
able to support simultaneous parsing on different program objects.
*) Parsing is atomic; it is executed in 2 stages - 1) parse to pending data
structures, and 2) resolve references. References are resolved in the
second stage, which allows flexible referencing of functions, constants,
classes, etc before they are declared.
Stage 2 parsing happens when Program::parseCommit() is called; if any
errors occur in stage 2 parsing, then the commit fails.
Any parse errors at any stage will cause all the uncomitted parsing to be
rolled back. The Qore Program class allows the programmer control over the
2 stages of parsing with the Program::parsePending(),
Program::parseCommit(), and Program::parseRollback() methods.
**************************************
*** Current and Future Development ***
**************************************
Qore is being continuously developed and is making progress towards the 1.0
release.
There is no defined roadmap for 1.0; this milestone will be declared when the
time feels right (typical of open-source projects).
*********************
*** General Notes ***
*********************
Threading
---------
Qore was designed to favor multithreaded performance over single-threaded
performance. Due to this reason Qore programs should be very scalable on SMP
systems.
Memory Cleanliness
------------------
Qore has been thoroughly reviewed with valgrind (on Linux) and dbx (on
Solaris) for memory errors. There are no known static or dynamic memory leaks
in qore at this time. However, see below on handling out of memory
conditions.
The new features have not been as extensively tested, and there is some danger
of memory leaks with exception handling, as not every code path has been
explicitly tested.
Stability & Bugs
----------------
NOTE that while qore is version 0.8.*, this does not indicate a lack of
stability. The qore language is in heavy commercial use and must absolutely
remain stable and without memory leaks.
However not all code paths are as well tested as others; there are certainly
unknown bugs out there.
---------------------
RELEASE NOTES HISTORY
---------------------
see the doxygen docs for details of more recent releases
*****************************
RELEASE NOTES for qore v0.8.3
*****************************
release summary: 33 bug fixes and new feature support
* BUG FIX: fixed a bug in parse_url() & parseURL(); parsing urls with
IPv6 addresses without ":" - this will only work if a port
number is included; otherwise raw IPv6 addresses must be
enclosed in square brackets: [ipv6addr]
* BUG FIX: fixed a bug in is_readable() - was returning True for all
arguments
* BUG FIX: fixed a file descriptor leak in the FtpClient class related
to exception handling
* BUG FIX: fixed some crashing memory bugs in socket handling
(particularly related to the internal getPort() call)
* BUG FIX: fixed split() with quote argument
* BUG FIX: fixed a bug in handling parse errors in switch statements
that caused an endless loop
* BUG FIX: fixed 2 memory errors handling parse exceptions with
regular expressions
* BUG FIX: fixed an error in system() recognizing "$=" as shell
meta-characters
* BUG FIX: fixed a bug in system() where system() caused a deadlock in
both child and parent processes if launching the child
process launch fails
* BUG FIX: fixed a bug in system() where quotes and backslashes were
not being properly quoted
* BUG FIX: fixed typeinfo handling with imported variables in many
places - particulary subprograms with imported variables
could fail to parse if %require-types is set in the
subprogram
* BUG FIX: fixed detected duplicate variables in the same block when
%assume-local is set
* BUG FIX: SQLStatement::commit() and SQLStatement::rollback() no
longer throw an exception when called without an active
statement; instead, the statement is closed and the
operation is executed on the underlying database connection
object (Datasource or DatasourcePool object)
* BUG FIX: fixed a memory error looking up scoped constant values at
parse time
* BUG FIX: do not issue a "return value ignored" exception if the
function/method could throw an exception - the usage
without using the return value could be to test if an
exception is raised (ie an exception would be considered a
side effect)
* BUG FIX: fixed the string output for dates (when date/time values
are converted to a string) to not duplicate UTC offset
information in case the associated time zone has no region
name
* BUG FIX: fixed a bug in the c++ function QoreString::replaceAll()
* BUG FIX: fixed a crash when parsing a class with an
unknown/undefined base class
* BUG FIX: fixed a memory leak in the Socket class static
initialization
* BUG FIX: fixed issues with passing a reference through different
program stacks
* BUG FIX: fixed a bug where some specific type errors in function or
method calls were not found at parse time, but rather only
at bug time - now these errors are found at parse time
* BUG FIX: added stack overrun check in QoreClass::execConstructor()
call to catch the case when a class instantiation is
recursively defined
* BUG FIX: fixed a crash due to a memory error in managing reference
cycles with closures assigned to constant containers
* BUG FIX: fixed a crash when referencing closure-bound local
variables in expressions executed by the background
operator
* BUG FIX: fixed function/method variant matching to ensure that
variants are matched at run time if there is a variant with
fewer parameters than arguments in the call, but the
arguments could be NOTHING (count these as ambiguous
matches)
* BUG FIX: fixed 2 extremely tricky bugs where deleting a
global-thread-local and closure-bound variable that causes
an object to go out of scope that in turn references the
variable int its destructor caused a crash due to improper
thread-local variable stack deletion
* BUF FIX: fixed a deadlock when deleting the old value of the
closure-bound global-thread-local variable while holding
the variable's lock (happened when the value was an object
that referenced the variable in the destructor)
* BUG FIX: implemented variable finalization to ensure that variables
are not assigned after they are destroyed during program
and thread termination and destruction - this fixed some
possible memory leaks in QoreProgram destruction
* BUG FIX: implemented sleep() and usleep() with nanosleep() (on all
platforms with nanosleep(); also no longer mask SIGALRM as
it may be used by a library; SIGALRM is also needed for
sleep() and usleep() on UNIX and UNIX-like platforms; this
eliminated some strange crashes due to unhandled SIGALRM
signals when qore is used with some 3rd party libraries
* BUG FIX: added QDOM_FILESYSTEM to all static File class methods (so
they cannot be called while "no-filesystem" restrictions
are in place for a Program object)
* BUG FIX: added QDOM_TERMINAL_IO to TermIOS::getWindowSize() (so it
cannot be called while "no-terminal-io" restrictions are in
place for a Program object)
* BUG FIX: added runtime checks for method calls to system File class
constants while "no-terminal-io" is in force (so they
cannot be called while "no-terminal-io" restrictions are in
place for a Program object)
* BUF FIX: fixed a crashing bug where a hash passed to the context statement
will cause a crash if one of the keys after the first is not
assigned to a list
* new feature: Qore is now supported on Windows with a native DLL and
binaries; see README-WINDOWS for more information
* new feature: parse defines are now supported for conditional parsing
in a very simple way similar to a very simplified form of
the C/C++ pre-processor. All option (HAVE_*) are now
supported as parse defines as well (they are defined only
if they are True):
new parse directives supporting parse defines:
+ %define
+ %ifdef
+ %ifndef
+ %else
+ %endif
new Program methods supporting parse defines:
+ Program::define()
+ Program::getDefine()
+ Program::isDefined()
+ Program::undefine()
* new feature: new softlist and *softlist types
for automatically converting values to a list
* new feature: FtpClient class enhancements:
new methods
+ FtpClient::mkdir()
+ FtpClient::rmdir()
+ FtpClient::putData()
implemented implicit connection handling for the
FtpClient class
* new feature: Program class enhancements:
new method: Program::replaceParseOptions()
also expanded the parse option checking logic to allow
parse options to be set even when options are locked, if
the options make the Program's option environment more
restrictive
* new feature: added a new argument to split(string, string); now it's
split(string, string, bool = False) - if the 3rd arg is
True then the separator pattern string will be included in
each element of the output list
* new feature: do not issue "duplicate-local-vars" warning when the
other var is a top-level (thread-) local var
* new feature: include "deprecated" in the default warning mask
* new feature: added WARN_DEFAULT constant
* new features: new command-line options for the qore executable:
+ --time-zone,-z (set default time region)
+ --define, -D (create a parse define)
* new feature: thread-local variables are now persistent in each
Program object; they do not disappear between calls to
Program::run() or Program::callFunction(), etc
* new feature: allow SQLStatments to go from state 'defined'
(retrieving select after exec) to 'executed' automatically
without forcing the user to call SQLStatement::close()
* new feature: new functions:
+ strmul(string, int, *int)
+ has_key()
* new feature: parser improvements: implemented parser error recovery
for syntax errors in argument list declarations
* new feature: added support for removing or deleting a list of keys
from a hash in a single atomic operation:
+ my hash $h = remove $hash.$list_of_keys;
+ delete $hash.("a", "b", "c")
* new feature: allow parameters to be declared with type "nothing"
* doc updates: documentation updated for new features, documentation
corrections
*****************************
RELEASE NOTES for qore v0.8.2
*****************************
release summary: 16 bug fixes, IPv6 support, and other minor
improvements
* BUG FIX: fixed a crash when calling exit() right after fork() in the
parent process by ensuring that the signal thread is stopped
before exit()ing
* BUG FIX: fixed parse option inheritance with Program objects; when
PO_NO_CHILD_PO_RESTRICTIONS is set, then take the parse option
argument to Program::constructor() and apply them literally to the
new Program object (before the parse options were ignored and the
parse options applied to the child were applied from unitialized
memory)
* BUG FIX: fixed a memory/reference leak in the remove operator
* BUG FIX: fixed a bug initializing the internal signal manager
related to static C++ initialization ordering
* BUG FIX: fixed some bugs with %new-style with variable declaration
lists
* BUG FIX: fixed typos in statvfs hash output
* BUG FIX: fixed constant resolution when a class constant refers to
other (unscoped) class constants in the constant's definition
* BUG FIX: fixed catch block parameter parsing when %allow-bare-refs
is set
* BUG FIX: Dir::openFile() return type corrected to "File"
* BUG FIX: fixed memory errors merging in exception thrown when
executing code at parse time to the run-time exception sink
* BUG FIX: fixed initializing case expressions requiring parse-time
evaluation
* BUG FIX: fixed the SQLStatement class to perform an auto-commit if
necessary when the statement is closed when used with a Datasource
with auto-commit enabled
* BUG FIX: fixed (with an override) RWLock::lockOwner() to return True
if the read lock is held
* BUG FIX: the SQLStatement class did not set the "in transaction" flag when
executing SQL; this could cause the transaction state to be
silently lost when a driver does a reconnect with a lost
connection
* BUG FIX: the internal c++ Datasource class did not set the "active
transaction" flag properly with the first exec
* BUG FIX: added -lthread to sparc8 builds
* new feature: IPv6 support: Socket class updated, parseURL(), and
parse_url() updated to work with IPv6 addresses and hostnames
* new feature: added Socket::getPeerInfo() and Socket::getSocketInfo()
methods to get verbose information about local and remote sockets
* new feature: getaddrinfo() function and related constants to get
network address information for hostnames and services
* new feature: added statvfs() function
* new feature: added normal methods: Dir::hstat(), Dir::stat(),
Dir::statvfs()
* new feature: added normal methods: File::stat(), File::hstat(),
File::statvfs(); added static methods: File::stat(),
File::lstat(), File::hstat(), File::hlstat(), File::statvfs()
* new feature: added the %y printf format specifier to give YAML-like
output for complex data structures
* new feature: added RWLock::writeLockOwner() and
RWLock::readLockOwner() methods
* new feature: added date_info() function with 2 variants to get
broken-down date/time information
* new feature: added FtpClient::rename() method
* new feature: removed restriction assigning function references to
constants
* new feature: added trunc_str() function for more efficient trimming
a multi-byte string to a certain maximum byte length
* new feature: added a new DBI method: selectRow() and capability
(DBI_CAP_HAS_SELECT_ROW); this allows drivers to efficiently
select only one row from a select statement; if more than one row
is returned, then an exception should be raised and the data not
actually returned from the DB server; if the DBI driver does not
implement this function, then the Qore library will emulate this
behavior with selectRows()
* new feature: added timestamp to default exception handler output
* new feature: when the debugging compile-time option is enabled, then
simple backtraces are supported in specific places that will
assert on Linux and OSX
* doc updates: content was added for new and existing features and
corrections were made
*****************************
RELEASE NOTES for qore v0.8.1
*****************************
release summary: major bugfixes and major new features including the new
prepared statement API, vastly improved type system, static class variables
and class constants
* COMPATIBILITY WARNING: removed all XML and JSON functionality to the new
"xml" and "json" modules; see README-MODULES for more information
* BUG FIX: fixed a deadlock when calling HTTPClient::setProxyURL() with an
empty string argument
* BUG FIX: fixed a bug in the return statement to not check return type if an
exception is active
* BUG FIX: fixed a crashing bug when on_exit, on_success, or on_error
statement bodies are empty ({})
* BUG FIX: fixed command-line to take modules loaded on the command-line and
apply them immediately to the program; previously the modules would be
loaded but only accessible in the parsed program if the program also had a
%requires declaration for the same module as well
* BUG FIX: fixed a bug in QoreClass initialization from modules that could
cause a crash
* BUG FIX: updated time zone initialization to parse /etc/TIMEZONE on solaris
if the TZ variable is not set to set the time zone
* BUG FIX: made all Socket read methods taking a timeout throw a
SOCKET-TIMEOUT exception instead of returning NOTHING
* BUG FIX: fixed SSL read timeouts with Socket::recv*()
* BUG FIX: fixed 2-byte bitop swap on MSB platforms (ex sparc)
* BUG FIX: fixed DatasourcePool::constructor(hash), was ignoring "max" option
and setting to default (20)
* BUG FIX: fixed the setegid() function, was non functional before
* BUG FIX: fixed and improved parse-time variant matching
* BUG FIX: fixed a bug where it was possible to declare a function/method/
closure with a return type and then not have a return statement as the
last statement in the block thereby exiting with return value NOTHING,
which could cause a crash
* BUG FIX: implemented run-time checking when NOTHING is returned from a
function, method, or closure that declares a return type
* BUG FIX: fixed a bug in Dir::mkdir()
* BUG FIX: fixed sign error with not found strings with index() and rindex()
functions
* BUG FIX: fixed a bug with object += hash; member types were not checked
which could allow for members to be assigned types in violation of their
declared types
* BUG FIX: fixed a bug where too-lax type checking when executing variants
resolved at parse time can lead to a crash when a call is made with a
runtime type error
* BUG FIX: fixed a deadlock where if a global variable contains an object
which is deleted when the global var is reassigned and the object's
destructor references the containing global variable, a deadlock could
result due to incorrectly running the object's destructor while the global
variable's lock is held
* BUG FIX: fixed incompatibility with string "splice" and "extract" operators;
they were ignoring the 4th argument if it was not a string
* BUG FIX: fixed invalid memory access after delete error
* BUG FIX: removed internal references to the non-thread-safe localtime()
function; use thread-safe Qore internal date/time APIs instead
* BUG FIX: fixed %require-types checking with local variable declarations
* BUG FIX: fixed a memory leak/error when a namespace is added to a namespace
list and a committed namespace of the same name already exists, the
committed namespace is leaked and replaced with the parsed namespace
(happened in the parseCommit stage)
* BUG FIX: fixed race condition in ManagedDatasource without connection lock
when grabbing transaction lock - previously (without the connection lock,
which was recently removed) the startDBAction function did not guarantee
exclusive access to the datasource
* BUG FIX: fixed a memory/reference leak with thread resource tracking with
the Datasource class
* BUG FIX: the Datasource class will no longer allow read-only access to the
Datasource from other threads when a thread holds the transaction lock
because access to uncommitted data would be possible
* BUG FIX: fixed DatasourcePool destruction with a transaction open in current
thread
* BUG FIX: fix in the Dir class for stat()'ing symbolic links
* BUG FIX: bug fix for Socket class to enable the descriptor to be 0 (a valid
socket descriptor); before this would fail with strange errors
* BUG FIX: fixed constant initialization, parse intiialization order, and
global thread-local variable access from code parsed and committed to the
Program object after the first commit
* BUG FIX: fixed connecting to a HTTPS server through a proxy by using the
HTTP CONNECT method with the proxy
* BUG FIX: fixed bugs in FtpClient class handling invalid responses from buggy
FTP servers
* BUG FIX: fixed socket read when socket is closed during a read(-1) or
readBinary(-1) operation; an exception was thrown instead of returning the
data that was already read
* BUG FIX: added internal C++ API function Datasource::activeTransaction() so
DBI drivers can see if they need to throw an exception or not when
automatically reconnecting to a dataource - if
Datasource::beginTransaction() is called and then the driver finds out the
connection is down, it is safe to reconnect silently if no DB commands
have been issued since the beginTransaction() call -
Datasource::activeTransaction() will only return true if DB commands have
been issued since the transaction started. All DBI drivers the support
auto-reconnect were separately updated as well to use the new API
* BUG FIX: warnings and parse options are now stored on each statement so that
they are applied in the same way during both parse stages
* new feature: class constants; classes can now declare constants in their
private and public declaration blocks
* new feature: static class variables; classes can now declare static
variables in their private and public declaration blocks
* new feature: much better type implementation
* new type "timeout": accepts either integer or date
* types prefixed by "*" mean "or nothing" - also allow assignments to
NOTHING
* new feature: SQLStatement class and internal prepared statement API for DBI
drivers; the first driver supporting the new prepared statement API is the
Oracle driver
* new feature: fixed in-object calls (ex: $.call()) to dynamically look up the
method if the run-time class is not the same as the parse class. This
means that it's no longer necessary to use the "$self.method()" syntax to
make calls when the method may be called by a child class that has
reimplemented the method
* new feature: new parse options:
* %assume-local: variables declared with type and without "my" are assumed
to be local variables
* %allow-bare-refs: allows all variables, object members, and object
method calls to be made without using "$" or "$."
* %new-style: combination of %assume-local and %allow-bare-refs
* new feature: return types for functions, methods, and closures can appear
before the function signature:
ex: int sub function() {}
the new syntax with the return type before the method signature is
preferred over the olf syntax with the "returns" keyword
* new feature: implemented warning "duplicate-block-vars" enabled by default
for the case when a variable is declared twice within the same block at
the exact same lexical scope; this is an error when %assume-local is
enabled
* new feature: implemented "$#" giving the implicit offset when implicitly
iterating a list (foreach, map, foldl, foldr, select)
* new feature: added the following methods to the HTTPClient class:
* HTTPClient::setUserPassword()
* HTTPClient::clearUserPassword()
* HTTPClient::setProxyUserPassword()
* HTTPClient::clearProxyUserPassword()
* new feature: added "perm" key to stat hash output giving the file's symbolic
permission (i.e. "drwxr-xr-x")
* new feature: implemented %module-cmd(<module-name>) parse directive to allow
modules to handle commands while parsing; first module using this is the
gnu-java module for "import" statements allowing java classes (to be
imported to the current program)
* new feature: implemented "deprecated" method and function tag
* new feature: implemented splice(string, string, string) to split with an
optional quote character; this can be used, for example, to quickly parse
CSV files where some fields may be quoted and some not
* new feature: added the ability to deserialize xml-rpc extension types
* ex:nil
* ex:i1
* ex:i2
* ex:i8
* ex:float
* ex:dateTime
note that none of these types can be serialized automatically yet
* new feature: added methods:
* AbstractSmartLock::lockOwner()
* AbstractSmartLock::lockTID()
* new feature: updated HTTPClient to accept URLs specifying UNIX domain
sockets
*****************************
RELEASE NOTES for qore v0.8.0
*****************************
release summary: major Qore release with significant new functionality; see below for compatibility warnings
* hard typing, function and method overloading, and default argument values
declaring a variable with type info:
ex: our int $i = 1;
# the following 2 are functionally identical
my Mutex $m = new Mutex();
my Mutex $m();
declaring a function with argument types, default argument values and return types:
ex:
sub example(int $i = 0, bool $force = False) returns string {
return "test";
}
builtin types: int, float, bool, string, hash, object, reference, binary, date, nothing, null
soft types:
softint: converts automatically from string, float, bool, and date
softbool: converts automatically from string, float, int, and date
softstring: converts automatically from int, float, bool, and date
softfloat: converts automatically from string, int, bool, and date
composite types:
data: either string or binary
any: any value (including nothing)
code: either a call reference or a closure
the special type names "callref" and "closure" are synonyms for "code" and cannot be used to restrict a value to one or the other types.
limitations of hard typing:
no complex types are available yet (reference to hash, list of Condition, etc).
many functions and methods can return more than one data type depending on the arguments (values, not types); in this case the return types are tagged as "any" even though only a small number of types can be returned. In general, whenever an expression can return more than one type, this is currently covered by returning type "any".
Type information has been propagated through the parser; so many more errors can be caught at parse time, sometimes even if types are not declared in code (such as with code written for older versions of qore, for example). See below for warnings (non-existent-method-call, invalid-operation, call-with-type-errors, return-value-ignored, deprecated, excess-args, duplicate-hash-key) and parse directives (ex %require-types) added, most of them related to typing.
class methods restrictions: the following methods may not be overloaded:
<class>::copy()
<class>::destructor()
<class>::memberNotification(string $member)
<class>::memberGate(string $member)
<class>::methodGate(string $method, ...)
* time zone support in absolute date/time values
Qore uses the system's zoneinfo information to determine the UTC offset and daylight saving's time changes
Dates given without a time zone portion are assumed to be in local time
* more flexible time input when parsing:
UTC offset in time east plus hundreths of a second (1-6 digits after the decimal point are accepted):
2001-01-01T11:35:21.53+06:00
date in Zulu time (UTC) (time component = 00:00:00Z)
2001-01-01Z
* date/time values have resolution to the microsecond
previously was to the millisecond; applies to both relative and absolute date/time values
parser accepts a new relative time format: <x>us, ex: 45us = 45 microseconds
* conversion to a date from a string is much more flexible
formats such as the following are now accepted:
2001-01-01T15:35:23 # 2001-01-01 15:35:23 Mon +01:00 (CET)
20010101 15:35:23Z # 2001-01-01 15:35:23 Mon Z (UTC)
20010101 153523Z # 2001-01-01 15:35:23 Mon Z (UTC)
20010101 153523-02 # 2001-01-01 15:35:23 Mon -02:00 (-02:00)
20010101 153523-02:00:00 # 2001-01-01 15:35:23 Mon -02:00 (-02:00)
2001-01-01-153523-020000 # 2001-01-01 15:35:23 Mon -02:00 (-02:00)
20010101-153523 # 2001-01-01 15:35:23 Mon +01:00 (CET)
etc
furthermore, it's now possible to directly specify relative date/time values when converting from a string using a subset of ISO-8601 duration formats with an extension for microseconds (<n>u - the 'u' is lower-case as it is not part of the ISO9601 standard) and also an extension where the numeric portion may be negative:
P<n>Y<n>M<n>DT<n>H<n>M<n>S<n>u
for example:
P1Y2MT4H # <time: 1 year 2 months 4 hours>
P4DT-2M15u # <time: 4 days -2 minutes 15 microseconds>
PT4H30M # <time: 4 hours 30 minutes>
note that there must be at least one time component, and the <n>M value is minutes when following the 'T' and months when preceding or in the absense of a 'T'.
unlike ISO-8601 durations, all numbers must be integers (ISO-8601 allows the smallest time unit given to have a fractional component)
The other duration format: PYYYY-MM-DDTHH:MM:SS is also still accepted as well as in previous versions of qore
* class constuctor methods can now be declared private
* new TimeZone class
# creates a TimeZone object based on a zoneinfo region file
TimeZone::constructor(string)
# creates a TimeZone object based on a UTC offset in seconds east of UTC
TimeZone::constructor(softint)
# returns a date marked with this TimeZone from the UTC offset in seconds
TimeZone::date(softint $epoch_seconds, softint $us = 0)
# returns a date marked with this TimeZone
TimeZone::date(date)
# returns a date marked with this TimeZone from the given argument as an epoch offset in milliseconds
TimeZone::dateMs(softint)
# returns a date marked with this TimeZone from the given argument as an epoch offset in microseconds
TimeZone::dateUs(softint)
# returns the time zone for the current execution context
static TimeZone::get() returns TimeZone
# allows the time zone to be set for the current execution context
static TimeZone::set(TimeZone) returns nothing
# sets the time zone according to a UTC offset in seconds east of UTC for the current execution context
static TimeZone::setUTCOffset(softint) returns nothing
# sets the time zone according to a zoneinfo region file for the current execution context
static TimeZone::setRegion(string) returns nothing
* new Program methods
Program::setTimeZoneRegion(string)
Program::setTimeZoneUTCOffset(softint)
Program::setTimeZone(TimeZone)
Program::getTimeZone() returns TimeZone
* new functions
getpwuid2(softint) returns hash
getpwnam(string) returns any
getpwnam2(string) returns hash
getgrgid(softint) returns any
getgrgid2(softint) returns hash
getgrnam(string) returns any
getgrname2(string) returns hash
readlink(string) returns string
is_date_relative(date) returns bool
is_date_absolute(date) returns bool
get_duration_seconds(date) returns int
get_duration_milliseconds(date) returns int
get_duration_microseconds(date) returns int
now_us() returns date
now_utc() returns date
date_us(softint) returns date
microseconds(softint) returns date
get_microseconds(date) returns int
get_epoch_seconds(date) returns int
setsid() returns int
* new overloaded variants of existing functions
gmtime(date) returns date
localtime(date) returns date
* new Socket methods and variants
Socket::connectINET(string $host, int $port, int $timeout_ms = -1) returns nothing
Socket::connectINET(string $host, int $port, date $timeout_ms) returns nothing
Socket::connectINETSSL(string $host, int $port, int $timeout_ms = -1) returns nothing
Socket::connectINETSSL(string $host, int $port, date $timeout_ms) returns nothing
Socket::connectUNIX(string $path) returns nothing
Socket::connectUNIXSSL(string $path) returns nothing
Socket::setCertificate(binary) returns nothing
Socket::setCertificate(string) returns nothing
Socket::setPrivateKey(binary) returns nothing
Socket::setPrivateKey(string) returns nothing
* new object creation syntax
to create an object without explicitly using the "new" operator, use the "my" or "our" keywords then give the class name followed by the arguments to the constructor in parentheses as in the following example:
my File $f();
* cast<> operator
This operator can be used to suppress warnings such as the non-existent-method-call warning; for example, if you make a method call from a base class to a method that only exists in a subclass, because qore has no way of defining "pure virtual" methods like in C++, the parser raises a "non-existent-method-call" warning. You can use the cast<> operator to suppress this warning as in the following example:
cast<ChildClass>($self).methodCall();
* delete statement is now the delete operator
so now the delete operator can be used in "map" expressions, for example
* new remove operator
the remove operator works in a way similar to the delete operator, but does not call the destructor when operating on objects. It also returns the value removed.
For example:
my string $str = remove $hash.key;
This would remove "key" from $hash and return the value removed.
* new extract operator
The extract operator is identical to the "splice" operator, except the extract operator returns any values removed from the list or string operated on
* constants may be assigned with any expression that does not have side effects
this includes builtin functions that have been tagged as safe to use in constant expressions
* fixed the ',' operator's precedence in the parser
previously the comma operator's precedence was set far too high which caused problems in certain expressions, for example:
func(1, $a = 2, 3)
would previously be interpreted like this:
func(1, ($a = 2, 3))
contrary to what any reasonable programmer would expect. From this version on, the comma operator's precedence has been adjusted to be like other programming languages.
* fixed conversion of characters quoted with '\' in JSON strings
* changed output of printf format specifiers %n and %N
double quotes (") and '\' characters are now quoted with '\'
* new warning: non-existent-method-call
raised when a given method name cannot be found in the current class or base classes. such calls may be valid if the method itself is called from a derived class where the method exists
* new warning: invalid-operation
warns when an expression will produce a constant output due to type errors
* new warning: call-with-type-errors
warns when a variant tagged with RT_NOOP is resolved at parse time
* new warning: return-value-ignored
warns when a function or method that only returns a value and has no side effects has its return value ignored
* new warning: deprecated
warns when deprecated features are accessed
* new warning: excess-args
warns when excess arguments are passed to a variant that does not access the excess arguments
* new warning: duplicate-hash-key
warns when a duplicate hash key is given in an immediate literal hash
* default warning mask updated
the default warning mask includes: unknown-warning, unreachable-code, nonexistent-method-call, invalid-operation, call-with-type-errors, return-value-ignored, duplicate-hash-key
* new parse option PO_REQUIRE_TYPES (%require-types), command-line --require-types
if this option is given, then all parameters, return types, and object members must have a declared type
if no return type for functions and methods is explicitly declared when this option is set, then the return type is assumed to be NOTHING
this option also implies PO_STRICT_ARGS
* new parse option PO_STRICT_ARGS (%strict-args), command-line --strict-args
when this option is set, no variant tagged with RT_NOOP is accessible; any access to variants with this tag at parse-time or at runtime will result in an exception
Additionally, if excess arguments are sent to a function or method that does not access excess arguments, an exception is raised
* new parse option PO_NO_THREAD_INFO (%no-thread-info), command-line --no-thread-info, domain QDOM_THREAD_INFO
the following functions were tagged with QDOM_THREAD_INFO:
gettid(), num_threads(), thread_list(), get_thread_data(), get_all_thread_data(), getAllThreadCallStacks()
* new parse option PO_NO_EXTERNAL_INFO (%no-external-info), command-line --no-external-info, domain QDOM_EXTERNAL_INFO
the following functions were tagged with QDOM_EXTERNAL_INFO:
getuid(), geteuid(), getgid(), getegid(), getpid(), getppid(), gethostname(),
gethostbyname(), gethostbyaddr(), gethostbyname_long(), gethostbyaddr_long(),
getcwd(), getcwd2(), getpwuid(), getpwuid2(), getpwnam(), getpwnam2()
* new parse option PO_NO_LOCALE_CONTROL (%no-locale-control), command-line --no-locale-control, domain QDOM_LOCALE_CONTROL
the following functions were tagged with QDOM_LOCALE_CONTROL:
TimeZone::set()
* parseDatasource() function updated
parseDatasource() will now parse options at the end of a datasource string in curly brackets ('{' '}') such as the following:
oracle:user/pass@db(al32utf8)%localhost:1521{min=5,max=10}
Any option name can be placed there, whitespace is ignored; options must have the form <key>=<value>
Options are placed in a hash under the "options" key in the value returned from parseDatasource().
The example above would produce the following output:
hash: (8 members)
type : "oracle"
user : "user"
pass : "pass"
charset : "al32utf8"
db : "db"
host : "localhost"
port : 1521
options : hash: (2 members)
min : "5"
max : "10"
Only "min" and "max" options are now currently used - when the DatasourcePool(hash) constructor is used are these options respected if they are present in the hash.
* new Datasource constructor variant:
Datasource::constructor(hash)
expects a hash as produced by parseDatasource()
* new DatasourcePool constructor variant:
DatasourcePool::constructor(hash)
expects a hash as produced by parseDatasource()
* HTTP-CLIENT-RECEIVE-ERROR exception
now returns more information - the exception argument "arg" is a hash with the following keys:
code: the HTTP code received
body: the message body received
* HAVE_TIMEGM is always true
we no longer use the system function timegm(), so this option (and constant) is always true now
timegm() is now an alias for get_epoch_seconds()
* new constants
MACHINE_MSB: boolean, True if the machine is a big-endian machine, False if not
Z_DEFAULT_COMPRESSION: integer; the default compression level for zlib
* module blacklist
qt-core, qt-gui, qt-svn, and qt-opengl are all blacklisted because they were implemented with faulty namespace handling that does not work with qore 0.8.0+; use the 'qt4' module based on libsmoke instead; it's much more complete and supports types, etc
* COMPATIBILITY WARNING: HTTPClient::setSecure(bool $b = True)
before calling this method without an argument would turn off secure connections, which was counter-intuitive
* COMPATIBILITY WARNING: HTTPClient::setProxySecure(bool $b = True)
before calling this method without an argument would turn off secure connections, which was counter-intuitive
* COMPATIBILITY WARNING: HTTPClient::setNoDelay(bool $b = True)
before calling this method without an argument would turn off TCP_NODELAY, which was counter-intuitive
* COMPATIBILITY WARNING: Socket::setNoDelay(bool $b = True)
before calling this method without an argument would turn off TCP_NODELAY, which was counter-intuitive
* COMPATIBILITY WARNING: method return values updated
Datasource::open(), Datasource::close(), Datasource::commit(), Datasource::rollback(), DatasourcePool::commit(), DatasourcePool::rollback(), FtpClient::connect(), FtpClient::disconnect(), FtpClient::cwd(), FtpClient::get(), FtpClient::put(), FtpClient::del(), Socket::shutdownSSL()
no longer return any value. In previous versions they would return integer 0. However, they always throw an exception if there is an error, so any return value was meaningless.
*****************************
RELEASE NOTES for qore v0.7.8
*****************************
release summary: 19 bug fixes from 0.7.7 plus a single enhancement
* BUG FIX: fixed a bug processing arguments to in-object method calls in the
background operator
* BUG FIX: fixed a bug processing arguments to static method calls in the
background operator
* BUG FIX: fixed a bug where the File class would reset the encoding given in
the constructor on ::open*()
* BUG FIX: fixed a bug where if local variables were used in a reference
expression with the background operator, whenever the reference
was accessed in the called code a crash would result
* BUG FIX: eliminated string parsing in block comments, fixed a bug where the
parser was not terminated at EOF in a block comment
* BUG FIX: check for PO_NO_FILESYSTEM in FtpClient::put()
* BUG FIX: fixed a cosmetic bug in exception string in FtpClient::get()
* BUG FIX: fixed a bug in SSLCertificate::getSignature()
* BUG FIX: fixed a bug in SSLCertificate::getInfo()
* BUG FIX: fixed CANNOT-PROVIDE-FEATURE exception text
* BUG FIX: fixed getpwnam() to use q_getgrnam() and correct a thread and
functional error in QC_Dir.cc
* BUG FIX: fixed non-thread-safe usage of getpwnam() in QC_Dir.cc
* BUG FIX: fixed adding virtual private data to classes with multiple virtual
base classes
* BUG FIX: fixed Socket::recv() and Socket::recvBinary() when reading all data
available on the socket when the remote ends closes the connection
in an orderly way
* BUG FIX: fixed parsing negative numbers in json strings
* BUG FIX: fixed limited XML node size
* BUG FIX: fixed a memory bug in the context statement when an exception
occurs in the context expression
* BUG FIX: fixed a memory bug in the binary += operation; if the operand for
BinaryNode::append() is equal to the current buffer, a crash would
result
* BUG FIX: fixed some bugs processing arguments in the XmlReader class
* enhancement: added a QoreSocket::recvBinary() function to receive all data
available on the socket (with an optional initial timeout
value) and return it as a binary object; if
Socket::recvBinary() is called with buffer-size <= 0, then this
variant is used
*****************************
RELEASE NOTES for qore v0.7.7
*****************************
release summary: 15 bug fixes from 0.7.6
* BUG FIX: fixed a bug where taking a slice from an object could return
private members when called outside the class (backported from
trunk)
* BUG FIX: fixed a bug making a hash slice where the character encoding was
not ensured to be QCS_DEFAULT before trying to match key names
(backported from trunk)
* BUG FIX: fixed a bug returning the last builtin data type ID; affects qore
modules that implement new builtin types (ex qt module, qt4 module)
* BUG FIX: fixed a reference counting bug in callObjectMethodArgs() that could
lead to a crash if a list is passed as the 3rd argument
* BUG FIX: fixed a bug executing builtin functions if an exception is raised
when evaluating the arguments (the function was erroneously
executed)
* BUG FIX: fixed a bug in the FtpClient class that caused the connection to
never get established
* BUG FIX: fixed a bug when a builtin class tries to access private data of an
object that's already been deleted; now an appropriate exception is
thrown; previously it would silently fail
* BUG FIX: fixed examples/WSDL.qc de/serializing "int" and "short" from
negative numbers
* BUG FIX: removed an extraneous reference and dereference in objects when
launching new threads in objects (slightly better performance
launching new threads in objects)
* BUG FIX: fixed a rare race condition in object constructors when an object
launches threads in the object and then the constructor throws an
exception afterwards
* BUG FIX: fixed handling in the Datasource and DatasourcePool classes when
auto-reconnects fail (connection aborted handling) - now the
Datasource class tags the connection as aborted and closes the
connection when Datasource::connectionAborted() is called by the
DBI drivers, and the DatasourcePool class correctly returns the
Datasource to the pool. Additionally, the Datasource class will
not execute any action on the Datasource once the connection has
been aborted. The flag is cleared when the connection is opened
again.
* BUG FIX: fixed memory leaks in parse exceptions with static method call
references (backported from 0.8.0/trunk)
* BUG FIX: detected erroneous variable list declarations like:
our (my $x, ...) or my (our $x) and throw a parse exception
(backported from 0.8.0/trunk)
* BUG FIX: fixed a harmless bug in TempEncodingHelper to remove a message from
valgrind (backported from 0.8.0/trunk)
* BUG FIX: fixed memory bug in CryptoHelper - removed unnecessary and incorrect
string termination code (backported from 0.8.0/trunk)
*****************************
RELEASE NOTES for qore v0.7.6
*****************************
release summary: 34 bug fixes and major new features over 0.7.5
*) BUG FIX: updated is_writable() and is_readable() to always return True if
called by effective UID 0 (root)
*) BUG FIX: fixed a race condition in deleting objects by marking objects
atomically as inside destructor
*) BUG FIX: updated sleep() to continue sleeping for the remaining time if
interrupted by a signal
*) BUG FIX: changed decompression routines to a string to preserve binary
data, especially trailing nulls
*) BUG FIX: fixed C++ QoreString constructor when taking ownership of a string
buffer to ensure that the buffer is null terminated when the
allocated buffer is exactly equal to the string length
*) BUG FIX: fixed scanner to ignore quoted text in comments (i.e. "*/" will be
ignored)
*) BUG FIX: updated the Socket class implementation to retry connect(),
accept(), recv(), send(), and select() (Socket::isDataAvailable(),
Socket::connect() with timeout, etc) if interrupted by a signal
*) BUG FIX: updated the File class implementation to retry read(), write() and
fcntl() with F_SETLKW (File::lockBlocking()) if interrupted by a
signal
*) BUG FIX: fixed set_signal_handler() to accept a closure as per the
documentation
*) BUG FIX: fixed internal C++ library function test_funcref_param() to return
a value for call references and closures
*) BUG FIX: fixed broken access to private members of an object outside the
class; before it was possible to delete and reassign private
members from outside the class which should have been illegal
*) BUG FIX: fixed a crashing bug in the File::open2() method
*) BUG FIX: fixed class method registration so that static method names and
non-static method names have independent namespaces (i.e. a static
method may now have the same name as a non-static method). Static
methods may still be called with normaly method call syntax,
however if there is a non-static method with the same name, then it
will be called instead.
*) BUG FIX: when an HTTP header is received more than once, return all values
as a list under the header name in the resulting hash
*) BUG FIX: fixed a potential race condition that could cause a crash in very
rare circumstances in internal C++ QoreClass::numMethods() and
QoreClass::numStaticMethod() functions; to make a crash a program
would have to be running and parsing new code into the program in
a separate thread as well; this is explicitly supported by Qore,
but very rarely done
*) BUG FIX: fixed an XML-RPC parsing bug caused by a side-effect in a
debugging statement