Skip to content

Conversation

elcritch
Copy link
Contributor

Adds support for atlas test, atlas test --parallel, and atlas test tests/mytest.nim. Runs tests/t*.nim when no args are provided.

Note: no care is taken to separate test output in parallel mode. Use serial mode if you want serial output.

@Araq
Copy link
Member

Araq commented Aug 18, 2025

Why do we need this? It's beyond Atlas's scope and doesn't fit in IMO.

@elcritch
Copy link
Contributor Author

elcritch commented Aug 18, 2025

Why do we need this? It's beyond Atlas's scope and doesn't fit in IMO.

It’s not beyond the original scope of Atlas. Narrowing down atlas’s scope has made sense IMO but not in this case.

This is needed so Atlas can function as a Nimble replacement since many repos rely on nimble test to run tests.

@elcritch
Copy link
Contributor Author

elcritch commented Aug 18, 2025

Hmmm though I just remembered there is testament. I just recall testament kinda “being meh” for some reason. As in confusing to use. Maybe that was the koch thing.

Honestly that opinion is vague and could be because I don’t favor having to remember too many of randomly named tools. Pretty sure I’m not unique in that. I like namespacing like nim test which could call testament or similar.

Perhaps having Atlas just call Testament instead?

@elcritch
Copy link
Contributor Author

On the note of a nimble replacement, IMO Atlas should also support build again as well. Most of that is because adding atlas install && atlas build is far easier for the mayfly types who just want to quickly test a project or see it run or pass tests. It’s a terrible habit, but to be fair there’s so many options nowadays that a slight bit of friction at that stage and people will write off a project. I have done it myself.

@elcritch
Copy link
Contributor Author

See, I might be too dumb to use Testament: https://gist.github.com/elcritch/2cae045ce132dfd34c703b6653560d71

Ugh I'll have to read the docs instead of running my tests. :P

@Araq
Copy link
Member

Araq commented Aug 18, 2025

Testament is not good indeed, Nimony uses a new tool named "hastur" instead. So if Atlas provides a test command, it indeed makes sense to copy Nimble here.

The problem here is that Atlas's design says "it won't call Nim for you", it merely sets up a nim.cfg. atlas test and atlas doc and atlas build violate this.

If we treat Atlas as a Nimble replacement all these things make perfect sense, of course.

@elcritch
Copy link
Contributor Author

The problem here is that Atlas's design says "it won't call Nim for you", it merely sets up a nim.cfg. atlas test and atlas doc and atlas build violate this.

True, and I do like that. I also want a simple way to run tests.

Perhaps adding a nim test to Nim itself? Adding it to Nim itself could make sense, but gets contaminates separation of concerns there as well.

@elcritch
Copy link
Contributor Author

What if test was a sort of plugin? Essentially Atlas could support plugins for running cmake, or running nim tests, etc.

Then technically it's not Atlas invoking Nim, but another tool/plugin.

@Araq
Copy link
Member

Araq commented Aug 18, 2025

Maybe a separate atlasrun tool? (Part of this repo, of course.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants