Coder Social home page Coder Social logo

Comments (13)

mattwparas avatar mattwparas commented on May 28, 2024 1

So in helix I just construct a require statement from the module location, like this:

        let res = guard.run_with_reference(
            cx,
            "*helix.cx*",
            &format!(r#"(require "{}")"#, helix_module_path.to_str().unwrap()),
        );

The biggest thing is that I neglected to remember that 1. windows existed and 2. Steel from what I understand does work agnostically of the paths, but in general if you want the code to be portable there should be a single representation that gets used for referring to modules. At the moment, that representation is just the unix one - so for this I think I can just get away with properly escaping the / in the string when requiring - and then everything from there should work as intended.

Moving forward I'd like to have a windows machine set up so I can test against it every once in a while, but I haven't made the time for that

from steel.

mattwparas avatar mattwparas commented on May 28, 2024 1

latest commit on my fork should have the update which I think will fix this for windows. I can't test it myself just yet, but if you're willing you can give it a shot in the mean time while I get an environment set up in the next few days

from steel.

Borwe avatar Borwe commented on May 28, 2024 1

latest commit on my fork should have the update which I think will fix this for windows. I can't test it myself just yet, but if you're willing you can give it a shot in the mean time while I get an environment set up in the next few days

Works, I can do basic stuff on the fork now on windows, THANKS! I think issue can be closed if you want.

from steel.

mattwparas avatar mattwparas commented on May 28, 2024

Unfortunately I don't have easy access to a windows machine at the moment - for the first one, it looks like I'll have to escape the path which I'm currently not doing.

Per the second one - what are the contents of imp.scm and also test.scm?

from steel.

Borwe avatar Borwe commented on May 28, 2024

test.scm:

(require  (prefix-in impl. "imp.scm"))
(imp.yolo)

imp.scm:

(require "provide.scm")

(define (yolo)
	(displayln "YOLO"))

(provde yolo)

from steel.

mattwparas avatar mattwparas commented on May 28, 2024

Does provide.scm exist?

from steel.

Borwe avatar Borwe commented on May 28, 2024

How do I check if it exists? I thought it is in built to steel, and not one of the cogs we install, or atleast that's the idea I got from looking at the README.md
image

from steel.

mattwparas avatar mattwparas commented on May 28, 2024

Ah I see - this is just an example, where provide.scm is its own file - I was just designating that provide.scm had those contents with that filename.

Can you remove the (require "provide.scm") from your file and also fix the type in (provide yolo) ?

from steel.

Borwe avatar Borwe commented on May 28, 2024

Here is my new imp.scm
image

It now gives the following error when I try run test.scm:
image

from steel.

mattwparas avatar mattwparas commented on May 28, 2024

Just add (provide yolo) at the top of that file (imp.scm)

from steel.

Borwe avatar Borwe commented on May 28, 2024

Works fine now.
image
thanks. So I guess on the helix side is the only issue left?

from steel.

mattwparas avatar mattwparas commented on May 28, 2024

Yeah, I'll take a look there

from steel.

gabydd avatar gabydd commented on May 28, 2024

for the first one, it looks like I'll have to escape the path which I'm currently not doing.

Would the \ have to be escaped by the user not by steel? Or am I reading this weekend

from steel.

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.