In learning Masekhet Ketubot, I encountered Rashi's definition of בי שמשי on daf 103a. There, since the passage is clearly referring to twilight on erev shabbat in particular, Rashi explains why so generic a term is used by suggesting that we most often think of twilight in relation to Shabbat: this is the time by which all of our Shabbat preparation needs to be completed, and it's therefore a more important twilight than any other.
Interestingly, in Masekhet Shabbat, Rashi gives a different explanation. There, on daf 86b, Rashi says that twilight on erev shabbat can simply be referred to as "twilight", not because of its importance but because of the frequency with which the Talmud mentions that particular twilight specifically.
Most interesting to me is that Rashi also addresses this issue in a third masekhta, Masekhet Taanit! And there, on daf 25a, he says that he has no idea why twilight on erev shabbat is just called "twilight"!!
It would seem to me that Rashi's peirush on Taanit must have been written before his peirushim on Shabbat and Ketubot, since he seems to have come up with two different explanations for the same phenomenon in the time since declaring that he didn't have even one.
My question is: I found these passages using liqqutei rashi, which is printed in the margins of my gemara. Has anybody done anything similar, working out a broader order in which Rashi's peirushim would have been written? It would be interesting to get a sense as to the relative order in which he compiled them, and the extent to which his opinions and interpretations changed over that time.