Raco pollen render did not detect change #193

Closed
opened 5 years ago by MalinMnnikk · 3 comments
MalinMnnikk commented 5 years ago (Migrated from github.com)

I found a potential bug with pollen when editing a .ptree file and then rendering a project in the command line.

I started with 4 filenames in my index.ptree file, and wanted to remove the last one, the files were XX.html, YY.html, ZZ.html and AA.html of which I removed AA.html. After saving I called raco pollen render expecting it to make the changes in file ZZ, which had a link to file AA and now should not have one.

Instead pollen did not detect any changes in these files and therefore used the cache, leading to the output generating no change at all. The ZZ file still has a functioning link to the AA file which also shows up nicely like it was still part of the .ptree file. I am using a template.html.p file for the links between the files mentioned here.

<html>
<head>
<meta charset= "UTF-8">
<title>◊(select 'h1 doc), by MM</title>
<link rel="stylesheet" type="text/css" href="styles.css"/>
</head>
<body>◊(->html doc)
You are here: ◊|here|.
◊(define prev-page (previous here))
◊when/splice[prev-page]{Previously you were here: <a href="◊|prev-page|">◊|prev-page|</a>.}
◊(define next-page (next here))
◊when/splice[next-page]{Go to the next post here: <a href="◊|next-page|">◊|next-page|</a>.}
</body>
</html>

I am going to go around this problem for now by deleting the compiled directory (no more cache), but would like to know if this is a bug or if I am doing something wrong.

C:\Users\Malin>raco pollen render C:\Users\Malin\Documents\GitHub\malinmnnikk.github.io
pollen: rendering preproc & pagetree files in directory C:\Users\Malin\Documents\GitHub\malinmnnikk.github.io
pollen: from cache /styles.css
pollen: from cache /XX.html
pollen: from cache /YY.html
pollen: from cache /ZZ.html

This showcases that the cache was used, meaning that no changes were detected and my website still has a link to the last AA.html file.

Thank you for Pollen - it is a joy to work with!

I found a potential bug with pollen when editing a .ptree file and then rendering a project in the command line. I started with 4 filenames in my index.ptree file, and wanted to remove the last one, the files were XX.html, YY.html, ZZ.html and AA.html of which I removed AA.html. After saving I called `raco pollen render` expecting it to make the changes in file ZZ, which had a link to file AA and now should not have one. Instead pollen did not detect any changes in these files and therefore used the cache, leading to the output generating no change at all. The ZZ file still has a functioning link to the AA file which also shows up nicely like it was still part of the .ptree file. I am using a template.html.p file for the links between the files mentioned here. ```html <html> <head> <meta charset= "UTF-8"> <title>◊(select 'h1 doc), by MM</title> <link rel="stylesheet" type="text/css" href="styles.css"/> </head> <body>◊(->html doc) You are here: ◊|here|. ◊(define prev-page (previous here)) ◊when/splice[prev-page]{Previously you were here: <a href="◊|prev-page|">◊|prev-page|</a>.} ◊(define next-page (next here)) ◊when/splice[next-page]{Go to the next post here: <a href="◊|next-page|">◊|next-page|</a>.} </body> </html> ``` I am going to go around this problem for now by deleting the compiled directory (no more cache), but would like to know if this is a bug or if I am doing something wrong. ``` C:\Users\Malin>raco pollen render C:\Users\Malin\Documents\GitHub\malinmnnikk.github.io pollen: rendering preproc & pagetree files in directory C:\Users\Malin\Documents\GitHub\malinmnnikk.github.io pollen: from cache /styles.css pollen: from cache /XX.html pollen: from cache /YY.html pollen: from cache /ZZ.html ``` This showcases that the cache was used, meaning that no changes were detected and my website still has a link to the last AA.html file. Thank you for Pollen - it is a joy to work with!
MalinMnnikk commented 5 years ago (Migrated from github.com)

Forgot to mention I'm using Pollen version 1.5.1972.1114 on Windows 10.0.17134.

Forgot to mention I'm using Pollen version 1.5.1972.1114 on Windows 10.0.17134.
mbutterick commented 5 years ago (Migrated from github.com)

This behavior is intentional. From Making a pagetree file:

Pagetrees don’t change as often as other source files, so as a performance optimization, the project server ignores them when deciding whether to refresh a file. Thus, after updating a pagetree, you have to manually reset your project [with raco pollen reset, which will delete the cache files]

Sometimes, at an early stage in a project, it’s more convenient to disable the caching so that you’re guaranteed of fresh updates. This is a little slower, of course.

This behavior is intentional. From [Making a pagetree file](https://docs.racket-lang.org/pollen/second-tutorial.html#%28part._tutorial-2._.Making_a_pagetree_file%29): > Pagetrees don’t change as often as other source files, so as a performance optimization, the project server ignores them when deciding whether to refresh a file. Thus, after updating a pagetree, you have to manually reset your project [with `raco pollen reset`, which will delete the cache files] Sometimes, at an early stage in a project, it’s more convenient to [disable the caching](https://docs.racket-lang.org/pollen/Cache.html) so that you’re guaranteed of fresh updates. This is a little slower, of course.
MalinMnnikk commented 5 years ago (Migrated from github.com)

Thanks for the answer - the clarification is useful.
Closing.

Thanks for the answer - the clarification is useful. Closing.
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#193
Loading…
There is no content yet.