dascandy / evoke

Magic build tool
Apache License 2.0
166 stars 17 forks source link

Allow a build from directly within a repository (component) directory #77

Closed vdeurzen closed 4 years ago

vdeurzen commented 4 years ago

Is your feature request related to a problem? Please describe. Currently I have to run evoke from the parent directory of a component. E.g. if I have a directory layout like:

/path/to/projects/component_a/{src/, include/, tests/} /path/to/projects/component_b/{src/, include/, tests/}

Now I have to run evoke from /path/to/projects for any component that I add. This will also build all components that need to be built, not just the new one. The last point also means that any build failures in those other components will now show up in the output.

Though evoke is very good at caching intermediate build data and this should not generally cause a delay, it is counter intuitive that I cannot run evoke directly within a newly checked out repository (component). I could of course add another directory layer, but this leads to deeper nesting and I would like to avoid having to change my chosen directory layout.

Describe the solution you'd like Running evoke inside a directory that is a component builds the component in-place (creating the artifact directories within this directory). I believe this will be the most unsurprising behaviour. It also puts fewer requirements on project organization for users. Essentially I expect Evoke to do something similar to git (though reversed), it finds the project root and builds it or it finds a set of project roots (each a component) and builds them all, depending on my current working directory.

Describe alternatives you've considered An alternative option would be a flag that tells Evoke to build a single component inside the current directory.

Additional context None.

dascandy commented 4 years ago

Fixed on mainline & integration and unit test included.