critcl_changes(n)

πŸ“¦ version 3.3.1, in alpine 3.24

πŸŽ€ 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 🌸

  1. Oops. Added refresh of tcl 8.6, 8.7 headers which was left behind. 😭 (a little leftover, we caught it tho)
  2. Oops. Fixed mismatch of package directories computed by install vs uninstall. 🫢

πŸ¦‹ CHANGES FOR VERSION 3.3 πŸ¦‹

  1. As announced with 3.2:
    1. Removed support for Tcl 8.4 and 8.5. bye bestie πŸ‘‹
    2. Removed support for the argument types int*, float*, double*, bytearray, rawchar, and rawchar*.
  2. 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 πŸ’œ

  1. 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. ⚠️

  1. Made ~-handling portable across the 8.x and 9 boundary (via HOME environment variable).
  2. Bumped embedded tclconfig to version 2.67. Patch supplied by Paul Obermeier. 🫑
  3. Bug Fix #127 [https://github.com/andreas-kupries/critcl/issues/127](https://github.com/andreas-kupries/critcl/issues/127)
  4. Bug Fix #128 [https://github.com/andreas-kupries/critcl/issues/128](https://github.com/andreas-kupries/critcl/issues/128)
  5. 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. πŸ“
  6. 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 defining CRITCL_TRACE_NOTHREADS.

Package bumped to version 0.4.

  1. Reworked the installer to add tclX markers to the installation directories of the C-based support packages (critcl::callback, critcl::md5c), where X is the major version number of the tclsh which ran critcl.
  2. In other words, one of tcl8 or tcl9. πŸŽ€
  3. Broke lingering dependencies on the Tcllib packages cmdline and fileutil.

There are no circularities between Critcl and Tcllib any longer, simplifying installation. ate and left no crumbs πŸ”₯


⭐ CHANGES FOR VERSION 3.2 ⭐

  1. 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.

  1. 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. πŸ”

  1. Removed the irrelevant packages autoscroll, cmdline, dict84, lassign84, lmap84, snit, snitbutton, and wikit. gone, not invited to the group chat πŸ’€
  2. 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.
  3. Bug Fix Issue #125 [https://github.com/andreas-kupries/critcl/issues/125](https://github.com/andreas-kupries/critcl/issues/125). Added missing method create in object creation example of installer documentation.
  4. Feature. Extended cproc argument type processing. Now able to auto-create restricted scalar types. I.e. types derived from int, 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. ✨

  1. Bug Fix / Enhancement Issue #118 [https://github.com/andreas-kupries/critcl/issues/118](https://github.com/andreas-kupries/critcl/issues/118). Modified critcl::cproc to accept C syntax for arguments, i.e. Trailing comma on argument names, leading comma on type names, and lone comma characters. πŸŽ€
  2. 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. πŸ’…

  1. Fix Issue #109 [https://github.com/andreas-kupries/critcl/issues/109](https://github.com/andreas-kupries/critcl/issues/109). Ignore clang suffices when computing the target identifier from a configuration identifier.
  2. Feature. Bumped package critcl::cutil to version 0.2.1. Simplified the implementation of macro ASSERT by taking the underlying Tcl_Panic's printf ability into account and added a new macro ASSERT_VA exporting the same ability to the user. 🫢

