critcl_changes(n)
π critcl_changes β CriTcl Releases & Changes π
Welcome to the CriTcl glow-up page, bestie. This is critcl_changes(n) from the C Runtime In Tcl (CriTcl) manual, and it's literally the whole receipts folder of every release β newest tea at the top, all the way back to the project's first breath. π
β¨ NAME β¨
critcl_changes β CriTcl Releases & Changes. That's it, that's the name, we move.
π DESCRIPTION π
Be welcome to the C Runtime In Tcl (short: CriTcl), a whole entire system for embedding and using C code from inside your Tcl scripts over at [http://core.tcl-lang.org/tcl](http://core.tcl-lang.org/tcl). no cap, it's iconic.
Adding C code to Tcl [http://core.tcl-lang.org/tcl](http://core.tcl-lang.org/tcl)/Tk [http://core.tcl-lang.org/tk](http://core.tcl-lang.org/tk) has never been easier. fr fr.
Improve performance by rewriting the performance bottlenecks in C. π
Import the functionality of shared libraries into Tcl scripts. See the changes done in each release of CriTcl, from the latest at the top to the beginning of the project.
The latest changes are found at the top. (Yes, reverse-chronological, like a timeline. main character energy.)
πΈ CHANGES FOR VERSION 3.3.1 πΈ
- Oops. Added refresh of tcl 8.6, 8.7 headers which was left behind. π (a little leftover, we caught it tho)
- Oops. Fixed mismatch of package directories computed by
installvsuninstall. π«Ά
π¦ CHANGES FOR VERSION 3.3 π¦
- As announced with 3.2:
- Removed support for Tcl 8.4 and 8.5. bye bestie π
- Removed support for the argument types
int*,float*,double*,bytearray,rawchar, andrawchar*.
- Modified packages to accept operation under Tcl 9. Bumped package versions appropriately. Bumped copyrights.
The How To Adapt Critcl Packages for Tcl 9 contains the details relevant to writers of CriTcl-based packages. iykyk π
- Set different minimum Tcl requirements for the 8.x and 9.x series.
If no minimum is declared the minimum depends on the Tcl version used to run the critcl package or application.
When running under Tcl 9 the default minimum is version 9. For anything else the new default minimum is 8.6.
Reminder: Support for Tcl 8.4 and 8.5 was removed. β οΈ
- Made
~-handling portable across the 8.x and 9 boundary (viaHOMEenvironment variable). - Bumped embedded
tclconfigto version 2.67. Patch supplied by Paul Obermeier. π«‘ - Bug Fix #127 [https://github.com/andreas-kupries/critcl/issues/127](https://github.com/andreas-kupries/critcl/issues/127)
- Bug Fix #128 [https://github.com/andreas-kupries/critcl/issues/128](https://github.com/andreas-kupries/critcl/issues/128)
- Bug Fix #129 [https://github.com/andreas-kupries/critcl/issues/129](https://github.com/andreas-kupries/critcl/issues/129) Fixed various typos in the documentation. π
- Reworked internals of
critcl::cutil's tracer to support operation in a multi-threaded environment. This new mode is also default. The old single-threaded mode can be (re)activated by definingCRITCL_TRACE_NOTHREADS.
Package bumped to version 0.4.
- Reworked the installer to add
tclXmarkers to the installation directories of the C-based support packages (critcl::callback,critcl::md5c), where X is the major version number of thetclshwhich rancritcl. - In other words, one of
tcl8ortcl9. π - Broke lingering dependencies on the Tcllib packages
cmdlineandfileutil.
There are no circularities between Critcl and Tcllib any longer, simplifying installation. ate and left no crumbs π₯
β CHANGES FOR VERSION 3.2 β
- BREAKING CriTcl now requires Tcl 8.6 to be run.
It also generates Tcl 8.6 extensions by default.
It is still possible to generates extensions for Tcl 8.4 and 8.5, properly setting it via critcl::tcl.
ATTENTION It is planned to completely remove 8.4 and 8.5 support with CriTcl 3.3. No date has been set for that release yet.
All utility packages have their versions and requirements bumped accordingly as well.
- BREAKING Bug Fix Issue #115 [https://github.com/andreas-kupries/critcl/issues/115](https://github.com/andreas-kupries/critcl/issues/115).
Distributions using build.tcl for installation of critcl in their packaging scripts have to be updated to the changed command signature of build.tcl install, etc. See the details below.
Redone the argument handling for install, uninstall, and targets. The destination argument is gone. All commands now take options similar to what is known from GNU configure, i.e.
--prefix path
--exec-prefix path
--bin-dir path
--lib-dir path
--include-dir path
They now also respect the environment variable DESTDIR, and the associated option --dest-dir.
The --prefix defaults to the topdir from the bin directory holding the tclsh running build.tcl. As Tcl command:
file dirname [file dirname [info nameofexecutable]]
Added a command dirs doing the same argument handling, for debugging. π
- Removed the irrelevant packages
autoscroll,cmdline,dict84,lassign84,lmap84,snit,snitbutton, andwikit. gone, not invited to the group chat π - Documentation Redo Issue #116 [https://github.com/andreas-kupries/critcl/issues/116](https://github.com/andreas-kupries/critcl/issues/116). Reworked the documentation to use the system of 4 quadrants. Reworked the introduction (How To Use Critcl) to be strongly based on a series of examples.
- Bug Fix Issue #125 [https://github.com/andreas-kupries/critcl/issues/125](https://github.com/andreas-kupries/critcl/issues/125). Added missing method
createin object creation example of installer documentation. - Feature. Extended
cprocargument type processing. Now able to auto-create restricted scalar types. I.e. types derived fromint, etc. and limited in the range of allowed values.
Further able to auto-create restricted list types, i.e. types derived from list and either limited in length, or in the type of the elements, or both. β¨
- Bug Fix / Enhancement Issue #118 [https://github.com/andreas-kupries/critcl/issues/118](https://github.com/andreas-kupries/critcl/issues/118). Modified
critcl::cprocto accept C syntax for arguments, i.e. Trailing comma on argument names, leading comma on type names, and lone comma characters. π - Performance Fix for compile & run mode. Issue #112 [https://github.com/andreas-kupries/critcl/issues/112](https://github.com/andreas-kupries/critcl/issues/112).
Moved the command activating more precise code location tracking out of package critcl into package critcl::app.
Because generating packages ahead of time can bear the performance penalty invoked by this global setting.
Arbitrary libraries and applications using critcl dynamically (compile & run) on the other hand likely cannot, and should not. π
- Fix Issue #109 [https://github.com/andreas-kupries/critcl/issues/109](https://github.com/andreas-kupries/critcl/issues/109). Ignore
clangsuffices when computing the target identifier from a configuration identifier. - Feature. Bumped package
critcl::cutilto version0.2.1. Simplified the implementation of macroASSERTby taking the underlyingTcl_Panic'sprintfability into account and added a new macroASSERT_VAexporting the same ability to the user. π«Ά
π CHANGES FOR VERSION 3.1.18.1 π
- Attention: While the overall version (of the bundle) moves to
3.1.18.1the versions of packagescritclandcritcl::appare unchanged. (yes the bundle and the babies got different version numbers, keep up π«Ά) - Bugfix Generally removed a number of 8.5-isms which slipped into
3.1.18, breaking ability to use it with Tcl 8.4. - Bugfix Corrected broken
build.tcl uninstall. - Bugfix Package
critcl::classbumped to version1.1.1. Fixed partial template substitution breaking compilation of the generated code. π
β¨ CHANGES FOR VERSION 3.1.18 β¨
- [1] Feature (Developer support). Merged pull request
#96fromsebres/main-direct-invoke. This enables direct invokation of the"main.tcl"file for starkits from within a dev checkout, i.e. outside of a starkit, or starpack. slay for dev workflow π - [2] Feature. Added channel types to the set of builtin argument and result types. The argument types are for simple channel access, access requiring unshared channels, and taking the channel fully into the C level, away from Tcl. The result type comes in variants for newly created channels, known channels, and to return taken channels back to Tcl. The first will register the returned value in the interpreter, the second assumes that it already is. channel lore, but make it C π¦
- [3] Bugfix. Issue
#96. Reworked the documentation around the argument typeTcl_Interp*to make its special status more visible, explain uses, and call it out from result types where its use will be necessary or at least useful. documentation glow-up, fr β¨ - [4] Feature. Package
critcl::classbumped to version1.1. Extended with the ability to create a C API for classes, and the ability to disable the generation of the Tcl API. class upgrade era π - [5] Bugfix. Merged pull request
#99frompooryorick/master. Fixes to the target directory calculations done by the install code. install code said βwhere?β and now it knows π - [6] Merged pull request
#94fromandreas-kupries/documentation. A larger documentation cleanup. The main work was done bypooryorick, followed by tweaks done by myself. team effort, iconic π - [7] Extended the test suite with lots of cases based on the examples for the various generator packages. IOW the new test cases replicate/encapsulate the examples and demonstrate that the packages used by the examples generate working code. tests ate, no cap π₯
- [8] Bugfix. Issue
#95. Changed the fieldcritcl_bytes.stounsigned char*to match Tcl's type. Further constified the field to make clear that read-only usage is the common case for it. const-correct bestie behavior π - [9] Bugfix/Feature. Package
critcl::cutilbumped to version0.2. Fixed missing inclusion of header"string.h"in"critcl_alloc.h", needed formemcpyin macroSTREP. Added macrosALLOC_PLUSandSTRDUP. Moved documentation ofSTREP...macros into proper place (alloc section, not assert). headers found their home π§ - [10] Merged pull request
#83fromapnadkarni/vc-fixes. Removed deprecated-Gsfor MSVC builds, and other Windows fixups. Windows glow-up, periodt πͺ - [11] Feature. Package
critcl::iassocbumped to version1.1. Refactored internals to generate an include header for use by.cfiles. This now matches what other generator packages do. The template file is inlined and removed. consistency is the vibe π - [12] Merged pull request
#82fromgahr/home-symlink. Modified tests to handle possibility of$HOMEa symlink. symlink-aware testing, we love to see it π«Ά - [13] Merged pull request
#81fromgahr/test-not-installed. Modified test support to find uninstalled critcl packages when running tests. Handles all butcritcl::md5. almost everyone invited to the test party π - [14] Merged pull request
#85fromsnoe925/issue-84to fix Issue#84breaking installation on OSX. OSX install fix, thank u π - [15] Merged pull request
#87fromapnadkarni/tea-fixesto fix Issue#86, broken-teaoption, generating an incomplete package.-teagot rescued β - [16] Feature. New package
critcl::callbackproviding C-level functions and data structures to manage callbacks from C to Tcl. callbacks but make it managed π₯ - [17] Feature. Package
critcl::literalsbumped to version1.3. Added mode+listenabling the conversion of multiple literals into a list of their strings. literal list slay β¨ - [18] Feature. Package
critcl::enumbumped to version1.1. Added basic mode handling, supportingtcl(default) and+list(extension enabling the conversion of multiple enum values into a list of their strings). enum modes unlocked π - [19] Feature. Package
critcl::emapbumped to version1.2. Extended existing mode handling with+listextension enabling the conversion of multiple emap values into a list of their strings. emap +list era π - [20] Feature. Extended the set of available types by applying a few range restrictions to the scalar types (
int,long,wideint,double,float).
Example: int > 0 is now a viable type name.
This is actually more limited than the description might let you believe.
See the package reference for the details. range restrictions, but read the docs bestie π
π¦ CHANGES FOR VERSION 3.1.17 π¦
- [1] Extension: Allow duplicate arg- and result-type definitions if they are fully identical. same same = fine π
- [2] Bugfix. The application mishandled the possibility of identical-named
critcl::tsources. Possible becausecritcl::tsourcescan be in subdirectories, a structure which is not retained in the assembled package, causing such files to overwrite each other and at least one lost. Fixed by adding a serial number to the file names in the assembled package. file-name collision crisis: solved π - [3] Bugfix in the static scanner which made it loose requirement information. Further added code to generally cleanup results at the end (removal of duplicates, mainly). scanner cleanup arc π§Ή
- [4] Bugfix: Fixed issue
#76. Support installation directories which are not in theauto_path. Without the patch the installed critcl will not find its own packages and fail. Thank you to Simon Bachmannhttps://github.com/lupyluckefor the report and patch, and then his patience with me to getting to actually apply it. patience is a love language π«Ά - [5] Bugfix: Fixed issue
#75. Extendedcritcl::includeto now take multiple paths. more paths, more power β¨ - [6] Added new compatibility package
lmap84. compatibility queen π - [7] Fixed typos in various documentation files. typo cleanup era π
- [8] Fixed bug introduced by commit
86f415dd30(3.1.16 release). The separation ofcritcl::ccodeinto user and work layers means that location retrieval has to go one more level up to find the user location. one more level up, iykyk π¦ - [9] New supporting package
critcl::cutil. Provides common C level facilities useful to packages (assertions, tracing, memory allocation shorthands). cutil has entered the chat π - [10] Modified package
critclto make use of the new tracing facilities to provide tracing of arguments and results forcritcl::ccommandandcritcl::cprocinvokations. trace it, bestie π₯ - [11] Modified packages
critclandcritcl::classto provide better function names for (class) method tracing. Bumped packagecritcl::classto version1.0.7. better names = better vibes β¨ - [12] Extended the support package
critcl::literalswith limited configurability. It is now able to generate code for C-level access to the pool without Tcl types (Modec). The previously existing functionality is accesssible under modetcl, which also is the default. Both modes can be used together. literals got modes π - [13] Extended the support package
critcl::emapwith limited configurability. It is now able to generate code for C-level access to the mapping without Tcl types (Modec). The previously existing functionality is accessible under modetcl, which also is the default. Both modes can be used together. emap got modes too π
π CHANGES FOR VERSION 3.1.16 π
- [1] New feature. Extended
critcl::cproc's argument handling to allow arbitrary mixing of required and optional arguments. mix and match, periodt π - [2] New feature. Potential Incompatibility. Extended
critcl::cproc's argument handling to treat an argumentargsas variadic if it is the last argument of the procedure. read that twice, bestie β οΈ - [3] New feature. Added two introspection commands,
critcl::has-argtypeandcritcl::has-resulttype. These enable a user to test if a specific (named) type conversion is implemented or not. type existence check, slay π - [4] Added new result type
Tcl_Obj*0, with aliasobject0. The difference toTcl_Obj*is in the reference counting. refcount lore π§ - [5] Extended the command
critcl::argtypesupportwith new optional argument through which to explicitly specify the identifier for guarding against multiple definitions. guard that definition π‘οΈ - [6] Bugfix: Fixed problem with the implementation of issue
#54(See 3.1.14). Always create the secondary log file. Otherwise end-of-log handling may break, unconditionally assuming its existence. log file must exist, no exceptions π - [7] Bugfix: Fixed problem with the internal change to the hook
HandleDeclAfterBuild. Corrected the forgottencritcl::cconst. hook got its fix π§ - [8] Debugging aid: Added comment holding the name of the result type when emitting result conversions. future you says thanks π
- [9] Bugfix: Fixed issue
#60. Unbundled the package directories containing multiple packages. All directories under"lib/"now contain exactly one package. one package per directory, iconic π - [10] Bugfix: Fixed issue
#62. A fewdict existscommands operating on a fixed string instead of a variable. variable vs string, classic π¦ - [11] Bugfix: Fixed issue
#56. Release builders are reminded to run the tests. run the tests, bestie, fr fr β - [12] Bugfix: Fixed issue
#55. For FreeBSD critcl's platform package now identifies the Kernel ABI version. Initialization of the cache directory now also usesplatform::identifyfor the default path, instead ofplatform::generic. FreeBSD got specific π₯ - [13] Bugfix: Fixed issue
#58. Simplified the setup and use ofmd5. CriTcl now makes use of its own package formd5, using itself to built it. There is no chicken/egg problem with this as the-pkgmode used for this does not usemd5. That is limited to mode compile & run. md5 bootstrap but make it chill π₯
π CHANGES FOR VERSION 3.1.15 π
- [1] Fixed version number bogosity with
3.1.14. number nonsense: corrected π
πΈ CHANGES FOR VERSION 3.1.14 πΈ
- Fixed issue #36, bestie!! π Added a message to the
alltarget of theMakefilegenerated for TEA mode. Also tweaked other parts of the output so it's less noisy β like, the terminal was screaming and now it's just vibing. - Accepted the request implied in issue #54 β¨. We now unconditionally save the compiler/linker build log into the key
logof the dictionary returned bycresults, and we also save a copy of only the execution output in the brand new keyexl("execution log"). Two logs, two moods, both slaying. - Fixed issue #53 π
. Clarified the documentation of the commands
critcl::loadandcritcl::failedwith regard to their results and the throwing of errors (spoiler: it does not happen). Like, don't expect an error, okay? It's not giving that. - Fixed issue #48. Modified mode "compile & run" so it now allows new declarations in a file after it was built, instead of erroring out π. The new decls get built when they're actually needed β main character energy, arriving precisely on time. Mode "precompile" is unchanged and will continue to trap the situation. No notes.
- Fixed issue #52. Updated the local Tcl/Tk headers to
8.4.20,8.5.13, and8.6.4. Fresh headers, fresh me π¦. - Fixed issue #45. New feature, new command:
critcl::cconstπ. Obsessed. critcl::util: new commandlocateto find a file across a set of paths, and report an error when it's not found π₯. This is for use in autoconf-like header-searches and similar configuration tests. It's giving "where is she" but, like, productive.- Modified
'AbortWhenCalledAfterBuild'to dump the entire stack (info frame!). This should make it way easier to determine the location of the troubling declaration π. No more playing detective with zero clues.
π¦ CHANGES FOR VERSION 3.1.13 π¦
- Merged PR #43. Fixed a bug loading adjunct Tcl sources π«Ά.
- Fixes in the documentation and generated code of package
"critcl::enum". Bumped to version1.0.1β. - Fixes in the documentation of package
"critcl::bitmap"β¨. - New package
"critcl::emap"π. In essence a variant or cross of"critcl::bitmap"with behaviour like"critcl::enum". It's giving hybrid, it's giving crossover episode. - Merged PR #49. Fixed a documentation typo π .
- Merged PR #46. Fixed a documentation typo π (yes, another one, we love a consistent cleanup arc).
- Merged PR #47. Fixes to test results to match the accumulated code changes. Also made portable across Tcl versions (varying error syntax) β because every Tcl version has its own little dialect and we respect all of them, fr fr.
- New predefined argument- and result-type
"wideint"mapping toTcl_WideIntπ. - New predefined argument-type
"bytes"mapping to a tuple of byte-array data and length π. Note: the existing"bytearray"type (and its aliases) was left untouched, to keep backward compatibility. We do not touch the classics. - Modified the internal interface between the Tcl shim and the C function underneath
"critcl::cproc"with respect to the handling of optional arguments. An optional argument"X"now induces the use of two C arguments,"X"and"has_X"π. The new argument"has_X"is of boolean (int) type. It is set to true whenXis set, and set to false whenXhas the default value. So C code that cares about knowing if the argument is default or not can now check that quickly, without having to code the default value inside. NOTE: this change is visible in the output of the advanced commands"argcnames","argcsignature","argvardecls", and"argconversion"β so if those look different, that's why, don't panic π. - Fixed issue #50 and documented the availability of the variable
"interp"(typeTcl_Interp*) within"critcl::cinit"C code fragments π. Note that while the old, undocumented name of the variable,"ip", is still usable, it is deprecated β οΈ. It will be fully removed in two releases, i.e. for release3.1.15. The variable name was changed to be consistent with other code environments. Ripip, you had a good run. - Fixed issue #51. Disabled the generation of
#linedirectives for"critcl::config lines 0"coming from template files, or code generated with them before the final value of this setting was known π. - Fixed an issue with the handling of namespaced package names in
"critcl::iassoc"π. Equivalent to a bug in"critcl::class"fixed for critcl3.1.1, critcl::class1.0.1. Note:"literals","enum","emap", and"bitmap"do not require a fix as they are all built on top of"iassoc"β they get the glow-up for free, iykyk.
β¨ CHANGES FOR VERSION 3.1.12 β¨
- Fixed issue
42. Clear::errorInfoimmediately after startup to prevent leakage of irrelevant (caught) errors into our script and confusing the usage code π§Ή. Clean slate, clean vibes. - Fixed issue
40. Keep the order of libraries, and allow duplicates π«Ά. Both are things which are occasionally required for proper linking. Sometimes you really do need the same library twice, and that's valid. - Extended the utility package
critcl::literalsto declare acprocresult-type for a pool π.
Further fixed the generated header to handle multiple inclusion.
Bumped version to 1.1.
- Fixed an issue with utility package
critcl::bitmapπΈ.
Fixed the generated header to handle multiple inclusion.
Bumped version to 1.0.1.
- Created new utility package
critcl::enumfor the quick and easy setup and use of mappings between C values and Tcl strings π. Built on top ofcritcl::literals. - Added examples demonstrating the use of the utility packages
critcl::literals,critcl::bitmap, andcritcl::enumπ. Examples!! Because reading docs is one thing and seeing it work is another, fr.
π CHANGES FOR VERSION 3.1.11 π
- Fixed issue #37, via pull request #38, with thanks to Jos DeCoster π«Ά. Information was stored into the
v::delprocandv::clientdataarrays using a different key than when retrieving the same information, thus failing the latter. Like, you put your keys in one pocket and then searched the other pocket. We've all been there π. - New convenience command
critcl::includefor easy inclusion of headers and other C files β¨. - New command
critcl::maketo generate a local header of other C files for use by other parts of a package through inclusion π. - New utility package
critcl::literalsfor quick and easy setup of and access to pools of fixedTcl_Obj*strings π. Built on top ofcritcl::iassoc. - New utility package
critcl::bitmapfor quick and easy setup and use of mappings between C bitsets and Tcl lists whose string elements represent that set π₯. Built on top ofcritcl::iassoc.
π CHANGES FOR VERSION 3.1.10 π
- Fixed code version numbering forgotten with
3.1.9π. It happens to the best of us. - Fixed issue #35. In package mode (
-pkg) the object cache directory is unique to the process, thus we do not need content-hashing to generate unique file names πΈ. A simple counter is sufficient and much faster. Efficiency slay.
Note that mode "compile & run" is not as blessed and still uses content-hasing with md5 to ensure unique file names in its per-user object cache. Different mode, different coping mechanism.
- Fixed an issue where the
ccommandforgot to use its body as input for the UUID generation π. Thus ignoring changes to it in mode compile & run, and not rebuilding a library for changed sources. Bug and fix reported by Peter Spjuth π«Ά. Bestie really said "you forgot the whole point" and was right.
π CHANGES FOR VERSION 3.1.9 π
- Fixed issue #27. Added missing platform definitions for various alternate linux and OS X targets π.
- Fixed issue #28. Added missing
-mXXflags for linking at thelinux-{32,64}-*targets π₯. - Fixed issue #29. Replaced the use of raw
"cheaders"information in the processing of"cdefines"with the proper include directives derived from it β¨. - Fixed the issue behind rejected pull request #30 by Andrew Shadura π«Ά. Dynamically extract the stubs variable declarations from the Tcl header files and generate matching variable definitions for use in the package code. The generated code will now always be consistent with the headers, even when critcl's own copy of them is replaced by system headers π. Consistency is the whole vibe.
- Fixed issue #31. Accepted a patch by Andrew Shadura, with changes (comments), for easier integration of critcl with OS package systems, replacing critcl's copies of Tcl headers with their own π .
- Fixed issue #32. Merged pull request by Andrew Shadura. Various typos in documentation and comments π.
- Fixed issue #34. Handle files starting with a dot better π. Dotfiles deserve respect too.
π CHANGES FOR VERSION 3.1.8 π
- Fixed an issue with package indices generated for Tcl
8.4π. Join the list of commands with a semi-colon, not a newline. Tiny punctuation, huge difference. - Fixed issue #26, which brought up use-cases I had forgotten to consider while fixing bug #21 (see critcl
3.1.6) π« . Growth.
β CHANGES FOR VERSION 3.1.7 β
- Fixed issue #24. Extract and unconditionally display compiler warnings found in the build log π₯. Prevents users from missing warnings which, while not causing the build to fail, may still indicate problems. Like, it's not a crash but it is a red flag, and you need to see it.
- New feature. Output hook π. All non-messaging user output is now routed through the command
critcl::print, and users are allowed to override it when using the critcl application-as-package. Customize your output, main character style. - New feature, by Ashok P. Nadkarni π. Platform configurations can inherit values from configurations defined before them. Generational wealth, but for config values.
π§ CHANGES FOR VERSION 3.1.6 π§
- Fixed issue #21. While the multi-definition of the stub-table pointer variables was ok with for all the C linkers seen so far, C++ linkers did not like this at all π. Reworked the code to ensure that this set of variables is generated only once, in the wrapper around all the pieces to assemble. C++ said "absolutely not" and we listened.
- Fixed issue #22, the handling of the command identifier arguments of
critcl::ccommand,critcl::cproc, andcritcl::cdataπ«Ά. We now properly allow any Tcl identifier and generate proper internal C identifiers from them.
As part of this the signature of command critcl::name2c changed β¨. The command now delivers a list of four values instead of three. The new value was added at the end.
Further adapted the implementation of package critcl::class, a user of critcl::name2c. This package is now at version 1.0.6 and requires critcl 3.1.6.
Lastly fixed the mis-handling of option -cname in critcl::ccommand, and critcl::cproc π
.
- Fixed issue #23.
π CHANGES FOR VERSION 3.1.5 π
- Fixed issue #19. Made the regular expression extracting the MSVC version number more general to make it work on german language systems π. This may have to be revisited in the future, for other Windows locales. Multilingual queen behavior.
- Fixed issue #20. Made option
-teawork on windows, at least in a unix emulation environment likemsys/mingwπ«Ά. It's a start!
πΈ CHANGES FOR VERSION 3.1.4 πΈ
- Bugfix in package
critcl::class. Generate a dummy field in the class structure if the class has no class variables π. Without this change the structure would be empty, and a number of compilers are not able to handle such a type. An empty struct was simply too powerful for them. - Fixed a typo which broke the
win64configuration π. One typo. One entire platform. Iconic in a tragic way. - Fixed issue #16, a typo in the documentation of command
critcl::classπ.
π¦ CHANGES FOR VERSION 3.1.3 π¦
- Enhancement. Bestie, here's the tea in detail:
- Added a whole new argument type called
"pstring"β that's short for "Pascal String", a counted string, meaning it's literally a combo of a string pointer and a string length. Iconic. π - Added two new methods,
critcl::argtypesupportand::critcl::argsupport, so you can define and use extra supporting code for an argument type. The"pstring"above is the one using it, to define the structure it needs. π«Ά - Semi-bugfixes in the packages
critcl::classandcritcl::iassoc. Added pragmas for the AS meta data scanner to make sure the template files actually get made part of the package. Versions bumped to1.0.4and1.0.1respectively. β¨
πΈ CHANGES FOR VERSION 3.1.2 πΈ
- Enhancement. In detail, bestie:
- Extended
critcl::cprocso it can handle optional arguments β in a limited way, no cap. And this is automatically available tocritcl::classcproc-based methods too. Slay. π₯ - Bugfix in the
lassignemulation for Tcl 8.4. Unused variables now get properly set to the empty string. Bumped the version of the emulation packagelassign84to1.0.1. π
π CHANGES FOR VERSION 3.1.1 π
- Bugfixes all around. In detail:
- Fixed the generation of those
wrong#argserrors forcritcl::cprocand derived code (that'scritcl::classcproc-based methods, iykyk). UseNULLif there are no arguments, and take the offset into account. π - Fixed how
critcl::classhandles package names β we forgot they can contain namespace separators, oops π. Bumped to version1.0.1. - Extended an error message generated by
critcl::classduring instance creation, so it's clearer. Bumped to version1.0.2. π
π CHANGES FOR VERSION 3.1 π
- Added a brand new higher-level package,
critcl::iassoc. β¨
This package simplifies creating code that associates data with an interpreter through Tcl's Tcl_(Get|Set)AssocData() APIs. You get to concentrate on your data while all the necessary boilerplate C code to support it is generated by the package. Main character energy fr fr.
This package uses several of the new features added to the core critcl package β see below π
- Added the higher-level package
critcl::class. π
This package simplifies creating C level objects with class and instance commands. You write a class definition with class- and instance-variables and -methods, similar to a TclOO class, and all the necessary boilerplate C code to support it gets generated by the package.
This package also uses several of the new features added to the core critcl package β see below.
- Extended the API for handling TEApot metadata. Added the command
critcl::meta?to query the stored information. Main use currently envisioned is retrieval of the current package's name by utility commands, for use in constructed names. That particular info is always available thanks to the static scan of the package file on execution of the first critcl command. π
The new packages critcl::iassoc and critcl::class (see above) are users of this command.
- Extended the API with a command,
critcl::name2c, which exposes the process of converting a Tcl name into base name, namespace, and C namespace. This lets higher-level code generators generate the same type of C identifiers as critcl itself does. π¦
The new package critcl::class (see above) is a user of this command.
- Extended the API with a command,
critcl::source, which executes critcl commands found in a separate file in the context of the current file. This makes managing larger bodies of code easier, since you can split them up into easier-to-digest smaller chunks without causing the generation of multiple packages. π - Related to the previous item: extended the API with commands to divert collection of generated C code into memory. This makes it easier to use the commands for embedded C code inside higher-level code generators. π§
See the section Advanced: Diversions for the details of the provided commands.
The new package critcl::class (see above) is a user of these facilities.
- Extended the API with commands that help developers generate proper C
#linedirectives. This lets higher-level code generators generate and insert their own directives, ensuring compile errors in their code get properly attributed. π
See the section Advanced: Location management for the details of the provided commands.
The new packages critcl::iassoc and critcl::class (see above) are users of these facilities.
- Extended the API with commands giving you the ability to define custom argument and result types for
::critcl::cproc. β
See the section CriTcl cproc Type Reference for the details of the provided commands.
π₯ CHANGES FOR VERSION 3.0.7 π₯
- Fixed the code generated by
critcl::c++command. The emitted code was handing a non-static string table toTcl_GetIndexFromObj, which violates the contract β that table needs a fixed address. That was literally a memory smash waiting to happen π. Thanks to Brian Griffin for alerting us to the general problem. π«Ά
β CHANGES FOR VERSION 3.0.6 β
- Fixed github issue 10. The critcl application now delivers a proper exit code (
1) on build failure, instead of always indicating success (status0). No more lying about it π - Fixed github issue 13. Handling of
bufferoverflowU.libfor release builds was inconsistent with the handling for debug builds. It's now identically handled (conditional) by both cases. β¨ - Documentation cleanup, mainly in the installation guide and the
README.mdthat github shows. π
π¦ CHANGES FOR VERSION 3.0.5 π¦
- Fixed a bug in the new code for
#linepragmas, triggered when specifying C code without leading whitespace. π - Extended the documentation so there are now manpages for the license, source retrieval, installer, and developer's guides. Obsessed. π
π CHANGES FOR VERSION 3.0.4 π
- Fixed generation of the package's
initnamewhen the incoming code is read fromstdinand has no proper path. π - Fixed github issue 11. Now using
/LIBPATHinstead of-Lon Windows (thelibincludeconfiguration setting). - Extended critcl to handle the
-l:pathformat of-loptions. GNU ld2.22+handles this by searching for the path as-is β which is good when you're specifying static libraries, since plain-llooks for shared libraries in preference over static ones. critcl handles it now, because older GNU ld's don't understand it, and neither do the various vendor-specific linkers. π₯ - Fixed github issue #12. CriTcl now determines the version of MSVC in use and uses that to switch between the various link debug options. Also simplified the handling of
bufferoverflowU.lib, making use of the same mechanism and collapsing the two configuration sections we had back into one. Slay. β¨ - Reworked how
#linepragmas get inserted into the generated C code, to avoid the limitations various compilers impose on the line number argument, and to be more accurate. π - Modified argument processing. Option
-libdirnow also implies-Lfor its argument. π - Extended handling of option
-show(critcl::showconfig) to list the path of the configuration file the data is coming from. Good for debugging configuration processing. π«Ά - Extended the build script with targets to regenerate the embedded documentation and diagrams, and to generate a release. πΈ
π CHANGES FOR VERSION 3.0.3 π
- Fixed github issues 5 and 8, for the example
build.tclscripts. Working around a missing variable::errorInfo. It should always be present, but apparently there are revisions of Tcl around that violate this assumption π
π CHANGES FOR VERSION 3.0.2 π
- Fixed an issue in compile-and-run mode where commands put into the
auto_indexaren't found by Tcl's[unknown]command. π - Fixed an array key mismatch that was breaking usage of client data and delete function for procedure. Reported by Jos DeCoster, with patch β king behavior fr fr π
- Implemented a command line option
-L, the equivalent of option-I, just for library search paths. β¨ - Fixed github issues 5 and 8. Working around a missing variable
::errorInfo. It should always be present, but there seem to be revisions of Tcl around which violate this assumption. π
π§ CHANGES FOR VERSION 3.0.1 π§
- Bugfixes all around. In detail:
- Fixed recording of Tcl version requirements. Keep package name and version together, unbreaking the generated meta data and the generated package load command. π
- Fixed the build scripts: when installing, or wrapping for TEA, generate any missing directories. π
- Modified the build scripts to properly exit the application when the window of their GUI is closed through the (X) button. π
- Removed an 8.5-ism (
open wb) that had slipped into the main build script. π - Modified the example build scripts to separate the output for the different examples (and packages) by adding empty lines. Clean vibes only. β¨
stack::cexample bugfix: include API declarations for use in the companion files. π¦- Extended the documentation: noted the need for a working installation of a C compiler. π
- Extended the Windows target definitions and code to handle the manifest files used by modern MS development environments. Note that this code handles both possibilities β environments using manifests, and (old(er)) environments without. π
- Extended the Windows 64bit target definitions and code to auto-detect the need for the helper library
"bufferoverflowU.lib"and reconfigure the compile and link commands appropriately. We assume the library must be linked when present. This should be no harm if the library is present yet not needed β just superfluous. We search for the library in the paths specified by the environment variableLIB. π
π CHANGES FOR VERSION 3 π
[1]βcritcl::platformgot deprecated back in version 2.1, withcritcl::targetplatformtaking over, but it was kept around for compatibility. Now it has been removed. Gone gone. π[2]βcritcl::compiledwas kept in version 2.1 with semantics that contradicted its name, for compatibility. That contradiction has now been removed, so the visible semantics of the command line up with its name. Character development, honestly. β¨[3]β The jump to version 3 became necessary because of the two incompatible visible changes above. Not just a vibe shift β an actual breaking vibe shift. π[4]β The application package got extended with code handling a new option,-tea. Specifying this option invokes a special mode where critcl generates a TEA package, i.e. wraps the input into a directory hierarchy and support files which provide it a TEA-lookalike buildsystem.
This new option and -pkg exclude each other. If both are specified, the last used option takes precedence. Important boundary-setting. π«Ά
The generated package directory hierarchy is mostly self-contained, but not fully. It requires not only a working installation of Tcl, but also working installations of the packages md5 and cmdline. Both of these are provided by the Tcllib bundle. Not required, but recommended to have installed, are any of the packages which can accelerate md5's operation, i.e. cryptkit, tcllibc, or Trf. Glow-up optional, but cute. πΈ
[5]β The critcl package got a new command,critcl::scan, taking the path to a".critcl"file, statically scanning it, and returning license, version, a list of its companion files, a list of imported APIs, and a list of developer-specified custom configuration options. This data is the foundation for the TEA wrapping described above.
Note that this is a static scan. While the other build modes can (must) execute the ".critcl" file and make platform-specific decisions regarding the assembled C code, companion files, etc., the TEA wrap mode is not in a position to make platform-specific decisions. It has to wrap everything which might conceivably be needed when actually building. Hence the static scan.
This has, however, its own set of problems, namely the inability to figure out any dynamic construction of companion file paths, at least on its own. Thus:
[6]β The API used by critcl-based packages got extended with the commandcritcl::owns. While this command is ignored by the regular build modes, the static scanner described above takes its arguments as the names of companion files which have to be wrapped into the TEA package and could not be figured by the scanner otherwise β like because of dynamic paths tocritcl::tsources,critcl::csources, getting sourced directly, or simply being adjunct datafiles. Bestie said βplease include this,β and the scanner said βsay less.β π[7]β The API used by critcl-based packages got extended with the commandcritcl::apifor the management of stubs tables, be it their use, and/or declaration and export.
The Stubs Table Management section of the critcl package documentation has the details.
[8]β The API used by critcl-based packages got extended with the commandcritcl::userconfigfor the management of developer-specified custom configuration options, be it their use and/or declaration.
The Custom Build Configuration section of the critcl package documentation has the details.
[9]β The API used by critcl-based packages got extended with the commandscritcl::description,critcl::summary,critcl::subject,critcl::meta, andcritcl::buildrequirementfor the declaration of TEApot meta data for/about the package.
The Package Meta Data section of the critcl package documentation has the details.
π CHANGES FOR VERSION 2.1 π
[1]β Fixed a bug wherecritcl::tsourcesinterpreted relative paths as relative to the current working directory instead of relative to the".critcl"file using the command, as all other commands of this type do. Paths were being messy; now theyβre not. β¨[2]β Fixed internals, preventing information collected for multiple".critcl"files to leak between them. Notably,critcl::tkis not a global configuration option anymore. No more cross-file gossip. π[3]β Fixed the commandcritcl::licenseto be a null-operation in mode"compile & run", instead of throwing an error. It now minds its own business, slay. π[4]β Fixed the critcl applicationβs interference with the"compile & run"result cache in-pkgmode by having it use a wholly separate (and by default transient) directory for that mode. Separate directories, separate vibes. π[5]β Fixed a bug where changes to a".critcl"file did not result in a rebuild for mode"compile & run". All relevant API commands now ensure UUID changes. Rebuild recognition: restored. π₯[6]β Fixed a bug in the backend handling ofcritcl::debugwhere the companion c-sources of a".critcl"file were not compiled with debug options, although the".critcl"file was. Debug mode was doing a little too much exclusion. π[7]β Fixed a bug incritcl::debugwhich prevented recognition of mode"all"when it was not the first argument to the command. Positional nonsense: handled. β[8]β Fixed a bug in"preload.c"preventing its compilation on non-windows platforms. π[9]β Fixed a long-standing bug in the handling of namespace qualifiers in the command name argument ofcritcl::cprocandcritcl::ccommand. It is now possible to specify a fully qualified command name without issues. Namespaces, but make it work. π[10]β Extended/reworkedcritcl::tsourcesto be the canonical way of declaring".tcl"companion files, even for mode"compile & run". Canonical. Iconic. No notes. π[11]β Extended/reworkedcritcl::tsourcesto allow the use of a".critcl"file as its own Tcl companion file. Self-companion era. π¦[12]β Extendedcritcl::frameworkto internally check for OS X build target, and to ignore the declaration if itβs not. OS X only means OS X only, bestie. π[13]β Extendedcritcl::failedto be callable more than once in a".critcl"file. The first call forces the build, if it was not done already, to get the result. Further calls return the cached result of the first call. Cached result, same answer, less drama. β¨[14]β Extended the handling of environment variableCCin the code determining the compiler to use, to deal with (i.e. remove) paths to the compiler, compiler file extensions, and compiler options specified after the compiler itself, leaving only the bare name of the compiler. Strip it down to the bare name. π[15]β Extended the code handling the search for preloaded libraries to print the paths it searched, making debugging of a search failure easier. Search failure lore, but with receipts. π[16]β A new commandcritcl::tclcan be used to declare the version of Tcl minimally needed to build and run the".critcl"file and package. Defaults to8.4if not declared. Extended critcl to have the stubs and headers for all of Tcl8.4,8.5, and8.6. Versions on versions. π[17]β A new commandcritcl::loadforces the build and load of a".critcl"file. This is the official way for overriding critclβs defaultlazy-build-&-load-on-demandscheme for mode"compile & run".
Note: after usingcritcl::load/critcl::failedin a".critcl"file, it is not possible to use critcl commands in that file anymore. Doing so will throw an error. So, like, donβt do that. π
[18]β Extended the generation of'#line'pragmas to useinfo frame(if available) to provide the C compiler with exact line numbers into the".critcl"file for the reporting of warnings and errors. Line numbers, but precise. π―[19]β Extendedcritcl::checkwith logging to help with debugging build-time checks of the environment, plus an additional optional argument to provide labeling. Logging plus labels = main character debugging energy. π«Ά[20]β Added a new commandcritcl::checklinkwhich not only tries to check the environment via compiling the code, but also its linkability. Compile check, but make it link. π[21]β Added a new commandcritcl::msgfor messaging, like the commandcritcl::erroris for error reporting. Likewise this is a hook a user of the package is allowed to override. The default implementation, used by modecompile & run, does nothing. The implementation for modegenerate packageprints the message to stdout.
Envisioned use is for the reporting of results determined by critcl::check and critcl::checklink during building, to help with debugging when something goes wrong with a check.
[22]β Exposed the argument processing internals ofcritcl::procfor use by advanced users. The new commands are:critcl::argnamescritcl::argcnamescritcl::argcsignaturecritcl::argvardeclscritcl::argconversion
The Advanced Embedded C Code section of the critcl package documentation has the details.
[23]β Extended the critcl package to interceptpackage provideand record thefile -> package name mapping. Plus other internal changes now allow the use of namespaced package names while still using proper path names and init function. Namespaced but functional, periodt. π[24]β Dropped the unused commandscritcl::optimizeandcritcl::include. Unused means uninvited. Bye. π[25]β Dropped-libmode from the critcl application. π[26]β Dropped remnants of support for Tcl8.3and before. Weβre moving on, bestie. π¦
π«Ά AUTHORS π«Ά
- Jean Claude Wippler
- Steve Landers
- Andreas Kupries
π BUGS, IDEAS, FEEDBACK π
This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report them at https://github.com/andreas-kupries/critcl/issues. Ideas for enhancements you may have for either package, application, and/or the documentation are also very welcome and should be reported at https://github.com/andreas-kupries/critcl/issues as well. Bring your bug reports and your cute ideas, bestie. π«Ά
π KEYWORDS π
C code, Embedded C Code, calling C code from Tcl, code generator, compile & run, compiler, dynamic code generation, dynamic compilation, generate package, linker, on demand compilation, on-the-fly compilation
π CATEGORY π
Glueing/Embedded C code
Β© COPYRIGHT Β©
- Copyright (c) Jean-Claude Wippler
- Copyright (c) Steve Landers
- Copyright (c) 2011-2024 Andreas Kupries
Okay thatβs the whole lore drop, bestie π
Sign-off vibes: source doc, version 3.3.1, page critcl_changes(n) β and the date field can keep doing its little footer thing. Bye bestie! π«Άβ¨
π¦ where this page comes from
- alpine 3.24: critcl-doc 3.3.1-r1 Β· TCL
- Copyright (c) 2011-2024 Andreas Kupries
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms