This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
     new 54e9587  THRIFT-4676: Fix intermittent CL build failures
54e9587 is described below

commit 54e9587117595d3ecbde1bf8065dc09197808bdb
Author: Allen George <allen.geo...@gmail.com>
AuthorDate: Fri Nov 30 15:06:44 2018 -0500

    THRIFT-4676: Fix intermittent CL build failures
---
 .gitignore                                         |  9 ++++++
 tutorial/cl/Makefile.am                            | 36 ++++++++++++++++------
 tutorial/cl/ensure-externals.sh                    |  1 +
 ...make-tutorial-server.lisp => load-locally.lisp} | 19 ++++--------
 tutorial/cl/make-tutorial-client.lisp              |  2 +-
 tutorial/cl/make-tutorial-server.lisp              |  2 +-
 6 files changed, 45 insertions(+), 24 deletions(-)

diff --git a/.gitignore b/.gitignore
index 0e7eedc..b7f7b45 100644
--- a/.gitignore
+++ b/.gitignore
@@ -339,8 +339,17 @@ project.lock.json
 /test/rs/target/
 /test/rs/*.iml
 /test/rs/**/*.iml
+/lib/cl/backport-update.zip
+/lib/cl/lib
+/tutorial/cl/quicklisp.lisp
+/tutorial/cl/externals/
+/tutorial/cl/quicklisp/
 /tutorial/cl/TutorialClient
 /tutorial/cl/TutorialServer
+/tutorial/cl/backport-update.zip
+/tutorial/cl/lib/
+/tutorial/cl/shared-implementation.fasl
+/tutorial/cl/tutorial-implementation.fasl
 /tutorial/cpp/TutorialClient
 /tutorial/cpp/TutorialServer
 /tutorial/c_glib/tutorial_client
diff --git a/tutorial/cl/Makefile.am b/tutorial/cl/Makefile.am
index fb6e83a..2b2013a 100755
--- a/tutorial/cl/Makefile.am
+++ b/tutorial/cl/Makefile.am
@@ -15,19 +15,30 @@
 # KIND, either express or implied. See the License for the
 # specific language governing permissions and limitations
 # under the License.
-#
+
+setup-local-lisp-env: ensure-externals.sh
+       bash ensure-externals.sh
 
 gen-cl: $(top_srcdir)/tutorial/tutorial.thrift
        $(THRIFT) --gen cl -r $<
 
-TutorialServer: make-tutorial-server.lisp
-       $(SBCL) --script make-tutorial-server.lisp
+ALL_FILE_PREREQS = \
+                  load-locally.lisp \
+                  make-tutorial-server.lisp \
+                  make-tutorial-client.lisp \
+                  shared-implementation.lisp \
+                  thrift-tutorial.asd \
+                  tutorial-implementation.lisp
 
-TutorialClient: make-tutorial-client.lisp
+# NOTE: the server and client cannot be built in parallel
+# because on loading the make-tutorial-* scripts SBCL will
+# attempt to compile their dependencies. Unfortunately,
+# because their dependencies are shared, parallel jobs can
+# end up overwriting or corrupting the compiled files
+all-local: gen-cl setup-local-lisp-env $(ALL_FILE_PREREQS)
+       $(SBCL) --script make-tutorial-server.lisp
        $(SBCL) --script make-tutorial-client.lisp
 
-all-local: gen-cl TutorialClient TutorialServer
-
 tutorialserver: all
        ./TutorialServer
 
@@ -35,9 +46,16 @@ tutorialclient: all
        ./TutorialClient
 
 clean-local:
-       $(RM) -r gen-*
-       $(RM) TutorialServer
-       $(RM) TutorialClient
+       -$(RM) -r gen-*
+       -$(RM) -r externals
+       -$(RM) -r quicklisp
+       -$(RM) -r lib
+       -$(RM) quicklisp.lisp
+       -$(RM) backport-update.zip
+       -$(RM) shared-implementation.fasl
+       -$(RM) tutorial-implementation.fasl
+       -$(RM) TutorialServer
+       -$(RM) TutorialClient
 
 EXTRA_DIST = \
        tutorial-implementation.lisp \
