GithubHelp home page GithubHelp logo

curvc does not find std.curv about curv HOT 7 CLOSED

curv3d avatar curv3d commented on May 21, 2024
curvc does not find std.curv

from curv.

Comments (7)

doug-moen avatar doug-moen commented on May 21, 2024

I have confirmed the bug. Now considering how to fix the code.

from curv.

doug-moen avatar doug-moen commented on May 21, 2024

Seems to work now. Let me know if there is a problem.

from curv.

sebastien avatar sebastien commented on May 21, 2024

Hmm, still not working for me with 6bdaadc93b553545e3c925358ea673b58011925d.

$ curvc /dev/null  
{"error":{"message":"boost::filesystem::canonical: No such file or directory: \"/home/sebastien/Workspace/curved/bin/../lib/std.curv\""}}

I did a make clean just to be sure.

from curv.

sebastien avatar sebastien commented on May 21, 2024

Also, in general it might be good to have a $CURV_PATH, but that might be a separate ticket. Another suggestion is that instead of using lib/std.curv to use lib/curv/std.curv so that every curv lib nicely fits into a curv directory. Right now, curved lib dir has the following entries: components css fonts glsl images js pages pcss py sjs xsl so I could just put a curv directory in there.

from curv.

doug-moen avatar doug-moen commented on May 21, 2024

When I tested this bug fix on Ubuntu, using bash, I had a weird problem. When invoking curvc via the shell command $PATH, I kept getting the old version of the program. I think bash was caching the path to the old version of the executable. When I started a new bash shell, then without any other change, the curvc command from the bash prompt was now using my symlink and running the correct version of the program, and then I verified that the bug fix worked.

I can add the environment variable $CURV_LIBDIR to curvc.
That is the directory that currently contains std.curv, plus curv/*.curv (the library files accessed using lib). This directory normally resolves to /usr/local/lib in a Curv installation.

I agree that a different directory structure would make more sense. How about this:

$CURV_LIBDIR, which normally resolves to /usr/local/lib/curv, is a directory contains std.curv and lib/*.curv (the latter are collectively the lib files).

from curv.

sebastien avatar sebastien commented on May 21, 2024

I'd probably recommend $CURV_PATH instead. In Python, it's $PYTHONPATH, in Go it's $GOPATH, in Ruby it's $GEM_PATH, etc. Later, you might want to have more than one path to resolve the libraries.

And BTW it works now, I think I had another version in my $PATH when I tested. Thanks for the quick fix!

from curv.

doug-moen avatar doug-moen commented on May 21, 2024

$PYTHONPATH is a search path. It is a colon-separated list of directories, similar to $PATH.
$GOPATH is also a search path.
$GEM_PATH is also a search path.

Search paths are one possible design for how a package manager finds a named package. I do not want to use that design for package management in Curv. I don't want a CURV_PATH.

I will close this bug, since the problem is resolved. Open another issue if you later want an environment variable.

from curv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.