Going Git

Feb 24, 2009

Git is one of the tools I’ve been meaning to try for a while now. It’s a version control systems that offers a distributed model, is fast, light and perfect for branching and merging. I was pretty confident I’d be up and running quickly with git as I’m used to subversion. But given the past few days experience I wouldn’t say it’s been easy. It may have been, but I decided my way in would be to mirror both the Flex and ActionScript 3 TextMate Bundles over on github - which meant using git svn. In principle it looked straightforward, but after a few clumsy maneuvers I was quickly disorientated (mainly because git svn dcommit happens to rebase on the quiet). I don’t think I’m out of the woods yet but am really beginning to see what all the noise over git is about. It’s well worth the initial steep learning curve. What I’m hoping to see are forks of the bundles, new features, feedback, and maybe one or two bug fixes ;) There are some branches to try as well. One or two build solutions have been cooked up but not quite finished. Alongside a basic attempt to integrate fdb, but it still needs a UI bolting on the front to offer true integration. Oh, and for those of you who’ve been waiting for the auto-completion alpha then that’s in the main bundle now. Take a look at the ‘Auto Complete’ command - I’ll post a little more about it soon.


Comments:

danilo - Apr 6, 2009

Hi Simon! Thank you so much for your work! If you fancy a easter break in Falmouth there are a couple of pints of cider waiting for you.


danilo - Apr 6, 2009

By the way I can see the auto-complete window, and it works great.


Don - Jun 5, 2009

Hello Simon, I know this comment dont realy reply to the post headline but I wanted to aske some questions about the as3 bundle: First: since I’m pretty much a novis of Actionscript I’m getting confused about all the different ways (and editors) to use for writing AS and AS-Projects. So How I use TM with AS AND Flash(because of the components) is as follows: 1) I create a folder: 2) I create a .fla file out of Flash CS3 put it in that folder 3) I create a Project in TM (not out of the AS3-Project template, just a generic one!) save it in folder 4) Create classes in the TM Project. 5) Run my Fla out of Flash (using a class as Document class). My question is now: Sometimes I need a quick way to test some Classes. So how can I make it possible to use a substitute for the “trace” statment out of flash which I kind of like :)?


Simon - Mar 0, 2009

@Dylan - it’s worth hanging in there with git, as now I’m over the initial confusion it’s great to work with. @dain - Ideally I’d just use a git repo but it’s not a huge thing to use git svn so anyone using svn has access as well. Feel free to do what you like with the bundle - preferably keeping it open source - as all changes, updates, and directions it’s taken in are all likely to improve things for everyone using it. @lauritz - The ‘master’ branch is a mirror of ‘Review’ so the most recent version of either should get you the auto-completion feature. You will also need the latest ‘Cutting Edge’ version of TextMate (see TextMate > Preferences > Software Update).


Aaron - Apr 3, 2009

I am having the same issue as lauritz. I fixed it temporality by copying the ‘Support’ folder from the Pristine Copy into the bundle in ‘Bundles’. I really appreciate all your work on this bundle.


lauritz - Mar 2, 2009

i would like to test the auto-complete feature but i can’t find the bundle. is it in the “master” branch on git or in “Review” on svn?


Sharedtut - Feb 3, 2010

Thank you for putting so much of your time into this.


Icek - Jun 5, 2009

Great extension, but… what happend to TM_AS3_LIB_PATH???


lauritz - Mar 2, 2009

thanks simon for clearing things up! i was now able to test the auto complete feature. unfortunately i can’t see any window poping up nor any other auto complete window. i think this is due to the early alpha state. when do you plan to implement the windows? thanks for your hard work!


lauritz - Mar 2, 2009

btw, i forgot to report a bug: 1. make modification to the bundle to let textmate move the original bundle to the pristine copy folder. 2. try any alt+esc autocomplete function. it gives you an error message about a missing completions.txt file. i think this happens because it still references to the bundle folder instead the pristine copy folder.


