:thinking_face: I'm just watching a Kent Beck vide...
# general
r
🤔 I'm just watching a Kent Beck video on (believe it or not) speed of running tests and running tests frequently...and it reminded me of another Kent Beck video on TCR (test && commit || revert), and I wondered has anyone tried that with pants? I've tried TCR for some lightweight projects which were largely algorithm type functions so "run all tests" was sufficiently fast, that could be quite awesome with pants, if your "run all the relevant tests" is actually really fast because you only need to run the test(s) impacted 🤔 I will try it myself ofc, once I actually get my first attempt at pants working 🙂
c
./pants --changed-since=master --changed-dependees=transitive test
r
I think you would want even less than that, there's no point in going all the way back to master if you've made dozens of commits since, you just want since the last commit - which would hopefully then only be a handful of tests at most The idea of TCR is sort of TDD-ish - it's a methodology whereby you make tiny tiny changes (maybe only one line), hit save and run your tests...but for it to work you have to have tests that run almost instantly, which is something I think you might be able to get with pants Just curious if anyone has tried it as I think it could work really well 🙂
h
--changed-since=HEAD
or
HEAD~1
? I haven't heard of TCR, but sounds neat!
r
yep that's what I was thinking
It was a really interesting way of developing, borderline terrifying because it reverts your changes if your tests fail, so you are forced to make tiny tiny changes and work iteratively
1
1
h
Hah I don't think I'd like that personally, but let us know how it works out! That'd be cool if Pants can support that flow How has Pants adoption been going in general the past few weeks?
r

https://www.youtube.com/watch?v=Aof0F9DvTFg&t

if you're interested, just showed an example going through I would say first thing in the morning I can't handle the adrenaline required 😄 "you need to revert on failure, I thought it was such a horrible idea that I had to try it" 😂
👀 1
It's one of those weird... it's kind of horrible, but then I've refactored and had broken tests and ended up in a tangle and thought "if only I had..."
I'm still at a relatively early stage in my pants journey 🙂 I had some problems getting it to work nicely with a mixture of subprojects with requirements.txt, subprojects which used poetry for a build and subprojects which used poetry and then did a build and deploy of something needing to be versioned.... gradually getting there though