• Lukas Piatkowski's avatar
    cargo_from_buck: add the patch section to Cargo workspace and allow workspace... · f6d0e220
    Lukas Piatkowski authored
    cargo_from_buck: add the patch section to Cargo workspace and allow workspace appending to existing manifest
    
    Summary:
    Two changes here:
    1. The `[patch.crates-io]` section of `third-party/rust/Cargo.toml` is being now copied over to workspaces generated by autocargo for OSS and in the runtime generated Cargo.toml file for cargo-fbcode builds. Without that some projects could be buildable in Buck internally, but not externally on GitHub due to missing patches.
    2. If a `[workspace]` Cargo.toml file is being generated and there is already a generated Cargo.toml file in the same directory then instead of overriding that file the `[workspace]` (and `[patch]`) sections are appended to that Cargo.toml file.
    
    Reviewed By: farnz
    
    Differential Revision: D22023144
    
    fbshipit-source-id: dec54491c36c2ee0ab29eefb722b3eceaef6ffe1
    f6d0e220
rust-shed 722 Bytes