I had Haml 3.0.17 working fine on Rails 3.0.0.rc2 but after updating
to Rails 3.0.0 lots of views are broken, complaining thusly:

     form_for outputs directly to the Haml template.
     Disregard its return value and use the - operator,
     or use capture_haml to get the value as a String.

This looks unlikely to be a bug in Haml, so I tried finding the
problem commit in Rails itself using "git bisect".

    $ git bisect start v3.0.0 v3.0.0_RC2

Some of the commits couldn't be tested because the test suite wouldn't
actually run on them, so I had to use "git bisect skip" on those, but
in the end I hit this:

    $ git bisect skip
    There are only 'skip'ped commits left to test.
    The first bad commit could be any of:
    647ed22aade95a7da30c37efeb14e36ab7fe713b
    851552bd8038ebee87080123c24f252c074e0b29
    b63b6c40332c5e494ceeedc41ec3697e2a6e5cd5
    9f9c50f91723e2e496cb082b7a8c1108e7cd7bda

Those commits are all untestable because BUILD was removed in commit
851552b ("Prep for final release") but references to it were only
remove 3 commits later on in commit 9f9c50f ("No more build").

Here's the log showing that sequence of commits; as you can see "git
bisects" thinks one of them is responsible for the breakage:

    9f9c50f No more build
    b63b6c4 Depend on ARel 1.0 w/ tiny fixes
    647ed22 Depend on Bundler 1.0 w/ tiny fixes
    851552b Prep for final release

So to test these I did manual checkouts like this:

    $ git checkout 647ed22
    $ git cherry-pick 9f9c50f
    # run tests (they fail) -- so "Depend on Bundler 1.0 w/ tiny
fixes" is bad
    $ git checkout 851552b
    $ git cherry-pick 9f9c50f
    # run tests (they fail) -- so "Prep for final release" is bad too

One last check to confirm:

    $ git co 851552b^ # check out "Make rake routes gracefully handle
routes with no name"
    # run tests (they work) -- so "Prep for final release" is
definitely the bad commit

The puzzling thing here is that the "Prep for final release commit"
really doesn't do anything other than drop the "BUILD" constant from
each version.rb file in the different components of Rails. But before
dropping the constant, Haml works, after dropping it, it doesn't.

See:

http://github.com/rails/rails/commit/851552bd8038ebee87080123c24f252c074e0b29
http://github.com/rails/rails/commit/9f9c50f91723e2e496cb082b7a8c1108e7cd7bda

So... my big question. Is anyone seeing any similar crazy behavior
like this? Or am I alone in the dark?

Looking in the Haml repo, I see this was just committed three hours
ago...

http://github.com/nex3/haml/commit/61a1de3ff75e98e92688f9dd2d121a3c9a9c4740

Looks like that fixes it. Gah. Funny how it's never the first thing
you suspect, but the last, that causes this kind of issue.

Cheers,
Wincent

-- 
You received this message because you are subscribed to the Google Groups 
"Haml" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/haml?hl=en.

Reply via email to