I want to use an 8-speed shifter with a 7-speed cassette. I saw this question, but I am unsure if this would work, since I believe the spacing is the same between a 7- and 8-speed, but the length is not.
You can do that, the spacing is the same.
As already pointed, you're going to have a "phantom gear" on your shifter.
If you let gear number 2 on the shifter correspond to gear number 1 in the cassette, you should take care not to press too hard on the lever when you are already in gear 2, since this should overstretch the cable or the lever.
If you let the normal order until gear 7, and have an 8th gear on the lever as an "empty" or "ghost" gear, there is no danger to overstretch anything, but the shifter cable might become too loose, to the point of the housings coming out of their stops.
Anyway, the gear spacing is the same, and there would be any necessary damage in any part, except one of the positions of the shifter not being used.
Also, this could be a good alternative to upgrade the shifter, and only some time later to upgrade the rear wheel.
At last, have in mind that these systems are not in production anymore (as far as I know).
Hope this helps
Assuming you have a 7 speed cassette that can be disassembled and not a 7 speed freewheel....the cog spacing (center to center) of 8 spd is 4.8mm, the cog spacing of 7 spd is 5.0mm. Replace the plastic cog spacers of the 7 spd (3.15 thick) with 8 spd spacers (3.0 thick)....readily available on line. This will yield a 4.85mm cog spacing....shifting should be oblivious to the .05mm difference. Lockring should still tighten the starter cog, otherwise get a 1mm spacer and put it under the largest cog. I have revised cassettes both ways (7 to 8 and 8 to 7) successfully.