<div dir="auto">If the rename was written in the ChangeList as the sequence of adding all methods to the new class and then removing the old class, then, if the class to rename had more methods than when the rename was logged, those methods would be lost. On the other hand, if there was only one entry for the rename, all those methods would be preserved. I personally prefer the latter, because that's what I think I'm doing when applying a class rename. The downside of this would be that you can't choose to put some methods in the new class and some in the old one when applying the ChangeList partially. <div dir="auto"><br><div dir="auto">About the references renaming, I would make that a single change too, following the idea above, but separated from the class rename, in case you want to apply the class rename and then provide a class for the old name. The downside of this, again, would be that one can't select just some references to be renamed.</div><div dir="auto"><br></div><div dir="auto">I guess it's a matter of flexibility of automatic application in different images versus flexibility of manual application. Maybe asking the user which one they prefer would solve it, and maybe taking one of the approaches as default when applying it automatically without having to ask them would help in making image recovery a more streamlined experience.</div><div dir="auto"><br></div><div dir="auto">Anyways, I'll try to implement which seems the simplest approach and then see about the other stuff.</div><div dir="auto"><br></div><div dir="auto">Cheers,</div><div dir="auto">Eric<br><div dir="auto"><br style="font-family:sans-serif"></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El vie., 5 jul. 2019 12:35, Hernan Wilkinson via Cuis-dev <<a href="mailto:cuis-dev@lists.cuis.st" target="_blank" rel="noreferrer">cuis-dev@lists.cuis.st</a>> escribió:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">recording the whole sequence is going to be more difficult because that it is not what really happens... so those events should be "artificially" created, and I think that for an automatic recovery of the image that is the most used case for this, it is better just to add the "rename" event. When recovering it will just rename the class and then apply the method changes...</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 5, 2019 at 12:20 PM Juan Vuletich <<a href="mailto:juan@jvuletich.org" rel="noreferrer noreferrer" target="_blank">juan@jvuletich.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u>

  
    
  
  <div bgcolor="#ffffff">
    Maybe they should be recorded both ways: as ClassRename and as
    sequence {ClassCreation. NewMethods. UpdateClassReferences.
    OldClassRemoval}. There are some reasons for wanting the sequence.
    One is to be able to re-apply changes, or not require to be in
    exactly the same state as when the change was created.<br>
    <br>
    If both ways are included, then the user of the file can decide what
    s(he) prefers.<br>
    <br>
    On 7/5/2019 10:11 AM, Hernan Wilkinson via Cuis-dev wrote:
    <blockquote type="cite">
      <div dir="ltr">Hi Eric,<br>
        <div> yeap, class rename is not being logged ... a new type of
          change should be created for that. If fact, it would be great
          to record all type of refactorings as refactorings instead of
          only the changes composed by the refactoring.</div>
        <div><br>
        </div>
        <div> Regarding the new change record, it should be a class
          rename type, not a deletion and creation of the new one
          because that does not happen when doing a class rename. </div>
        <div> There is an important question to answer: when loading the
          change record, should it rename the references too or should
          only do it for those that are recorded? ... if all the changes
          are loaded then the later should be applied but if not? I
          think the best option is to only rename the class and then let
          the other changes change the reference. (I hope this is
          understandable :-) )</div>
        <div><br>
        </div>
        <div>Hernan.</div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Fri, Jul 5, 2019 at 2:04 AM
          Eric Brandwein via Cuis-dev <<a href="mailto:cuis-dev@lists.cuis.st" rel="noreferrer noreferrer" target="_blank">cuis-dev@lists.cuis.st</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div dir="ltr">
            <div>Hi all,</div>
            <div><br>
            </div>
            <div>Today Cuis broke because I was messing with Morphs, and
              I had to close the image. Unfortunately, I hadn't saved my
              changes, so to recover them I had to rely on the
              .user.changes file. I opened up the image again, and it
              asked me to recover changes. I selected to automatically
              recover them, and a strange error occurred: it told me
              that UndefinedObject didn't understand #removeSelector:.
              Digging through the ChangeList, I noticed something: the
              class renames were nowhere to be seen. So, what was
              happening is that there were some ChangeListElements that
              removed selectors from classes that didn't exist because
              they had the old names from before I renamed them.</div>
            <div><br>
            </div>
            <div>All this story is to point out that bug: the class
              rename isn't logging to the changes file. And I'm not
              really sure how to solve it quickly and cleanly; there
              isn't a ClassRenameChangeRecord class like there's a
              ClassDeletionChangeRecord, so either there should be a new
              kind of ChangeList record to log class renames or we
              should log the deletion of the class and the subsequent
              adding of all the methods that were previously in that
              class to the class with the new name. What do you think?</div>
            <div><br>
            </div>
            <div>Cheers,<br>
            </div>
            <div>Eric<br>
            </div>
          </div>
          -- <br>
          Cuis-dev mailing list<br>
          <a href="mailto:Cuis-dev@lists.cuis.st" rel="noreferrer noreferrer" target="_blank">Cuis-dev@lists.cuis.st</a><br>
          <a href="https://lists.cuis.st/mailman/listinfo/cuis-dev" rel="noreferrer noreferrer noreferrer" target="_blank">https://lists.cuis.st/mailman/listinfo/cuis-dev</a><br>
        </blockquote>
      </div>
      <br clear="all">
      <div><br>
      </div>
      -- <br>
      <div dir="ltr" class="m_2289836172368476945m_4304875132002612825gmail-m_-2874739077632364915gmail_signature">
        <div dir="ltr">
          <div>
            <div dir="ltr">
              <div dir="ltr">
                <div dir="ltr">
                  <div dir="ltr">
                    <div dir="ltr">
                      <div dir="ltr">
                        <div dir="ltr">
                          <div dir="ltr">
                            <div><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong><span style="font-size:8pt"><span><span style="font-size:small"><font size="2"><span style="font-weight:normal"><span style="font-weight:bold">Hernán
                                              Wilkinson</span><br>
                                            Agile Software Development,
                                            Teaching & Coaching</span></font></span></span></span></strong></span></div>
                            <div><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong><span style="font-size:8pt"><span><span style="font-size:small"><font size="2"><span style="font-weight:normal">Phone:
                                            +54-011</span></font></span></span></span></strong></span><font size="2" face="tahoma, sans-serif">-4893-2057</font></div>
                            <div><strong style="font-family:tahoma,sans-serif;font-size:xx-small"><span style="font-size:8pt"><span style="font-size:small"><font size="2"><span style="font-weight:normal">Twitter:
                                        @HernanWilkinson</span></font></span></span></strong></div>
                            <div><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong><span style="font-size:8pt"><span><span style="font-size:small"><font size="2"><span style="font-weight:normal">site: <a href="http://www.10pines.com/" style="color:rgb(17,65,112)" rel="noreferrer noreferrer" target="_blank">http://www.10Pines.com</a></span></font></span></span></span></strong></span></div>
                            <div><font face="tahoma, sans-serif"><span style="border-collapse:collapse">Address:
                                  Alem 896</span></font>, Floor 6,
                              Buenos Aires, Argentina</div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    <br>
    <pre class="m_2289836172368476945m_4304875132002612825gmail-m_-2874739077632364915moz-signature" cols="72">-- 
