GithubHelp home page GithubHelp logo

Workspace support about cargo-make HOT 5 CLOSED

sagiegurari avatar sagiegurari commented on May 22, 2024
Workspace support

from cargo-make.

Comments (5)

sagiegurari avatar sagiegurari commented on May 22, 2024

Totally agree. If you look in the project tab i already have a task there in the todo column to disable this using cli flag so you can decide when to use it or not.
I think that is best solution.
What do you think?

from cargo-make.

theduke avatar theduke commented on May 22, 2024

I think both should work simultaneously.

For example, I might want to build and test all crates, create a binary distribution for the main crate and upload it somewhere, or zip the entire workspace and do something with it.

I think I'd prefer this:

main: Makefile.toml

[tasks.a_task_run_on_some_members]
workspace_members = ["crate_a", "crate_b"]

[tasks.a_task_run_on_all_members]
workspace_members = "*"

[tasks.task_in_root]
script = "tar cvzf all.tar.gz *"
dependencies = ["a_task_run_on_all_members"]

I'd prefer explicitly enabling the recursive behaviour.

from cargo-make.

sagiegurari avatar sagiegurari commented on May 22, 2024

So you are talking about a flow that runs tasks on workspace level and on members level.
thats a nice flow, and I guess you could do something like this to implement it (once i implement the cli flag today/tommorrow)

#this is the makefile in the workspace level (root crate)
[tasks.composite]
dependencies = ["member_flow", "workspace_flow"]

[tasks.member_flow]
command = "cargo"
args = ["make", "sometask"]

[tasks.workspace_flow]
#some tasks that should run on workspace level

and than run the whole thing by writing:

cargo make --noworkspace composite

Makes sense? very simple to define and use i think, and if someone reads it, it is simple to see what it actually does.
and no need to redefine the members in both makefile.toml and cargo.toml.
what do you think?

from cargo-make.

sagiegurari avatar sagiegurari commented on May 22, 2024

Checkout version 0.3.25 with the new --no-workspace cli arg.

workspace support

CLI Options

I hope it provides the needed tools to build the flow you need, if not please tell me what you think is still needed.

from cargo-make.

theduke avatar theduke commented on May 22, 2024

@sagiegurari cool stuff.

I'll try it out soon, but I think it suits my purposes.

from cargo-make.

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.