Menu

#4620 Remove/replace `Simple_closure` smob type

Verified
Maintainability
2015-10-20
2015-09-25
No

Owner: dak@gnu.org

Consists of commits (including patch from issue 4618):

  • Rewrite call_pure_function
  • Remove node "simple closure" from notation appendices
  • Remove/replace Simple_closure smob type
  • Import grob::compose-function and grob::offset-function into C
  • Add grob::compose-function and grob::offset-function
    Those are the main replacements for the uses of ly:make-simple-closure
    in lily/grob-closure.cc.
  • Add ly:pure-call and ly:unpure-call functions
  • Remove unused function chain-grob-member-functions

This is based on issue 4618.

Rietveld issue: 262560043

Related

Issues: #4618

Discussion

  • Anonymous

    Anonymous - 2015-09-26
    • Patch: new --> needs_work
     
  • Anonymous

    Anonymous - 2015-09-26

    Make fails almost instantly

    --snip--

    rm -f ./out/unpure-pure-container.dep; DEPENDENCIES_OUTPUT="./out/unpure-pure-container.dep ./out/unpure-pure-container.o" g++ -c -Woverloaded-virtual -I/usr/include/python2.7 -I/usr/include/python2.7 -fno-strict-aliasing -g -pipe -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -fPIC -fwrapv -g -pipe -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -fPIC -fwrapv -DHAVE_CONFIG_H -DDEBUG -I/home/james/lilypond-git/lily/include -I./out -I/home/james/lilypond-git/flower/include -I../flower/./out -I../flower/include -I/home/james/lilypond-git/lily/out -g -pipe -pthread -I/usr/include/freetype2 -I/usr/include/libpng16 -pthread -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libpng16 -W -Wall -Wconversion -o out/unpure-pure-container.o /home/james/lilypond-git/lily/unpure-pure-container.cc
    make[1]: *** No rule to make target '/home/james/lilypond-git/lily/include/simple-closure.hh', needed by 'out/context-property.o'. Stop.
    make[1]: *** Waiting for unfinished jobs....
    make[1]: Leaving directory '/home/james/lilypond-git/build/lily'
    /home/james/lilypond-git/stepmake/stepmake/generic-targets.make:6: recipe for target 'all' failed
    make: *** [all] Error 2

    --snip--

     
    • David Kastrup

      David Kastrup - 2015-09-27

      I think you forgot to execute "make clean" after applying the patch and before compiling.

       
      • Anonymous

        Anonymous - 2015-09-27

        David,

        Can you check again on your side?

        I did a make clean and a make dist-clean.

        I still get this and have even recloned lilypond-git from savannah without success.

        Sorry for the inconvenience.

        James

         
        • David Kastrup

          David Kastrup - 2015-09-27

          Absolutely sure about this. Perhaps you are reusing your build dir between your various sources of the clones, possibly because it has the wrong permissions and is not getting deleted. If you use a separate build dir, try

          sudo rm -rf /path/to/build-dir

          Make triple sure that you get the path right before pressing return: nothing of the given directory will remain.

           
          • Anonymous

            Anonymous - 2015-09-27

            David,

            As I said, I did a complete fresh git clone (I destroyed my old entire tree in case it had become polluted somehow).

            So my work flow was (after git clone)

            cd $LILYPOND_GIT
            mkdir build
            ./autogen --noconfigure
            cd build
            ../configure --disable-optimising
            make -j8 CPU_COUNT=8
            make -j8 CPU_COUNT=8 test-baseline

            cd ..

            patch -p1 < 'path to diff file from Rietveld'
            git status (to check new/mod/deleted files are the same as listed in Rietveld)
            cd build
            make -j8 CPU_COUNT=8

            this is where it fails.

            Normally I'd then do a make check and a make doc.

            James

            PS I have just done it again (against Eintein's old adage) but I get the same problem.

            PPS Also note that I was able to test another half dozen or so patches on the same LilyPond-Git tree (before I removed it to test this again) with no issues.

             
            • David Kastrup

              David Kastrup - 2015-09-27

              Well, this proves that my original comment was quite correct:

              I think you forgot to execute "make clean" after applying the patch and before compiling.

              You did, indeed, not do "make clean" and "make" after applying the patch and before (re-)compiling.

              Consequently, all the object files from before applying the patch stick around, as do the dependency files. This will be conveniently fast and work when the dependencies are absolutely identical before and after applying the patch. So it will work often.

              The point of this patch, however, is to remove files. Obviously this entails changing the dependencies.

              If you want to test correclty, you need, after make test-baseline and applying the patch, to again do make clean, then restart at the autogen.sh command but then run make check instead of make test-baseline. make clean does not remove the test baseline, so make check still has its reference available.

               

              Last edit: David Kastrup 2015-09-27
              • Anonymous

                Anonymous - 2015-09-27

                David,

                Thank you. How embarrassing.

                Passes make, make check and a full make doc

                 
  • Anonymous

    Anonymous - 2015-09-27
    • assigned_to: David Kastrup
     
  • Anonymous

    Anonymous - 2015-09-27
    • Patch: needs_work --> review
     
  • Anonymous

    Anonymous - 2015-09-29
    • Patch: review --> countdown
     
  • Anonymous

    Anonymous - 2015-09-29

    Patch on countdown for October 2nd.

     
  • Anonymous

    Anonymous - 2015-10-02
    • Patch: countdown --> push
     
  • Anonymous

    Anonymous - 2015-10-02

    Patch counted down - please push

     
  • David Kastrup

    David Kastrup - 2015-10-02

    Pushed to staging as
    commit 594eb2bfac1040ecc6961c79442bea2a2cedec82
    Author: David Kastrup dak@gnu.org
    Date: Fri Sep 25 16:29:14 2015 +0200

    Rewrite call_pure_function
    

    commit dbe1fd47441d21aadd5669e9e69edfecb38ae45a
    Author: David Kastrup dak@gnu.org
    Date: Fri Sep 25 16:09:43 2015 +0200

    Issue 4620/6: Remove node "simple closure" from notation appendices
    

    commit c5d9f09505f28e5b44c7070fd88a841a271b8028
    Author: David Kastrup dak@gnu.org
    Date: Thu Sep 24 17:51:54 2015 +0200

    Issue 4620/5: Remove/replace Simple_closure smob type
    

    commit cd33b4fe18eb39c9ebeb6a02ccea7b4d17d1395f
    Author: David Kastrup dak@gnu.org
    Date: Thu Sep 24 17:17:31 2015 +0200

    Issue 4620/4: Import grob::compose-function and grob::offset-function into C
    

    commit 85903f628e511db028313c3fd44b8412806ca36d
    Author: David Kastrup dak@gnu.org
    Date: Tue Sep 22 15:02:12 2015 +0200

    Issue 4620/3: Add grob::compose-function and grob::offset-function
    
    Those are the main replacements for the uses of ly:make-simple-closure
    in lily/grob-closure.cc.
    
     

    Last edit: David Kastrup 2015-10-02
  • David Kastrup

    David Kastrup - 2015-10-02
    • labels: --> Fixed_2_19_29
    • status: Started --> Fixed
    • Patch: push -->
     
  • Phil Holmes

    Phil Holmes - 2015-10-20
    • status: Fixed --> Verified
     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.