Preheat oven to 350-degrees F.
Toast walnuts for approximately 8 minutes. Toast the shredded coconut on a separate tray during the last 4 minutes.
Allow the nuts to cool off first, then let out your pent up frustrations by pounding them in a Ziploc bag using a rolling pin. Or you can be more civilized and use a food processor.
Mix the flour, baking powder, baking soda, cinnamon, and salt in a large bowl. Stir in chopped walnuts and raisins. Set aside.
Next, add oil, apple sauce, sugars, and vanilla to the bowl of a stand mixer. Mix until thoroughly combined.
Beat in eggs, then stir in carrots, pineapple, and 1/2 of the toasted coconut.
Add the flour mixture (in batches) until the ingredients are incorporated.
To make a layered cake, pour into 2 greased and floured 9½″ round cake pans. Bake for 30 minutes, or until a toothpick inserted in the middle comes out clean.
Cool the cakes for 10 minutes then invert them onto a wire rack. Slowly peel off the parchment paper. Cool completely before frosting.I recommend these pans and this wire rack.
If baking the carrot cake in a 9″ x13″ pan, leave the cake in the pan until completely cooled before frosting the top.