Replies: 9 comments 21 replies
-
To understand all options here: Is there a way to keep deno out of the final binary, say by compiling a separate version that's only used for development installs & testing ( |
Beta Was this translation helpful? Give feedback.
-
I think it's a safe assumption (and we can test it if needed) that the vast majority of developers using |
Beta Was this translation helpful? Give feedback.
-
@lgalabru: What would it mean for existing Clarinet-generated projects if we migrated to Node? Assuming you'd gracefully handle migrating them over in a backward-compatible manner, I wanted to check how/if this would disrupt any existing setup. |
Beta Was this translation helpful? Give feedback.
-
This comes with a cost (or rather costs) as you'll now have to educate the users of the software on how they can migrate their tests. And you can't really touch existing tests; you'll make them less trustworthy. So Deno tests MUST still be able to run. Deno has a built-in test discovery mechanism. Node.js doesn't. A problem to be solved. On the other hand, if you switch to Node you'll make the integration with fuzzing and property tests a whole lot easier. Happy to discuss this in very detail. |
Beta Was this translation helpful? Give feedback.
-
The question is, should Clarity developers think in or into the Clarity language? That was one of the reasons behind the success of foundry on Ethereum; it minimizes the context switching between Solidity and JS/TS and focus on what matters most1 (the smart contract language). IMHO, the direction that @igorsyl, @jo-tm, @sergey-shandar, are taking in sBTC is the way to go; tests are written in Clarity, and discovered and run via Clarinet using Deno. That way, in sBTC, they get almost for free the ability to do Invariant Testing, and adding support for property tests (and fuzz tests afterwards) won't require any change inside Clarinet, Deno, (or Node.js in this case). 1Because (non-upgradable) smart contracts are like hardware devices; once they're shipped they can't really be changed. |
Beta Was this translation helpful? Give feedback.
-
IMHO, existing tests written in Deno and TypeScript must run without modifications, even if you decide to switch to Node.js, because:
|
Beta Was this translation helpful? Give feedback.
-
The idea of writing clarity for testing clarity is not new, believe me I thought about it and gave it a try. With this workstream, we want to start from a blank slate, and based on what we learned, bring smart contract testing to the next level both in terms of methodology and tooling - and I'm certain that fuzz testing is a piece of the puzzle. Foundry is successful today because before Foundry, there was Truffle and Hardhat. This ecosystem matured and competition pushed boundaries, with new approaches being started from scratch. |
Beta Was this translation helpful? Give feedback.
-
Any way we could remove any non-standard LISP syntax, for example:
@MarvinJanssen and I were discussing the idea to write LISP code to generate Clarity code as a DSL and having LISP strict syntax would be helpful. One application would be to have full LISP turing-complete environment for test cases. Other cases would be to leverage LISP macros and other matured tooling. |
Beta Was this translation helpful? Give feedback.
-
The testing framework with node has been released Deno testing has been removed in clarinet 2.0 |
Beta Was this translation helpful? Give feedback.
-
We want to re-evaluate some design choices that we made when we started Clarinet.
Our initial rationale was to create a tool that would assist you writing clarity code, and some unit tests without having to deal with the usual dependency hell coming with node.
Embedding Deno in Clarinet is coming with a cost:
Switching to Node would let us address all the points above, but would come with a cost: developers would have to install node on their machine, if they want to run clarinet tests.
11 votes ·
Beta Was this translation helpful? Give feedback.
All reactions