Giter Club home page Giter Club logo

Comments (6)

MrTanoshii avatar MrTanoshii commented on August 23, 2024 1

Are you looking for a custom copy_dir or just a lock-in copy of https://github.com/webdesus/fs_extra/blob/master/src/dir.rs ?

Also do you want to keep the error codes of fs_extra or use IOError from https://github.com/cnpryer/huak/blob/master/src/huak/errors.rs for every error?

Note: I sent you a friend request on Discord.

from huak.

cnpryer avatar cnpryer commented on August 23, 2024

tag @GearBoxFox

from huak.

cnpryer avatar cnpryer commented on August 23, 2024

I don't think i can assign unless you're participating in this issue.

from huak.

cnpryer avatar cnpryer commented on August 23, 2024

Noting this as unassigned.

from huak.

cnpryer avatar cnpryer commented on August 23, 2024

Are you looking for a custom copy_dir or just a lock-in copy of https://github.com/webdesus/fs_extra/blob/master/src/dir.rs ?

IIRC we're only using copy_dir to copy a mock project (from resources dir) into a tempdir for tests. We don't need all the configuration or error handling. Just copy all contents from here to here. But...

I don't really want to do this for testing in the future. I'm hoping we can just hardcode tests as needed. As an example, if I want to test the fmt operations we can just hardcode an unformatted python function, serialize it to the tempdir, run, and then assert.

#[test]
fn test_fmt() {
    let py = r#"""\
def some_fn(
):
    pass
"""#;
    write(py, dir.join("mock.py"));
    let res = read(dir.join("mock.py"));
    let ans = r#"""\
def some_fn():
    pass
"""#;
    assert_eq!(res, ans);
}

I might be missing some edge cases. So we probably should wait to do this, but you get my point hopefully. At that point we should be able to rip copy_dir out altogether.

from huak.

cnpryer avatar cnpryer commented on August 23, 2024

Also we have a discord if you want to join that https://discord.gg/St3menxFZT

from huak.

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.