timonv / vim-cargo

Rust Cargo command bindings
MIT License
56 stars 11 forks source link

Add super versions of cargo commands #3

Open ideasman42 opened 8 years ago

ideasman42 commented 8 years ago

This searches up the parent directories for the 'outer' most Cargo.toml, useful for building the entire project from a nested crate.


Note that I had problems using this plugin as-is.

The paths as reported in the quickfix window were relative to the Cargo.toml, not the pwd.

While the build worked, cycling through the errors didn't open the proper files.

This PR passes the Cargo.toml location to cargo, and adds support for building the parent-most Cargo.toml, which I needed when using creates in subdirectories of other crates.

timonv commented 7 years ago

I've yet to see a project where toml's are nested, do you have an example? I usually just work with different versioned crates. Also, I could imagine that if your build pipeline is that complex, you might need a Makefile.

ideasman42 commented 7 years ago

For an example see: https://gitlab.com/ideasman42/raster-retrace/tree/master this is something supported by Cargo for quite some time.

timonv commented 7 years ago

Looks good to me! Just needs the conflicts resolved.