I have always enjoyed using TCC in software development when I was working mainly in C++ or matlab. There were a few hiccups, nothing I couldn't work around. But now that I need to work with Javascript/Typescript, the workarounds are harder or impossible to find.
I know that TCC's mission is not 100% CMD compatibility. Maybe TCC is targeting the IT user and, as a developer, I should be looking elsewhere?
Here is an example of the problem I ran into this week:
The big thing in SW development, particularly in open-source and especially in Node modules, which seem to update on daily basis, is automatic life-cycle management. You check-in a commit and then tests are run, files are linted, semantic versions updated, change-logs created, artifacts uploaded, and stake-holders contacted with barely a blink from the developer.
One common tool in Node development is
This particular incompatibility is due to string-handling on the command-line. One of the unit-tests of a down-stream libraries checks that it is escaping command-line parameters properly. Ultimately, the unittest tries to run a file whose name is
It runs this command:
More importantly, not just in this library but also in NodeJS itself, the code to shell a command to comspec is
I LOVE TCC/TCMD. But as a JS/TS developer, TCC does not love me.
I know that TCC's mission is not 100% CMD compatibility. Maybe TCC is targeting the IT user and, as a developer, I should be looking elsewhere?
Here is an example of the problem I ran into this week:
The big thing in SW development, particularly in open-source and especially in Node modules, which seem to update on daily basis, is automatic life-cycle management. You check-in a commit and then tests are run, files are linted, semantic versions updated, change-logs created, artifacts uploaded, and stake-holders contacted with barely a blink from the developer.
One common tool in Node development is
lint-staged
, a NPM module that automatically lints staged files when a git commit
is run. Every week, about 1M copies of this library are downloaded. Well, it didn't work for me. After a couple of days of debugging it and libraries it depends on, I've determined that it is due to an incompatibility between TCC and CMD and I can't make a workaround for it.This particular incompatibility is due to string-handling on the command-line. One of the unit-tests of a down-stream libraries checks that it is escaping command-line parameters properly. Ultimately, the unittest tries to run a file whose name is
()%!^&;, .bat
, which simply echos the word 'special'.It runs this command:
%comspec% /d /s /c "D:\Projects\mfd\node-cross-spawn\test\fixtures\^(^)^%^!^^^&^;^,^ "
. In CMD, the output is special
. In TCC, it's Unknown command "D:\Projects\mfd\node-cross-spawn\test\fixtures\^(^)^%^!^^^&^;^,^"
More importantly, not just in this library but also in NodeJS itself, the code to shell a command to comspec is
/d /s /c <command>
. TCC redefines the /s parameter to disable the Ctrl-C handler. I LOVE TCC/TCMD. But as a JS/TS developer, TCC does not love me.