diff --git a/tutorial/cl/ensure-externals.sh b/tutorial/cl/ensure-externals.sh
new file mode 120000
index 0000000..5ae8c56
--- /dev/null
+++ b/tutorial/cl/ensure-externals.sh
@@ -0,0 +1 @@
+../../lib/cl/ensure-externals.sh
\ No newline at end of file
diff --git a/tutorial/cl/make-tutorial-server.lisp 
b/tutorial/cl/load-locally.lisp
similarity index 51%
copy from tutorial/cl/make-tutorial-server.lisp
copy to tutorial/cl/load-locally.lisp
index 5621ff3..b52a0a2 100644
--- a/tutorial/cl/make-tutorial-server.lisp
+++ b/tutorial/cl/load-locally.lisp
@@ -12,18 +12,11 @@
 ;;;; See the License for the specific language governing permissions and
 ;;;; limitations under the License.
 
-(require "asdf")
-(load (merge-pathnames "../../lib/cl/load-locally.lisp" *load-truename*))
-(asdf:load-system :net.didierverna.clon)
-(asdf:load-asd (merge-pathnames "gen-cl/shared/thrift-gen-shared.asd" 
*load-truename*))
-(asdf:load-asd (merge-pathnames "gen-cl/tutorial/thrift-gen-tutorial.asd" 
*load-truename*))
-(asdf:load-asd (merge-pathnames "thrift-tutorial.asd" *load-truename*))
-(asdf:load-system :thrift-tutorial)
-
-(net.didierverna.clon:nickname-package)
+;;;; Just a script for loading the library itself, using bundled dependencies.
+;;;; This is an identical copy of the file in lib/cl.
 
-(defun main ()
-  "Entry point for the binary."
-  (thrift:serve #u"thrift://127.0.0.1:9090" tutorial:calculator))
+(require "asdf")
 
-(clon:dump "TutorialServer" main)
+(load (merge-pathnames "externals/bundle.lisp" *load-truename*))
+(asdf:load-asd (merge-pathnames 
"lib/de.setf.thrift-backport-update/thrift.asd" *load-truename*))
+(asdf:load-system :thrift)
diff --git a/tutorial/cl/make-tutorial-client.lisp 
b/tutorial/cl/make-tutorial-client.lisp
index 59450a2..3a6d861 100644
--- a/tutorial/cl/make-tutorial-client.lisp
+++ b/tutorial/cl/make-tutorial-client.lisp
@@ -13,7 +13,7 @@
 ;;;; limitations under the License.
 
 (require "asdf")
-(load (merge-pathnames "../../lib/cl/load-locally.lisp" *load-truename*))
+(load (merge-pathnames "load-locally.lisp" *load-truename*))
 (asdf:load-system :net.didierverna.clon)
 (asdf:load-asd (merge-pathnames "gen-cl/shared/thrift-gen-shared.asd" 
*load-truename*))
 (asdf:load-asd (merge-pathnames "gen-cl/tutorial/thrift-gen-tutorial.asd" 
*load-truename*))
diff --git a/tutorial/cl/make-tutorial-server.lisp 
b/tutorial/cl/make-tutorial-server.lisp
index 5621ff3..4cf1a90 100644
--- a/tutorial/cl/make-tutorial-server.lisp
+++ b/tutorial/cl/make-tutorial-server.lisp
@@ -13,7 +13,7 @@
 ;;;; limitations under the License.
 
 (require "asdf")
-(load (merge-pathnames "../../lib/cl/load-locally.lisp" *load-truename*))
+(load (merge-pathnames "load-locally.lisp" *load-truename*))
 (asdf:load-system :net.didierverna.clon)
 (asdf:load-asd (merge-pathnames "gen-cl/shared/thrift-gen-shared.asd" 
*load-truename*))
 (asdf:load-asd (merge-pathnames "gen-cl/tutorial/thrift-gen-tutorial.asd" 
*load-truename*))

Reply via email to