Git Product home page Git Product logo

Comments (4)

StealthyKamereon avatar StealthyKamereon commented on June 4, 2024

Possibly shares subjects with #5376 but is not exactly the same problem.

from cargo.

epage avatar epage commented on June 4, 2024

However I use this crate as part of a workspace. So I also put the previous config.toml in my workspace .cargo/config.toml.

So it sounds like you have

workspace/
  Cargo.toml
  .cargo/config.toml
  crateA/
    .cargo/config.toml
    Cargo.toml

Is that right?

is there a reason you do both configs, rather than just the workspace config?

As for de-duplicating, to do that would require us to have knowledge of rustc's CLI

  • To detect related names for arguments (short and long forms, aliases)
  • To know when -abc is -a -b -c or -a bc
  • To properly handle multiple values for an argument

Most CLIs are not written in a way to be able to reuse the same definition for parsing as de-duplicating, so we'd have to fork their CLI and keep it in sync.

from cargo.

StealthyKamereon avatar StealthyKamereon commented on June 4, 2024

So it sounds like you have

workspace/
  Cargo.toml
  .cargo/config.toml
  crateA/
    .cargo/config.toml
    Cargo.toml

Exactly.

is there a reason you do both configs, rather than just the workspace config?

The crateA is versionned in its own git and I would like users to keep being able to just pull and run instead of having to mess with cargo config.

As for de-duplicating, to do that would require us to have knowledge of rustc's CLI

I understand that what I'm asking is far from trivial ☚ī¸ But at the same time it's super weird to see cargo rebuild all the crate because having multiple times the same flag (or even just not in the same order) is considered different.

from cargo.

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.