Juan Vuletich
<a class="m_2289836172368476945m_4304875132002612825gmail-m_-2874739077632364915moz-txt-link-abbreviated" href="http://www.cuis-smalltalk.org" rel="noreferrer noreferrer" target="_blank">www.cuis-smalltalk.org</a>
<a class="m_2289836172368476945m_4304875132002612825gmail-m_-2874739077632364915moz-txt-link-freetext" href="https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev" rel="noreferrer noreferrer" target="_blank">https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev</a>
<a class="m_2289836172368476945m_4304875132002612825gmail-m_-2874739077632364915moz-txt-link-freetext" href="https://github.com/jvuletich" rel="noreferrer noreferrer" target="_blank">https://github.com/jvuletich</a>
<a class="m_2289836172368476945m_4304875132002612825gmail-m_-2874739077632364915moz-txt-link-freetext" href="https://www.linkedin.com/in/juan-vuletich-75611b3" rel="noreferrer noreferrer" target="_blank">https://www.linkedin.com/in/juan-vuletich-75611b3</a>
@JuanVuletich</pre>
  </div>

</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="m_2289836172368476945m_4304875132002612825gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong><span style="font-size:8pt"><span><span style="font-size:small"><font size="2"><span style="font-weight:normal"><span style="font-weight:bold">Hernán Wilkinson</span><br>Agile Software Development, Teaching & Coaching</span></font></span></span></span></strong></span></div><div><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong><span style="font-size:8pt"><span><span style="font-size:small"><font size="2"><span style="font-weight:normal">Phone: +54-011</span></font></span></span></span></strong></span><font face="tahoma, sans-serif" size="2">-4893-2057</font></div><div><strong style="font-family:tahoma,sans-serif;font-size:xx-small"><span style="font-size:8pt"><span style="font-size:small"><font size="2"><span style="font-weight:normal">Twitter: @HernanWilkinson</span></font></span></span></strong></div><div><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong><span style="font-size:8pt"><span><span style="font-size:small"><font size="2"><span style="font-weight:normal">site: <a href="http://www.10pines.com/" style="color:rgb(17,65,112)" rel="noreferrer noreferrer" target="_blank">http://www.10Pines.com</a></span></font></span></span></span></strong></span></div><div><font face="tahoma, sans-serif"><span style="border-collapse:collapse">Address: Alem 896</span></font>, Floor 6, Buenos Aires, Argentina</div></div></div></div></div></div></div></div></div></div></div></div>
-- <br>
Cuis-dev mailing list<br>
<a href="mailto:Cuis-dev@lists.cuis.st" rel="noreferrer noreferrer" target="_blank">Cuis-dev@lists.cuis.st</a><br>
<a href="https://lists.cuis.st/mailman/listinfo/cuis-dev" rel="noreferrer noreferrer noreferrer" target="_blank">https://lists.cuis.st/mailman/listinfo/cuis-dev</a><br>
</blockquote></div>