<div dir="ltr"><div>Hi all,</div><div>After a long while without doing anything about this, here's a ChangeSet that fixes this bug by adding in the user changes file the line `Smalltalk renameClassNamed: #OldClassName as: #NewClassName!` when a class is renamed, like it's currently being done when fliing out a ChangeSet. Any comments, as always, are very welcome.</div><div><br></div><div>Cheers,</div><div>Eric<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El vie., 5 jul. 2019 a las 14:02, Juan Vuletich via Cuis-dev (<<a href="mailto:cuis-dev@lists.cuis.st" target="_blank">cuis-dev@lists.cuis.st</a>>) escribió:<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">
    Ok for class rename.<br>
    <br>
    BTW, just checked and in the current change set it gets recorded
    like:<br>
    Smalltalk renameClassNamed: #EllipseMorph as: #TheEllipseMorph<br>
    <br>
    But, if I rename ivar pointBlock in HandleMorph, and then file out
    changes, I do get the detailed sequence.<br>
    <br>
    <br>
    On 7/5/2019 12:35 PM, Hernan Wilkinson wrote:
    <blockquote type="cite">
      <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" 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">
          <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" 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" target="_blank">Cuis-dev@lists.cuis.st</a><br>
                  <a href="https://lists.cuis.st/mailman/listinfo/cuis-dev" rel="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">
                <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)" 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 cols="72">-- 
Juan Vuletich
<a href="http://www.cuis-smalltalk.org" target="_blank">www.cuis-smalltalk.org</a>
<a href="https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev" target="_blank">https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev</a>
<a href="https://github.com/jvuletich" target="_blank">https://github.com/jvuletich</a>
<a href="https://www.linkedin.com/in/juan-vuletich-75611b3" 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">
        <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)" 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 cols="72">-- 
Juan Vuletich
<a href="http://www.cuis-smalltalk.org" target="_blank">www.cuis-smalltalk.org</a>
<a href="https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev" target="_blank">https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev</a>
<a href="https://github.com/jvuletich" target="_blank">https://github.com/jvuletich</a>
<a href="https://www.linkedin.com/in/juan-vuletich-75611b3" target="_blank">https://www.linkedin.com/in/juan-vuletich-75611b3</a>
@JuanVuletich</pre>
  </div>

-- <br>
Cuis-dev mailing list<br>
<a href="mailto:Cuis-dev@lists.cuis.st" target="_blank">Cuis-dev@lists.cuis.st</a><br>
<a href="https://lists.cuis.st/mailman/listinfo/cuis-dev" rel="noreferrer" target="_blank">https://lists.cuis.st/mailman/listinfo/cuis-dev</a><br>
</blockquote></div>