Wednesday, June 19, 2013

Drupal 8: Some things learned

ust a quick recap on my last reroll. A wonderfully patient mentor and I spent far too many hours poking at the comments and working back through the entire reroll to figure out exactly what was up. In the end, my original question got answered and some further clues were found in the issue comments. And, I think I finally got the hang of Git/Git Tower (thanks to the commenter on my last post, too)! It felt really good to be flicking between branches and understanding what was where. I need to further define all the "R" things for myself, Rebase, Revert, Roll-back... Just to get things clear.
  • The first helpful thing was the discovery that I was rerolling from the wrong patch. #64 was the actual last successful patch, and #65 (which I had been working with) was just to correct a typo, but also introduced an unintentional error, which no one noticed until #81 posted an interdiff. Note to self: also be sure to add an interdiff when needed and other helpful things as YesCT suggested like links to instructions and better notes on exactly what I did. 
  • One helpful mentor also pointed out that patches/interdiffs could be applied in reverse with curl https://...blah.patch | git apply -R
  • It's also worth remembering to diff a rebased branch against your HEAD branch so you don't wind up with a diff file that includes all the commits between when you started your working branch and the current update of origin/8.x. If that makes sense. I wound up with a very clogged diff by leaving a branch a little too long.
  • Glancing through the interdiff between #64 and #65 added in #81 helped me find the typo in question and then simply modify that file and run the diff. 
  • The biggest problem, and my original question for office hours, was where to put the contents of a test file that had been wiped from 8.x in the intervening year. Eventually we wound up putting that chunk of the patch in a deeper testing directory, but I never would have known where to add it on my own. 
  • The method my mentor used to find that test file I think involved searching for other pieces of the previous, now absent test file, where I had just been searching for the parts of the test file affected by this patch. Still not super confident about this grepping business and I feel like I've heard it belittled somewhere as one of those things newbies abuse/misuse. Could be wrong.
  • Apart from that, the rerolling instructions were pretty spot on. There was a question of branching, and I think everyone just has different styles with regard to pulling down the most recent commits of 8.x and then creating a new branch for the issue you're working on, plus then a temporary testbranch to test the new patch on. 
I'm mostly not tagging mentors here so as not to be a bother/presumptuous/something, but I continue to be grateful for their patience and helpfulness and willingness to spend time bringing new people into the fold. ... resisting the urge to start singing Guys and Dolls here, though I once played one of the Mission Band members on stage.

Now moving on to a JS issue, and first spending some time brushing up my skills there thanks to some prescribed reading. I'm always torn about whether I'd prefer to read tech books on the computer or in print. Staring at the screen for ages gets to me, but a print book is too disconnected from the associated topics (and less searchable). I'll just have to take regular breaks to stare at my blooming sugar snap peas instead!

No comments:

Post a Comment