Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support workspace makefile extension when running directly from member directory #410

Closed
sagiegurari opened this issue Apr 12, 2020 · 4 comments
Assignees
Milestone

Comments

@sagiegurari
Copy link
Owner

see bullet 2 from #409

@sagiegurari sagiegurari added this to the 0.30.5 milestone Apr 12, 2020
@sagiegurari sagiegurari self-assigned this Apr 12, 2020
@sagiegurari
Copy link
Owner Author

when running cargo make from member directly, i already know today that its part of a workspace, so i could read that workspace makefile and if it has the automatic extend workspace level makefile env setup, i could trigger that flow.

@sagiegurari
Copy link
Owner Author

This might be more tricky and backfire on users setting their makefile to use different makefile file name or having multiple makefiles in root or just having a root makefile that extends others.
safest way is just have member manually extend using the extend attribute the needed makefile.

closing this one as its more risky then helpful.

@mraerino
Copy link

mraerino commented Jul 3, 2020

seems like because of this, the README might be wrong?

When running cargo make for modules which are part of a workspace, you can automatically have the member crates makefile (even if doesn't exist) extend the workspace level makefile.

@sagiegurari
Copy link
Owner Author

I'll need to rewrite that doc to be more explanatory. the meaning wasn't when running from member crate dir directly, but when invoked as part of a workspace build, the crate has ability to get workspace makefile tasks.

remember, that no one really makes you name the makefile with a specific name so its tricky otherwise.
also if you must run directly from crate dir, you should use extend keyword in crate makefile to point to workspace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants