Can you use a 8 speed Shimano shifter with a 7 speed cassette? 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