🌈 CHANGES FOR VERSION 3.1.18.1 🌈

  1. Attention: While the overall version (of the bundle) moves to 3.1.18.1 the versions of packages critcl and critcl::app are unchanged. (yes the bundle and the babies got different version numbers, keep up 🫢)
  2. Bugfix Generally removed a number of 8.5-isms which slipped into 3.1.18, breaking ability to use it with Tcl 8.4.
  3. Bugfix Corrected broken build.tcl uninstall.
  4. Bugfix Package critcl::class bumped to version 1.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 #96 from sebres/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 type Tcl_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::class bumped to version 1.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 #99 from pooryorick/master. Fixes to the target directory calculations done by the install code. install code said β€œwhere?” and now it knows πŸŽ€
  • [6] Merged pull request #94 from andreas-kupries/documentation. A larger documentation cleanup. The main work was done by pooryorick, 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 field critcl_bytes.s to unsigned 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::cutil bumped to version 0.2. Fixed missing inclusion of header "string.h" in "critcl_alloc.h", needed for memcpy in macro STREP. Added macros ALLOC_PLUS and STRDUP. Moved documentation of STREP... macros into proper place (alloc section, not assert). headers found their home 🧚
  • [10] Merged pull request #83 from apnadkarni/vc-fixes. Removed deprecated -Gs for MSVC builds, and other Windows fixups. Windows glow-up, periodt πŸͺŸ
  • [11] Feature. Package critcl::iassoc bumped to version 1.1. Refactored internals to generate an include header for use by .c files. This now matches what other generator packages do. The template file is inlined and removed. consistency is the vibe 🌈
  • [12] Merged pull request #82 from gahr/home-symlink. Modified tests to handle possibility of $HOME a symlink. symlink-aware testing, we love to see it 🫢
  • [13] Merged pull request #81 from gahr/test-not-installed. Modified test support to find uninstalled critcl packages when running tests. Handles all but critcl::md5. almost everyone invited to the test party πŸŽ‰
  • [14] Merged pull request #85 from snoe925/issue-84 to fix Issue #84 breaking installation on OSX. OSX install fix, thank u πŸ“
  • [15] Merged pull request #87 from apnadkarni/tea-fixes to fix Issue #86, broken -tea option, generating an incomplete package. -tea got rescued β˜•
  • [16] Feature. New package critcl::callback providing C-level functions and data structures to manage callbacks from C to Tcl. callbacks but make it managed πŸ”₯
  • [17] Feature. Package critcl::literals bumped to version 1.3. Added mode +list enabling the conversion of multiple literals into a list of their strings. literal list slay ✨
  • [18] Feature. Package critcl::enum bumped to version 1.1. Added basic mode handling, supporting tcl (default) and +list (extension enabling the conversion of multiple enum values into a list of their strings). enum modes unlocked πŸŽ€
  • [19] Feature. Package critcl::emap bumped to version 1.2. Extended existing mode handling with +list extension 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 because critcl::tsources can 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 the auto_path. Without the patch the installed critcl will not find its own packages and fail. Thank you to Simon Bachmann https://github.com/lupylucke for 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. Extended critcl::include to 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 of critcl::ccode into 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 critcl to make use of the new tracing facilities to provide tracing of arguments and results for critcl::ccommand and critcl::cproc invokations. trace it, bestie πŸ”₯
  • [11] Modified packages critcl and critcl::class to provide better function names for (class) method tracing. Bumped package critcl::class to version 1.0.7. better names = better vibes ✨
  • [12] Extended the support package critcl::literals with limited configurability. It is now able to generate code for C-level access to the pool without Tcl types (Mode c). The previously existing functionality is accesssible under mode tcl, which also is the default. Both modes can be used together. literals got modes πŸŽ€
  • [13] Extended the support package critcl::emap with limited configurability. It is now able to generate code for C-level access to the mapping without Tcl types (Mode c). The previously existing functionality is accessible under mode tcl, 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 argument args as variadic if it is the last argument of the procedure. read that twice, bestie ⚠️
  • [3] New feature. Added two introspection commands, critcl::has-argtype and critcl::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 alias object0. The difference to Tcl_Obj* is in the reference counting. refcount lore 🧚
  • [5] Extended the command critcl::argtypesupport with 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 forgotten critcl::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 few dict exists commands 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 uses platform::identify for the default path, instead of platform::generic. FreeBSD got specific πŸ”₯
  • [13] Bugfix: Fixed issue #58. Simplified the setup and use of md5. CriTcl now makes use of its own package for md5, using itself to built it. There is no chicken/egg problem with this as the -pkg mode used for this does not use md5. 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 🌸

  1. Fixed issue #36, bestie!! πŸŽ€ Added a message to the all target of the Makefile generated 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.
  2. Accepted the request implied in issue #54 ✨. We now unconditionally save the compiler/linker build log into the key log of the dictionary returned by cresults, and we also save a copy of only the execution output in the brand new key exl ("execution log"). Two logs, two moods, both slaying.
  3. Fixed issue #53 πŸ’…. Clarified the documentation of the commands critcl::load and critcl::failed with 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.
  4. 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.
  5. Fixed issue #52. Updated the local Tcl/Tk headers to 8.4.20, 8.5.13, and 8.6.4. Fresh headers, fresh me πŸ¦‹.
  6. Fixed issue #45. New feature, new command: critcl::cconst πŸ‘‘. Obsessed.
  7. critcl::util: new command locate to 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.
  8. 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 πŸ¦‹

  1. Merged PR #43. Fixed a bug loading adjunct Tcl sources 🫢.
  2. Fixes in the documentation and generated code of package "critcl::enum". Bumped to version 1.0.1 ⭐.
  3. Fixes in the documentation of package "critcl::bitmap" ✨.
  4. 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.
  5. Merged PR #49. Fixed a documentation typo πŸ’….
  6. Merged PR #46. Fixed a documentation typo πŸ’… (yes, another one, we love a consistent cleanup arc).
  7. 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.
  8. New predefined argument- and result-type "wideint" mapping to Tcl_WideInt πŸ‘‘.
  9. 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.
  10. 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 when X is set, and set to false when X has 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 πŸ’€.
  11. Fixed issue #50 and documented the availability of the variable "interp" (type Tcl_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 release 3.1.15. The variable name was changed to be consistent with other code environments. Rip ip, you had a good run.
  12. Fixed issue #51. Disabled the generation of #line directives for "critcl::config lines 0" coming from template files, or code generated with them before the final value of this setting was known πŸ™ˆ.
  13. Fixed an issue with the handling of namespaced package names in "critcl::iassoc" πŸ’œ. Equivalent to a bug in "critcl::class" fixed for critcl 3.1.1, critcl::class 1.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 ✨

  1. Fixed issue 42. Clear ::errorInfo immediately after startup to prevent leakage of irrelevant (caught) errors into our script and confusing the usage code 🧹. Clean slate, clean vibes.
  2. 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.
  3. Extended the utility package critcl::literals to declare a cproc result-type for a pool πŸ‘‘.

