ember-angle-brackets-codemod icon indicating copy to clipboard operation
ember-angle-brackets-codemod copied to clipboard

BlockStatement not migrated

Open Turbo87 opened this issue 6 years ago • 11 comments

I don't know why, but the following snippet was not converted correctly. The code lived inside another block that was correctly converted.

          {{#rl-dropdown-toggle tagName="a" class="dropdown"}}
            {{svg-jar "sort"}}
            {{ currentSortBy }}
            <span class='arrow'></span>
          {{/rl-dropdown-toggle}}

Turbo87 avatar Dec 14 '19 10:12 Turbo87

Wooo a new bug to squash. I’ll try to take a look at it this weekend.

tylerturdenpants avatar Dec 14 '19 16:12 tylerturdenpants

@tylerturdenpants this was on https://github.com/rust-lang/crates.io btw

Turbo87 avatar Dec 14 '19 19:12 Turbo87

@Turbo87 I spoke too soon. Deleting previous comment.

tylerturdenpants avatar Dec 17 '19 02:12 tylerturdenpants

Ok, so I was right, because crates.io runs [email protected], there are functions missing in the meta that fail to be captured during enumeration. I will add a guard in telemetry helpers for these functions

tylerturdenpants avatar Dec 17 '19 03:12 tylerturdenpants

hmm, good point. I'm not sure in which scenario I tried to run the codemod, because I do have a branch that updates the project to 3.15 😅

Turbo87 avatar Dec 17 '19 08:12 Turbo87

hold on, this is a block statement, can that be anything other than a component invocation? (except for if/each)

Turbo87 avatar Dec 17 '19 08:12 Turbo87

I can give you the DEBUG info in a few hours to show you that although the module for the component is there, evaluating it causes an error, and therefore never makes it to the component types array in the telemetry

tylerturdenpants avatar Dec 17 '19 13:12 tylerturdenpants

Plus the telemetry code doesn't certify a particular block mustache statement as valid component invocation even though it is. I'd have to enhance the codemod to apply these heuristics. A PR such as this would be awesome from a skilled programmer such as yourself... 😁

tylerturdenpants avatar Dec 17 '19 15:12 tylerturdenpants

yeah, I think we only should rely on the telemetry data in ambiguous cases :)

Turbo87 avatar Dec 17 '19 15:12 Turbo87

Agree.

rwjblue avatar Dec 20 '19 19:12 rwjblue

@rwjblue I agree too... but I'm trying to find the time! 😄 Busy holiday stuff, work, and family.

tylerturdenpants avatar Dec 20 '19 19:12 tylerturdenpants