zyrolasting / polyglot

Create websites using any mix of programming languages or workflows 💎
MIT License
78 stars 2 forks source link

polyglot demo: No such file or directory: README.md #44

Open xuchunyang opened 4 years ago

xuchunyang commented 4 years ago

I'm following the Get Started guide. polyglot demo fails. I try reinstalling polyglot but it does not help, there still is no README.md. I am not not sure if I misunderstand anything.

~ $ ~/Library/Racket/7.6/bin/polyglot demo
file-size: cannot get size
  path: /Users/xcy/Library/Racket/7.6/pkgs/polyglot-lib/polyglot/README.md
  system error: No such file or directory; errno=2
  context...:
   /Applications/Racket v7.6/collects/racket/file.rkt:763:0: file->x
   /Users/xcy/Library/Racket/7.6/pkgs/markdown/markdown/parse.rkt:101:0: parse-markdown
   /Users/xcy/Library/Racket/7.6/pkgs/polyglot-lib/polyglot/imperative.rkt:126:0: markdown->dependent-xexpr
   /Users/xcy/Library/Racket/7.6/pkgs/unlike-assets-lib/unlike-assets/private/unlike-compiler.rkt:47:8: loop
   /Applications/Racket v7.6/collects/racket/logging.rkt:43:0
   /Users/xcy/Library/Racket/7.6/pkgs/unlike-assets-lib/unlike-assets/logging.rkt:129:0: with-report
   /Users/xcy/Library/Racket/7.6/pkgs/polyglot-lib/polyglot/private/cli/demo.rkt:12:0: demo
   (submod "/Users/xcy/Library/Racket/7.6/pkgs/polyglot-lib/polyglot/private/cli/entry.rkt" main): [running body]
   temp35_0
   for-loop
   run-module-instance!

~ $ ls /Users/xcy/Library/Racket/7.6/pkgs/polyglot-lib/polyglot
base.rkt       compiled       functional.rkt info.rkt       paths.rkt      projects.rkt
builds.rkt     elements.rkt   imperative.rkt main.rkt       private        txexpr.rkt
~ $
j-maas commented 4 years ago

I'm having the same problem on Windows 10. It expects the README to be at path C:\Users\y0hy0h\AppData\Roaming\Racket\7.6\pkgs\polyglot-lib\polyglot\README.md, but there is no such file. I couldn't find it in the polyglot or polyglot-doc folders either.

I assume that it is somehow not included anymore.

As a workaround you can create the README at that location, copying the contents, and then run raco polyglot demo again. On Windows, I had to use a cmd as Administrator, because otherwise it complained about not being allowed to create links. But it has worked that way.

zyrolasting commented 4 years ago

I suspect this is due to a missing copy-shared-files binding in info.rkt, but I need to confirm that. Interesting that this doesn't seem to happen on Linux systems. Will have addressed by 2.9.

Another workaround: copy the README.md into an assets directory of your own project and run it using the default config.

zyrolasting commented 4 years ago

245021b28c353e3f898c36de2bbeaa3d3481388b should address this. Leaving issue open in case problem reproduces after the catalog updates.