What is the process to 'vendor' third party dependencies? #387
-
When using bazel, I would often use |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
https://github.com/dtolnay/cxx/blob/f4453bc6bda5742a804732e3212c284272374623/third-party/BUCK has an example of Git dependencies are supported a very similar way, using https://buck2.build/docs/api/rules/#git_fetch. Buck2 itself uses them. You can run For vendoring, using https://github.com/dtolnay/cxx as an example, you can run |
Beta Was this translation helpful? Give feedback.
https://github.com/dtolnay/cxx/blob/f4453bc6bda5742a804732e3212c284272374623/third-party/BUCK has an example of
http_archive
. You can rungit submodule update --init
followed bybuck2 build //third-party:
in that repository to try it out.Git dependencies are supported a very similar way, using https://buck2.build/docs/api/rules/#git_fetch. Buck2 itself uses them. You can run
reindeer buckify
in this directory and you'll see the generated BUCK file contains some, corresponding to this and this git dependency. (Reindeer: https://github.com/facebookincubator/reindeer.)For vendoring, using https://github.com/dtolnay/cxx as an example, you can run
cargo vendor --versioned-dirs --locked > .ca…