Coder Social home page Coder Social logo

Comments (7)

andrewdavidmackenzie avatar andrewdavidmackenzie commented on June 10, 2024

Looking for spec details:
https://doc.rust-lang.org/cargo/reference/manifest.html#the-workspace-section

Determining if part of workspace, and which:

"The package.workspace manifest key (described above) is used in member crates to
point at a workspace's root crate. If this key is omitted then it is inferred to
be the first crate whose manifest contains [workspace] upwards in the filesystem."

         The Cargo.toml (found walking up the FS) could now have a workspace.exclude entry
         for this crate, meaning that this crate does not below to a workspace.

"Note that members of the workspaces listed explicitly will also have their path
dependencies included in the workspace"

QUESTION: If no workspace root directory is specified by the package.workspace key
do we just look in the parent directory for a Cargo.toml defining a workspace we belong
to, or do we have to walk up the file system until "/" to see if we can find a
Cargo.toml?

from cargo-bundle.

mdsteele avatar mdsteele commented on June 10, 2024

If I'm understanding cargo's behavior correctly, I think we have to walk all the way up the file system.

from cargo-bundle.

andrewdavidmackenzie avatar andrewdavidmackenzie commented on June 10, 2024

Yes, it looks like it. Looks like there can be empty directories between current directory and the workspace's root folder....so you need to walk all the way up until you find a Cargo.toml, then you can stop even if it doesn't declare a workspace.

from cargo-bundle.

andrewdavidmackenzie avatar andrewdavidmackenzie commented on June 10, 2024

See #47

from cargo-bundle.

andrewdavidmackenzie avatar andrewdavidmackenzie commented on June 10, 2024

@mdsteele any comments on the PR?
Prospects of merging (a cleaned up) version of it?

from cargo-bundle.

andrewdavidmackenzie avatar andrewdavidmackenzie commented on June 10, 2024

We can close this issue now, no?

A release with support for workspaces would be great now, and then I'd work on the original need to bundle resources from libs....

from cargo-bundle.

mdsteele avatar mdsteele commented on June 10, 2024

Thanks, I just published v0.3.0 with the latest changes.

from cargo-bundle.

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.