Caching failed when doing setup on a subfolder?

17 views
Skip to first unread message

Joel Dueck

unread,
Jul 7, 2019, 9:05:27 PM7/7/19
to Pollen
Today in prep for the upcoming week I’ve updated to Racket 7.3 and the latest Pollen (though I had updated since Matthew fixed the parallel rendering bug, so the one I had may have already been the latest) and now I’m having a strange problem.

To illustrate:
  1. `mkdir -p test/subfolder && cd subfolder`
  2. `echo "#lang racket\n\n" > pollen.rkt
  3. `echo "#lang pollen\n\n◊h1{Hello}" > test1.poly.pm`
  4. `cp test.poly.pm subfolder/test2.poly.pm`
Now do `raco pollen setup`:

pollen: preheating cache ...
pollen: caching: subfolder/test2.poly.pm
pollen: caching: test1.poly.pm

…so far so good. But when I do `raco pollen setup subfolder/`:

pollen: preheating cache ...
pollen: caching: test2.poly.pm
pollen: caching failed: test2.poly.pm

Seems like I can’t run setup on a subfolder? Note that I can do `raco pollen render subfolder/test2.html` with success.

Now, when I initially installed 7.3 I used DrRacket to auto-migrate all my packages from 7.2. Since running into this problem, thinking perhaps there was some bytecode/recompile or other version mismatch issue, I’ve deleted both the 7.2 and 7.3 installations from the Applications folder, manually deleted my /Users/joel/Library/Racket folder, then reinstalled Racket 7.3 into my Applications folder and then `raco pkg install pollen`. 

Doing `raco pkg show` currently says:

Installation-wide:
 Package            Checksum             Source
 main-distribution  c1122917ba1e292a...  catalog...tribution
 racket-lib         3844fcf1e76ef3e5...  catalog racket-lib
 [199 auto-installed packages not shown]
User-specific for installation "7.3":
 Package           Checksum             Source
 beautiful-racket  1fe93f59a2466c8f...  catalog...ul-racket
 pollen            939575d5500d560d...  catalog...ollen.git
 [16 auto-installed packages not shown]

 At this point I’m almost ready to try reinstalling Racket 7.2.

Matthew Butterick

unread,
Jul 7, 2019, 10:10:37 PM7/7/19
to Joel Dueck, Pollen
When I follow your example, the test files end up with literal "\n\n" in them:

#lang racket\n\n

#lang pollen\n\n◊h1{Hello}

Which causes the setup to fail.

Joel Dueck

unread,
Jul 7, 2019, 10:34:29 PM7/7/19
to Pollen
Hmm perhaps since I use ZSH as my default shell it is being smart about replacing \n with an actual new line. If you edit the file to match the intent you should be able to reproduce the issue (I hope!)

Joel Dueck

unread,
Jul 7, 2019, 10:37:21 PM7/7/19
to Pollen
To further clarify, the example I posted was just a minimum viable example I cooked up to help reproduce the issue. I’m seeing the same problem in my existing project folders as well.

Joel McCracken

unread,
Jul 7, 2019, 11:24:03 PM7/7/19
to Joel Dueck, Pollen
In bash, you need to use echo -e to interpret escape sequences

Sent from my iPhone

> On Jul 7, 2019, at 10:37 PM, Joel Dueck <dueck...@gmail.com> wrote:
>
> To further clarify, the example I posted was just a minimum viable example I cooked up to help reproduce the issue. I’m seeing the same problem in my existing project folders as well.
>
> --
> You received this message because you are subscribed to the Google Groups "Pollen" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pollenpub+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pollenpub/f2de06b9-fff7-4c77-9227-eab76436f5f3%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Matthew Butterick

unread,
Jul 7, 2019, 11:33:22 PM7/7/19
to Joel Dueck, Pollen
I think there are two problems intersecting:

1) v7.3 seems to have changed something in the way data serialization works, which breaks Pollen's disk caches. That's not supposed to happen, but I guess it did. Anyhow try `raco pollen reset`.

2) I was being sloppy in how I handled paths in the `raco pollen setup` routine, so I've pushed a fix for that.

Joel Dueck

unread,
Jul 8, 2019, 8:48:33 AM7/8/19
to Pollen
Yes, in the existing folders I had done `raco pollen reset` several times throughout the testing process, part of the reason for creating the clean example was to rule out cache problems. (I also neglected to mention `raco pollen reset` was a step I took between the first and second setups in the example.) Anyhow, the new version fixed the problem for me everywhere. Thanks!
Reply all
Reply to author
Forward
0 new messages