[racket] raco exe difficutly with Release 5.3.1 & stateless webserver

From: Galler (lzgaller at optonline.net)
Date: Mon Jan 28 06:43:44 EST 2013

Hawai,

Thank you for the response, but neither of your suggestions fixed the identified problem.

 If you obtained different results via testing, please share.

Subsequent to my post, I deinstalled Racket version 5.3.1 and reinstalled v 5.3, and confirmed that the problem identified in my post no longer occurred.

Based on this, I would assert the issue is specific to 5.3.1 vs 5.3 compilation behavior.



R./
Zack

  ----- Original Message ----- 
  From: Haiwei Zhou 
  To: Galler 
  Cc: users 
  Sent: Sunday, January 27, 2013 6:58 AM
  Subject: Re: [racket] raco exe difficutly with Release 5.3.1 & stateless webserver


  Hi,


  You should add function do-not-return at the end of the file. 

  Or use command plt-web-server


  Regards,
  Haiwei




  On 27 January 2013 13:02, Galler <lzgaller at optonline.net> wrote:

    Hello,

    I encountered difficulty compiling a #lang web server application after upgrading to v.5.3.1 from v5.3 last night. O/S is WinXP service pack 3

    The executable would compile into an .exe file.

    But when run,  a console window would briefly open then close.

    The program did not execute.

    I was able to reproduce the bad behavior with the following minimal source code, and the following raco script, which appear below.


    I further note that the minimal program can be successfully run in DrRacket, and can be compiled and run *without* encountering the problem by adding the -l launcher flag to the raco script. Successful execution results in a browser window opening with 'hello world' appearing in the loaded document.

    Any guidance would be sincerely appreciated.

    Thanks

    Zack


    ;START RACO SCRIPT

    raco exe simplest-raco-failure.rkt

    ;END RACO SCRIPT


    ;START SOURCE CODE

    #lang web-server

    (require  web-server/servlet-env)

    (define (start request)
      (let ((response-generator (λ (make-url)
                                  (response/xexpr `(html (head )
                                                         (body "hello world"))))))
        (send/suspend/dispatch response-generator)))



    (serve/servlet start
                   #:stateless? #t
                   #:launch-browser? #t
                   #:connection-close? #t
                   #:quit? #f
                   #:listen-ip #f
                   #:port 8000
                   #:servlet-path "/")


    ;END SOURCE CODE

    ____________________
     Racket Users list:
     http://lists.racket-lang.org/users



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20130128/0729bbd0/attachment.html>

Posted on the users mailing list.