arclanguage / anarki

Community-managed fork of the Arc dialect of Lisp; for commit privileges submit a pull request.
http://arclanguage.github.io
Other
1.17k stars 160 forks source link

normalize-path: element within the input path is not a directory or does not exist #175

Closed maluta closed 4 years ago

maluta commented 4 years ago

I'm trying run news apps on a EC2 instance.

Everything goes OK but run-news fails to run.

$ ./run-news 
initializing arc.. (may take a minute)
normalize-path: element within the input path is not a directory or does not exist
  element: /opt/anarki/apps/news/apps
  context...:
   /usr/share/racket/collects/racket/path.rkt:68:14: normalize
   [repeats 1 more time]
    app-start
   eval-one-top12
   /opt/anarki/ac.rkt:1427:0: aload1
   eval-one-top12

Although I can run successfully by changing the path, something like that:

anarki/apps/news$ ../../arc.sh 
initializing arc.. (may take a minute)

To quit:
  arc> (quit)
  (or press ctrl and 'd' at once)
For help on say 'string':
  arc> (help string)
For a list of differences with arc 3.1:
  arc> (incompatibilities)
To run all automatic tests:
  $ ./arc.sh
  arc> (load "tests.arc")

If you have questions or get stuck, come to http://arclanguage.org/forum.
Arc 3.1 documentation: https://arclanguage.github.io/ref.
arc> (load "news.arc")
'()

arc> (nsv)

Someone can help me figure out how to fix that?

Thanks in advance.

akkartik commented 4 years ago

Looking..

akkartik commented 4 years ago

Thanks for the report! I can reproduce it on my laptop. So it has nothing to do with EC2.

I'll fix this in an hour or two. I haven't messed with this repo in a while, so I'm finding my way around again..

akkartik commented 4 years ago

@maluta Could you git pull and try again? Hopefully you're unblocked.

@kennethrapp FYI I deleted some functionality here that seemed to have suffered bitrot. Like I said in the commit, I'd love if you could fix it. No hurry, please take your time :) It just wasn't obvious to me how you would have fixed the discrepancy between the path Arc needs (relative to the repo top-level) and the path that files are actually at (relative to the directory we ask people to run the news app from). Thank you!

kennethrapp commented 4 years ago

Sorry... paths have been causing issues ever since someone decided to move news into its own directory. I thought I had it fixed by having file includes all use a canonical absolute path from the arc install but I guess not.

akkartik commented 4 years ago

:D I'd be totally fine with undoing that decision, if that's easier than the alternatives.

maluta commented 4 years ago

Thanks @akkartik for the quick reply and solution. It worked perfectly. Thanks!