Git Product home page Git Product logo

Comments (5)

stevepentland avatar stevepentland commented on August 30, 2024 2

Thanks for pointing this one out! It seems a case that has been both missed during my changes and before that time also. I have fixed the issue and tested using a copy of your specific project also and can report success. Once the PR merges you should be good to update and go.

from diamond_drops.

ChosunOne avatar ChosunOne commented on August 30, 2024

A workaround is to change the parser.rs file line 7 to:
use std::os::windows::ffi::OsStrExt;
and add the line:
use osstringext::OsStrExt3;
after it. This will fix the build errors but will leave you with a nonstandard version of clap.

from diamond_drops.

jamesray1 avatar jamesray1 commented on August 30, 2024

So that we don't have to configure this manually, try:

#[cfg(not(target_os = "windows"))]
use std::os::unix::ffi::OsStrExt;
#[cfg(target_os = "windows")]
use osstringext::OsStrExt3;

From https://github.com/kbknapp/clap-rs/pull/1190/files#diff-3519f1369b63436798d9d7841c7940e2R672.

from diamond_drops.

jamesray1 avatar jamesray1 commented on August 30, 2024

Alternatively we could use https://github.com/kbknapp/clap-rs#optional-dependencies--features:

[dependencies.clap]
version = "2.31"
default-features = false

# Cherry-pick the features you'd like to use
features = [ "suggestions", "vec_map" ]

from diamond_drops.

ChosunOne avatar ChosunOne commented on August 30, 2024

The alternative method still doesn't build, but reintroducing the target checks in parser.rs of clap fixes the issue. We should raise an issue with clap about this.

from diamond_drops.

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.