dain - Mar 2, 2009

hey Simon, i`ve seen all the nice updates you`ve committed to the AS3 bundle svn, well impressed :) so are you going to keep that updated or want to eventually migrate to git altogether? about forking, i was thinking of backporting your bundle for AS2, would you mind that? Flash Lite is still all about AS2 and the current bundle is not doing much more than colouring and telling TextMate some reserved words..


Dylan Smith - Feb 2, 2009

Excellent work on the auto-completion. Very good news. I’ve been trying to get up and running with Git as well, and have found the initial learning curve a bit steep.


Dylan Smith - Nov 4, 2009

Hi Simon, just checked out revision 11812 and am getting this exception on the autocomplete (using “stage.” to test autocomplete in my AS): premature end of char-class: /\s*(\b[“s”, “t”, “a”, “g”, “e”, “\b)\s*:\s*(\w+)/ Location: /Users/dylansmith/Library/Application Support/TextMate/Pristine Copy/Bundles/ActionScript 3.tmbundle/Support/lib/as3/parsers/class_parser.rb:789:in `determine_type_locally’ /Users/dylansmith/Library/Application Support/TextMate/Pristine Copy/Bundles/ActionScript 3.tmbundle/Support/lib/as3/parsers/class_parser.rb:838:in `determine_type_all’ /Users/dylansmith/Library/Application Support/TextMate/Pristine Copy/Bundles/ActionScript 3.tmbundle/Support/lib/as3/parsers/class_parser.rb:853:in `determine_type_at_level’ /Users/dylansmith/Library/Application Support/TextMate/Pristine Copy/Bundles/ActionScript 3.tmbundle/Support/lib/as3/parsers/class_parser.rb:900:in `search_ancestor’ /Users/dylansmith/Library/Application Support/TextMate/Pristine Copy/Bundles/ActionScript 3.tmbundle/Support/lib/as3/parsers/class_parser.rb:967:in `determine_type’ /Users/dylansmith/Library/Application Support/TextMate/Pristine Copy/Bundles/ActionScript 3.tmbundle/Support/lib/as3/parsers/class_parser.rb:1010:in `load’ /Users/dylansmith/Library/Application Support/TextMate/Pristine Copy/Bundles/ActionScript 3.tmbundle/Support/bin/complete.rb:24:in `’ I’m using 1.9.2, by the way. Get in touch if I can help debug this with you. Dylan


Simon - Nov 4, 2009

@Dylan. I’ve only ever worked with the default ruby install (1.8.7), Completing stage works for me so I imagine that ruby 1.9.2. does something differently. It’s a long shot, but it might work if you modified line 789 of class_parser.rb to read: type_regexp = /\s*(\b#{reference.to_s}\b)\s*:\s*(\w+)/ @Aaron and @lauritz - Since your posts I’ve modified the bundle so textmate shouldn’t have any trouble sourcing the correct files. But you have to update to the most recent version. @Don I’m not sure I understand how you want to substitute trace() could you clarify? @Icek TM_AS3_LIB_PATH is gone because there was opposition to linking against a library that could change independently of source within a project. It is best practice to include your libraries in a project as it gives you the opportunity to fix the library revision you compile against. However it was an opt in variable and the people who set would have been conscious that it was done. But as it was only handy when set globally (in the app preferences) it makes it really difficult to ignore if you want to override it at project level. Swings and roundabouts, so it was simpler to drop it.


dan - Jun 3, 2009

Thanks so much for all your work on this, it’s incredible.


Sam - Dec 4, 2009

Template creation from “New From Template” doesn’t work if any of the path in the file system leading down to your project directory contains a space. So the path to my project is /Users/sam/Documents/Current Work/ProjectName/ Current Work in the path is apparently not escaped properly, as the “New From Template” does work in ~. I looked at template_machine.rb, but I don’t know ruby so I’m struggling to find the right bit/command to escape.