It sucks to invest time into something thinking that you're tooling up on something & then have things pivot away from that.
Maybe on the bright side: I've seen advise that prototypes should be done in a different language than the production work in order to prevent them from being co-opted into production when they shouldn't be.