dyoo / whalesong

Whalesong: Racket to JavaScript compiler
http://hashcollision.org/whalesong
250 stars 30 forks source link

Windows pathing issues prevent Whalesong compilation #57

Closed dyoo closed 12 years ago

dyoo commented 12 years ago

From jvjulien:


I try to use whalesong compiler with windows os.

But there is this problem :

C:\Program Files\Racket\collects\whalesong>whalesong build hello.rkt
Writing program #<path:C:\Program Files\Racket\collects\whalesong\hello.js>
ERROR: The file #<path:C:\Users\julien\AppData\Roaming\Racket\planet\300\5.1.3\cache\dyoo\whalesong.plt\1\4\lang\kernel.rkt> is a Racket module, but is written in the language racket/base [#<path:C:\Program Files\Racket\collects\racket\base.rkt>], which Whalesong does not know how to compile.
Aborting compilation.

This looks like the sub-directory logic I'm using, to determine if a file is using one of the blessed Whalesong modules as language, is failing on Windows.

dyoo commented 12 years ago

I'm going to ask him if he can run the following program and show me what comes out:

#lang racket
(require racket/enter)
(enter! (planet dyoo/whalesong/parser/path-rewriter))
(namespace-variable-value 'normal-whalesong-path)

[Edit]

Ok, so he reports:

#<path:C:\Users\julien\AppData\Roaming\Racket\planet\300\5.1.3\cache\dyoo\whalesong.plt\1\4>

which looks right.


Now I have to see why my within? function is failing. I need to know what happens here:

#lang racket
(find-relative-path 
 (build-path "C:\\Users\\julien\\AppData\\Roaming\\Racket\\planet\\300\\5.1.3\\cache\\dyoo\\whalesong.plt\\1\\4>")
 (build-path "C:\\Users\\julien\\AppData\\Roaming\\Racket\\planet\\300\\5.1.3\\cache\\dyoo\\whalesong.plt\\1\\4\\lang\\kernel.rkt"))
jeeve commented 12 years ago

The result :

#<path:..\4\lang\kernel.rkt>
dyoo commented 12 years ago

Followup: I think I have the problem fixed in development. The patch in bc902e72daab1228867102b1d5fedb74ce3a0ea1 corrects a bug with regards to how I was mapping paths to identifiers. On my own Windows machine, Whalesong now appears to be working.

dyoo commented 12 years ago

Fixed in 1.5.

jeeve commented 12 years ago

Its' ok ! the issue is resolved. thanks

jeeve commented 12 years ago

Its' ok ! the issue is resolved. thanks

----- Mail original ----- De: "Danny Yoo" reply@reply.github.com À: "jeeve" jvjulien@free.fr Envoyé: Mardi 8 Novembre 2011 06:25:11 Objet: Re: [whalesong] Windows pathing issues prevent Whalesong compilation (#57)

Fixed in 1.5.


Reply to this email directly or view it on GitHub: https://github.com/dyoo/whalesong/issues/57#issuecomment-2664019