Further fixed the generated header to handle multiple inclusion.

Bumped version to 1.1.

  1. Fixed an issue with utility package critcl::bitmap 🌸.

Fixed the generated header to handle multiple inclusion.

Bumped version to 1.0.1.

  1. Created new utility package critcl::enum for the quick and easy setup and use of mappings between C values and Tcl strings 🌈. Built on top of critcl::literals.
  2. Added examples demonstrating the use of the utility packages critcl::literals, critcl::bitmap, and critcl::enum πŸŽ€. Examples!! Because reading docs is one thing and seeing it work is another, fr.

πŸ’œ CHANGES FOR VERSION 3.1.11 πŸ’œ

  1. Fixed issue #37, via pull request #38, with thanks to Jos DeCoster 🫢. Information was stored into the v::delproc and v::clientdata arrays 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 πŸ’€.
  2. New convenience command critcl::include for easy inclusion of headers and other C files ✨.
  3. New command critcl::make to generate a local header of other C files for use by other parts of a package through inclusion πŸŽ€.
  4. New utility package critcl::literals for quick and easy setup of and access to pools of fixed Tcl_Obj* strings πŸ‘‘. Built on top of critcl::iassoc.
  5. New utility package critcl::bitmap for quick and easy setup and use of mappings between C bitsets and Tcl lists whose string elements represent that set πŸ”₯. Built on top of critcl::iassoc.

πŸŽ€ CHANGES FOR VERSION 3.1.10 πŸŽ€

  1. Fixed code version numbering forgotten with 3.1.9 😭. It happens to the best of us.
  2. 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.

  1. Fixed an issue where the ccommand forgot 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 πŸ“

  1. Fixed issue #27. Added missing platform definitions for various alternate linux and OS X targets 🌈.
  2. Fixed issue #28. Added missing -mXX flags for linking at the linux-{32,64}-* targets πŸ”₯.
  3. Fixed issue #29. Replaced the use of raw "cheaders" information in the processing of "cdefines" with the proper include directives derived from it ✨.
  4. 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.
  5. 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 πŸ’….
  6. Fixed issue #32. Merged pull request by Andrew Shadura. Various typos in documentation and comments πŸ“.
  7. Fixed issue #34. Handle files starting with a dot better πŸ™ˆ. Dotfiles deserve respect too.

