I was just reviewing the Rashi on the parsha and I was struck by a couple very unusual juxtapositions.
17:14 reads "... Write this as a remembrance in the Book and place it in the ears of Yehoshua, for I shall surely wipe out the memory of Amalek from under the heavens."
Rashi: "Place it in the ears of Yehoshua" - The one who brings Israel into the Land.
There is currently no decree preventing Moshe from coming to Israel (which was supposed to happen in a couple months), so at this point, wasn't Moshe under the assumption that he himself would bring them into the land?
Rashi notes that "Here it is hinted to Moshe that Yehoshua would bring Yisroel into the land." Why specifically by this mitzvah?
But there's a bigger problem: According to Rashi in the previous possuk, Yehoshua specifically did NOT kill all of Amalek when he had the chance, and "from here we learn that he acted by the word of the Shechinah/Divine Presence."
Why would Hashem essentially command Yehoshua to leave them alive now if he was to wipe them out later (which, as Hashem surely knew, would be unsuccessful)? Is there a source which discusses this confusing passage and explains why it demarcates the transition between Moshe and Yehoshua and Hashem stopping Yehoshua from "finishing the job" right then and there?