אָ֣ז יִבְנֶ֤ה יְהוֹשֻׁ֙עַ֙ מִזְבֵּ֔חַ לַֽיהוָ֖ה אֱלֹהֵ֣י יִשְׂרָאֵ֑ל בְּהַ֖ר עֵיבָֽל׃
At that time Joshua built an altar to the LORD, the God of Israel, on Mount Ebal, (Sefaria translation)
Grammatically, יבנה should mean “(he) will build” (future). But according to the P’shat of the passuk (and the translation), it means “he built” (past)!
Do any meforshim say why it’s written in past tense, but understood in future tense?
Alternatively, is there a grammar rule that I don’t know about that makes this make sense?