facebookincubator / reindeer

Reindeer is a tool to transform Rust Cargo dependencies into generated Buck build rules
MIT License
184 stars 30 forks source link

Workspace support has broken the example and it's unclear how to proceed #27

Closed thoughtpolice closed 10 months ago

thoughtpolice commented 1 year ago

After #22 was implemented (in f2145de5d93c396b89b7f57a6fc995fa56c48107), I'm confused on how to update my Cargo.toml in order to work with reindeer buckify anymore. Absolutely everything I have tried results in the following error:

[ERROR reindeer] parsing metadata

    Caused by:
        0: deserializing json
        1: missing field `workspace_default_members` at line 1 column 40613

This exact same error occurs when you attempt to run reindeer buckify on the given examples/ directory Cargo.toml as well. I tried splitting and putting things in workspaces.default-members and several other things; nothing has changed this error at all.

The version of Reindeer is from Nixpkgs; it was built as of commit 7ab6fc86006c3a9c7d46775d23474f86b1d29881.

dtolnay commented 1 year ago

Are you using an old cargo? workspace_default_members has been present since 1.71.

thoughtpolice commented 1 year ago

Oh, I was using 1.70, which would explain it then. I can upgrade and try again.

dtolnay commented 1 year ago

Great! Alternatively we'd take a PR to make it work with 1.70 too.

thoughtpolice commented 1 year ago

I've tested it, and moving to 1.71 does indeed fix it with no changes to Cargo.toml! Thanks for that.

As for closing this and moving forward, I could try to submit a PR to make it work with previous versions, but I'm rather busy right now and may not have time for it; in the meantime it might also be good to warn in the README at least that you need a recent Cargo.