5 ms·
If you look at configuring a tool like Jest, there's a ton of "build tool" overlap, typically involving configuring Babel/TypeScript, parsing, path aliases, and
by acemarke 6y ago
If you look at configuring a tool like Jest, there's a ton of "build tool" overlap, typically involving configuring Babel/TypeScript, parsing, path aliases, and so on. In particular, you usually have duplicate configuration for Jest and Webpack for all those things, but with completely different config file formats. Test runners also need to be able to iterate over files, run checks, and print diagnostics.
Those all sound like things that Rome has the ability to do already, _and_ it's another tool that Rome could eliminate from a typical install.
I'm not planning to switch to Rome any time soon, but I definitely understand the mindset involved in that approach.
- Touche 6y agoThis is a weird peculiarity of the JS ecosystem. The rest of programming ecosystems do not have dozens of tools all doing a build for you. When you run tests in C you do not use a special cli testing tool that also compiles your project... You just run cc on your test files and run it like everything else. Why JS prefers hiding the build I'll never understand.
- acemarke 6y agoNot sure I agree with that statement. For example, I know that nUnit and jUnit are test runners for the .NET and Java ecosystems, and both of those are also runnable via the CLI. As for the JS ecosystem, it's definitely developed differently than other languages, because it deals with a very different set of constraints. See this article for background explanation (which also links to further reading) https://www.swyx.io/jobs-of-js-build-tools/ https://www.swyx.io/jobs-of-js-build-tools/
- swyx 6y agoayy tx for shoutout
- ratww 6y agoNot really: dynamic languages (Python, Ruby, PHP) also have special cli testing tools just like JS, and that's where JS got inspiration from. What makes JS different is that it started having a compilation phase along the way, so both approaches hat to be combined.
- Macha 6y agoYou absolutely have this in the Java ecosystem also. Maven or Gradle + IDE plugins that need to be configured for most projects. Python too, it's lessened by the fact that you can usually skips the build test, but there's often tox, pytest, setup.py, and coverage.py configuration in even simple projects.
- pseudoramble 6y agoThat's a good point, and one that I've forgotten since I've been out of the JS world for a while now! Often you're trying to run the code in different environments depending on the context, which does require a lot of extra build tool support. Consolidating that is a reasonable goal, I'd say. It will be neat to see where they draw the line. For example, will Rome include an assertion library? What about mock and fake support? That feels a bit far from what Rome is trying to do, but if they've implemented a test runner, maybe defaults provided would be good for the DX?
- acemarke 6y ago_That_ is an excellent question, and I honestly have no idea what their plans are in that respect :) I've seen a number of Sebastian's tweets over the last couple years as he was working on Rome, and have glanced at the repo README, but haven't poked at the actual work they're doing. Part of the sales pitch for Jest is that it includes a set of APIs for mocking and assertions built in. Wouldn't surprise me if Rome did the same, but curious how they'd design things.
- ratww 6y agoIt will probably include module-mocking in it (aka jest.mock), since it happens during "bundling"/compilation, but the assertion and function mocking can certainly be handled by a third-party library.