πŸ’… CHANGES FOR VERSION 3.1.8 πŸ’…

  1. 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.
  2. 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 ⭐

  1. 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.
  2. 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.
  3. 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 🧚

  1. 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.
  2. Fixed issue #22, the handling of the command identifier arguments of critcl::ccommand, critcl::cproc, and critcl::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 πŸ’….

  1. Fixed issue #23.

🐚 CHANGES FOR VERSION 3.1.5 🐚

  1. 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.
  2. Fixed issue #20. Made option -tea work on windows, at least in a unix emulation environment like msys/mingw 🫢. It's a start!

🌸 CHANGES FOR VERSION 3.1.4 🌸

  1. 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.
  2. Fixed a typo which broke the win64 configuration πŸ’€. One typo. One entire platform. Iconic in a tragic way.
  3. Fixed issue #16, a typo in the documentation of command critcl::class πŸ“.

πŸ¦‹ CHANGES FOR VERSION 3.1.3 πŸ¦‹

  1. Enhancement. Bestie, here's the tea in detail:
  2. 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. πŸ’…
  3. Added two new methods, critcl::argtypesupport and ::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. 🫢
  4. Semi-bugfixes in the packages critcl::class and critcl::iassoc. Added pragmas for the AS meta data scanner to make sure the template files actually get made part of the package. Versions bumped to 1.0.4 and 1.0.1 respectively. ✨

🌸 CHANGES FOR VERSION 3.1.2 🌸

  1. Enhancement. In detail, bestie:
  2. Extended critcl::cproc so it can handle optional arguments β€” in a limited way, no cap. And this is automatically available to critcl::class cproc-based methods too. Slay. πŸ”₯
  3. Bugfix in the lassign emulation for Tcl 8.4. Unused variables now get properly set to the empty string. Bumped the version of the emulation package lassign84 to 1.0.1. πŸŽ€

πŸ’œ CHANGES FOR VERSION 3.1.1 πŸ’œ

  1. Bugfixes all around. In detail:
  2. Fixed the generation of those wrong#args errors for critcl::cproc and derived code (that's critcl::class cproc-based methods, iykyk). Use NULL if there are no arguments, and take the offset into account. πŸ™ˆ
  3. Fixed how critcl::class handles package names β€” we forgot they can contain namespace separators, oops 😭. Bumped to version 1.0.1.
  4. Extended an error message generated by critcl::class during instance creation, so it's clearer. Bumped to version 1.0.2. πŸ’–

🌈 CHANGES FOR VERSION 3.1 🌈

  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 πŸ‘‡

  1. 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.

  1. 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.

  1. 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.

  1. 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. πŸ“
  2. 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.

  1. Extended the API with commands that help developers generate proper C #line directives. 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.

  1. 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 πŸ”₯

  1. Fixed the code generated by critcl::c++command. The emitted code was handing a non-static string table to Tcl_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 ⭐

  1. Fixed github issue 10. The critcl application now delivers a proper exit code (1) on build failure, instead of always indicating success (status 0). No more lying about it πŸ’…
  2. Fixed github issue 13. Handling of bufferoverflowU.lib for release builds was inconsistent with the handling for debug builds. It's now identically handled (conditional) by both cases. ✨
  3. Documentation cleanup, mainly in the installation guide and the README.md that github shows. πŸŽ€

πŸ¦‹ CHANGES FOR VERSION 3.0.5 πŸ¦‹

  1. Fixed a bug in the new code for #line pragmas, triggered when specifying C code without leading whitespace. πŸ™ˆ
  2. 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 πŸ’œ

  1. Fixed generation of the package's initname when the incoming code is read from stdin and has no proper path. 😭
  2. Fixed github issue 11. Now using /LIBPATH instead of -L on Windows (the libinclude configuration setting).
  3. Extended critcl to handle the -l:path format of -l options. GNU ld 2.22+ handles this by searching for the path as-is β€” which is good when you're specifying static libraries, since plain -l looks 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. πŸ”₯
  4. 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. ✨
  5. Reworked how #line pragmas get inserted into the generated C code, to avoid the limitations various compilers impose on the line number argument, and to be more accurate. πŸ‘‘
  6. Modified argument processing. Option -libdir now also implies -L for its argument. πŸŽ€
  7. 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. 🫢
  8. Extended the build script with targets to regenerate the embedded documentation and diagrams, and to generate a release. 🌸

