nixin72 / from-template

Raco tool for cloning templates from the racket-templates org
MIT License
8 stars 4 forks source link

From-template failing on Windows #12

Closed spdegabrielle closed 2 years ago

spdegabrielle commented 2 years ago

Identified here https://github.com/racket-tw/sauron/issues/174#issuecomment-966851572

Will attempt to replicate

dannypsnl commented 2 years ago

and Linux, FYI https://github.com/racket-tw/sauron/issues/174#issuecomment-966851572

spdegabrielle commented 2 years ago

reproduced on windows 10

Microsoft Windows [Version 10.0.19043.1288]
(c) Microsoft Corporation. All rights reserved.

C:\Users\stde\Documents\New folder (3)>raco new gui-app
ffi-lib: could not load foreign library
  path: libedit-3.dll
  system error: The specified module could not be found.; win_err=126
  context...:
   C:\Program Files\Racket\collects\ffi\unsafe.rkt:131:0: get-ffi-lib
   body of "C:\Program Files\Racket\share\pkgs\readline-lib\readline\rktrl.rkt"
   C:\Program Files\Racket\collects\raco\raco.rkt:41:0
   body of "C:\Program Files\Racket\collects\raco\raco.rkt"
   body of "C:\Program Files\Racket\collects\raco\main.rkt"

C:\Users\stde\Documents\New folder (3)>
spdegabrielle commented 2 years ago

confirmed working OK on macOS

spdegabrielle@Miriams-MacBook-Pro from-template-testing % raco new gui-app
gui-app
/Users/spdegabrielle/Dev/from-template-testing/
Cloning into 'gui-app'...
remote: Enumerating objects: 36, done.
remote: Counting objects: 100% (36/36), done.
remote: Compressing objects: 100% (30/30), done.
remote: Total 36 (delta 15), reused 12 (delta 3), pack-reused 0
Unpacking objects: 100% (36/36), done.
spdegabrielle@Miriams-MacBook-Pro from-template-testing % 
spdegabrielle commented 2 years ago

@soapdog & @nixin72 are you able to look at this on Windows and Linux respectively?

Just install (if not already) and create a new package from a template, and post the error back here.

raco pkg install from-template
raco new gui-app

(I think this is readline or the windows equivalent but I'm guessing at this stage.)

spdegabrielle commented 2 years ago

Hi @smallfont00

Are you able to test the change in PR #14 ?

I made the PR based your note:

Have you guys tested "from-template" on Linux? The path of "from-template.sh" can't be resolved in my Ubuntu. I have changed the source code of "from-template" and found out define-runtime-path is necessarily for my Ubuntu.

https://github.com/racket-tw/sauron/issues/174#issuecomment-966851572

PR #14 changes from-template to use (define-runtime-path linux-script "from-template.sh")

Thanks again for your support in this.

best regards.

Stephen

smallfont00 commented 2 years ago

@spdegabrielle Sure. It works. https://github.com/nixin72/from-template/pull/14#issuecomment-966959085

spdegabrielle commented 2 years ago

Many thanks to @smallfont00 for testing #14 - PR #14 has been merged and the linux issue has been resolved.

The windows issue remains

otherjoel commented 2 years ago

Tried on Windows 10 just now.

PS C:\Users\Joel\Documents> raco new
ffi-lib: could not load foreign library
  path: libedit-3.dll
  system error: The specified module could not be found.; win_err=126
  context...:
   C:\Program Files\Racket\collects\ffi\unsafe.rkt:131:0: get-ffi-lib
   body of "C:\Program Files\Racket\share\pkgs\readline-lib\readline\rktrl.rkt"
   C:\Program Files\Racket\collects\raco\raco.rkt:41:0
   body of "C:\Program Files\Racket\collects\raco\raco.rkt"
   body of "C:\Program Files\Racket\collects\raco\main.rkt"
spdegabrielle commented 2 years ago

thanks @otherjoel I need to go through this on windows tonight. Maybe I should stream to discord!

nixin72 commented 2 years ago

Hey, thanks @spdegabrielle for handling a lot on this project lately! Are you able to help with a fix for Windows? I don't have a windows machine I can test on.

spdegabrielle commented 2 years ago

Hey, thanks @spdegabrielle for handling a lot on this project lately! Are you able to help with a fix for Windows? I don't have a windows machine I can test on.

Yes. It appears to be a problem with the readline lib on windows - it happens with (require readline/readline), but not (require readline).

(c) Microsoft Corporation. All rights reserved.

C:\Users\stde\Downloads\test22>racket readline-test.rkt
ffi-lib: could not load foreign library
  path: libedit-3.dll
  system error: The specified module could not be found.; win_err=126
  context...:
   C:\Program Files\Racket\collects\ffi\unsafe.rkt:131:0: get-ffi-lib
   body of "C:\Program Files\Racket\share\pkgs\readline-lib\readline\rktrl.rkt"

C:\Users\stde\Downloads\test22>type readline-test.rkt
#lang racket/base
(require readline/readline)

C:\Users\stde\Downloads\test22>

Logged as https://github.com/racket/racket/issues/4064

spdegabrielle commented 2 years ago

@nixin72 how do you feel about me removing the lovely interactive stuff? (temporarily)

nixin72 commented 2 years ago

Yea, that sounds like a good idea.

spdegabrielle commented 2 years ago

Created branch readline-archive so this functionality can be recovered when the bug is resolved.

spdegabrielle commented 2 years ago

fixed by #17