raco pollen render and directory-require.rkt #67

Closed
opened 9 years ago by kirelagin · 5 comments
kirelagin commented 9 years ago (Migrated from github.com)
$ cat test.html.pm 
#lang pollen

◊foo{hi}

$ cat directory-require.rkt 
#lang racket/base

(define (foo t) `(bar ,t))

(provide foo)

$ raco pollen render test.html.pm && cat test.html
Rendering /home/kirrun/proj/test/test.html.pm /home/kirrun/proj/test/test.html.pm
render: test.html.pm
cpu time: 551 real time: 552 gc time: 207
<html><head><meta charset="UTF-8" /></head><body><root><foo>hi</foo>
</root></body></html>

(Note <foo>hi</foo>.) While, if I intentionally break directory-require.rkt, the command fails, so the file is being read, at least.

On the other hand, if I run that same file in DrRacket, I get, as expected:

'(root (bar "hi") "\n")

Is that a bug or am I missing something?

``` Console $ cat test.html.pm #lang pollen ◊foo{hi} $ cat directory-require.rkt #lang racket/base (define (foo t) `(bar ,t)) (provide foo) $ raco pollen render test.html.pm && cat test.html Rendering /home/kirrun/proj/test/test.html.pm /home/kirrun/proj/test/test.html.pm render: test.html.pm cpu time: 551 real time: 552 gc time: 207 <html><head><meta charset="UTF-8" /></head><body><root><foo>hi</foo> </root></body></html> ``` (Note `<foo>hi</foo>`.) While, if I intentionally break `directory-require.rkt`, the command fails, so the file is being read, at least. On the other hand, if I run that same file in DrRacket, I get, as expected: ``` Racket '(root (bar "hi") "\n") ``` Is that a bug or am I missing something?
mbutterick commented 9 years ago (Migrated from github.com)

When I run that in either DrRacket or the command line, I get the expected:

<html><head><meta charset="UTF-8" /></head><body><root><bar>hi</bar>
</root></body></html>

Can you give me any more information? (If you see a compiled directory nearby, you should delete that, as Racket uses that folder to cache bytecode)

When I run that in either DrRacket or the command line, I get the expected: ``` <html><head><meta charset="UTF-8" /></head><body><root><bar>hi</bar> </root></body></html> ``` Can you give me any more information? (If you see a `compiled` directory nearby, you should delete that, as Racket uses that folder to cache bytecode)
kirelagin commented 9 years ago (Migrated from github.com)

Now I get it. It works only for the first time, then I have to remove pollen.cache after I modify directory-require.rkt.

That’s probably related to #64.

Now I get it. It works only for the first time, then I have to remove `pollen.cache` after I modify `directory-require.rkt`. That’s probably related to #64.
mbutterick commented 9 years ago (Migrated from github.com)

Related, but a separate error which is easy to fix, and now has been fixed.

Related, but a separate error which is easy to fix, and [now has been fixed](https://github.com/mbutterick/pollen/commit/66fa2371ae73046cc4d3e5b0ca586d1c6a5c2631).
kirelagin commented 9 years ago (Migrated from github.com)

Side note: you should realy use “Fixes” in your commit messages ;).

Side note: you should realy use “Fixes” in your commit messages ;).
mbutterick commented 9 years ago (Migrated from github.com)

Sometimes I do, but I have mixed feelings about it. I expect Git (the technology), and my Git repo, to easily outlast GitHub (the company). So I’m not sure there’s a compelling reason to infect the commit history with GitHubisms ;)

Sometimes I do, but I have mixed feelings about it. I expect Git (the technology), and my Git repo, to easily outlast GitHub (the company). So I’m not sure there’s a compelling reason to infect the commit history with GitHubisms ;)
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: mbutterick/pollen#67
Loading…
There is no content yet.