🌈 CHANGES FOR VERSION 3.0.3 🌈

  1. Fixed github issues 5 and 8, for the example build.tcl scripts. 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 πŸ“

  1. Fixed an issue in compile-and-run mode where commands put into the auto_index aren't found by Tcl's [unknown] command. πŸ’€
  2. 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 πŸ‘‘
  3. Implemented a command line option -L, the equivalent of option -I, just for library search paths. ✨
  4. 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 🧚

  1. Bugfixes all around. In detail:
  2. Fixed recording of Tcl version requirements. Keep package name and version together, unbreaking the generated meta data and the generated package load command. πŸŽ€
  3. Fixed the build scripts: when installing, or wrapping for TEA, generate any missing directories. πŸ“
  4. Modified the build scripts to properly exit the application when the window of their GUI is closed through the (X) button. πŸ’…
  5. Removed an 8.5-ism (open wb) that had slipped into the main build script. 😭
  6. Modified the example build scripts to separate the output for the different examples (and packages) by adding empty lines. Clean vibes only. ✨
  7. stack::c example bugfix: include API declarations for use in the companion files. πŸ¦‹
  8. Extended the documentation: noted the need for a working installation of a C compiler. πŸ’–
  9. 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. 🌟
  10. 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 variable LIB. πŸ”

πŸ’– CHANGES FOR VERSION 3 πŸ’–

  • [1] β€” critcl::platform got deprecated back in version 2.1, with critcl::targetplatform taking over, but it was kept around for compatibility. Now it has been removed. Gone gone. πŸ’€
  • [2] β€” critcl::compiled was 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 command critcl::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 to critcl::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 command critcl::api for 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 command critcl::userconfig for 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 commands critcl::description, critcl::summary, critcl::subject, critcl::meta, and critcl::buildrequirement for 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 where critcl::tsources interpreted 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::tk is not a global configuration option anymore. No more cross-file gossip. πŸ™ˆ
  • [3] β€” Fixed the command critcl::license to 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 -pkg mode 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 of critcl::debug where 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 in critcl::debug which 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 of critcl::cproc and critcl::ccommand. It is now possible to specify a fully qualified command name without issues. Namespaces, but make it work. 🌈
  • [10] β€” Extended/reworked critcl::tsources to be the canonical way of declaring ".tcl" companion files, even for mode "compile & run". Canonical. Iconic. No notes. πŸ‘‘
  • [11] β€” Extended/reworked critcl::tsources to allow the use of a ".critcl" file as its own Tcl companion file. Self-companion era. πŸ¦‹
  • [12] β€” Extended critcl::framework to 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] β€” Extended critcl::failed to 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 variable CC in 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 command critcl::tcl can be used to declare the version of Tcl minimally needed to build and run the ".critcl" file and package. Defaults to 8.4 if not declared. Extended critcl to have the stubs and headers for all of Tcl 8.4, 8.5, and 8.6. Versions on versions. πŸ“š
  • [17] β€” A new command critcl::load forces the build and load of a ".critcl" file. This is the official way for overriding critcl’s default lazy-build-&-load-on-demand scheme for mode "compile & run".
Note: after using critcl::load / critcl::failed in 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 use info 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] β€” Extended critcl::check with 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 command critcl::checklink which 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 command critcl::msg for messaging, like the command critcl::error is for error reporting. Likewise this is a hook a user of the package is allowed to override. The default implementation, used by mode compile & run, does nothing. The implementation for mode generate package prints 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 of critcl::proc for use by advanced users. The new commands are:
    • critcl::argnames
    • critcl::argcnames
    • critcl::argcsignature
    • critcl::argvardecls
    • critcl::argconversion

The Advanced Embedded C Code section of the critcl package documentation has the details.

  • [23] β€” Extended the critcl package to intercept package provide and record the file -> 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 commands critcl::optimize and critcl::include. Unused means uninvited. Bye. πŸ‘‹
  • [25] β€” Dropped -lib mode from the critcl application. πŸ’€
  • [26] β€” Dropped remnants of support for Tcl 8.3 and 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 (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