Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract rad remote helper into lib #254

Merged
merged 3 commits into from
Jul 23, 2020
Merged

Conversation

rudolfs
Copy link
Member

@rudolfs rudolfs commented Jul 23, 2020

For the project checkout feature we'll need to package the rad-remote-helper together with Upstream.
For this I looked into the following options:

  1. Forcing Upstream to build the git-helpers binary from its radicle-link dependency, so far seems to be impossible in Cargo:

  2. Change Upstream proxy into a top-level Rust workspace and include radicle-link as a sub-component: not possible because radicle-link is already organized as a workspace and nested workspaces are not allowed:

  3. Make upstream build and package scripts do a cargo install --git https://github.com/radicle-dev/radicle-link.git --rev 269a7ededafd7373ebfb03210770d0b3778002f: blows up build times both for devs and on CI because build artefacts are not shared between proxy and the external cargo install.

  4. Extracting the git-remote-rad functionality into a lib, so we can create a separate binary within Upstream that will be packaged along with proxy.

This PR implements option nr. 4.

FintanH
FintanH previously approved these changes Jul 23, 2020
Copy link
Contributor

@FintanH FintanH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me at least 👍

FintanH
FintanH previously approved these changes Jul 23, 2020
@@ -18,3 +18,81 @@
extern crate radicle_keystore as keystore;

pub mod credential;
Copy link
Contributor

@cloudhead cloudhead Jul 23, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of putting this code here, I'd suggest:

  • Adding pub mod remote_helper here
  • Creating a remote_helper.rs file and moving this code into that file
  • Renaming the run_rad_remote_helper function to run
  • Invoking the function from main with remote_helper::run()

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@FintanH FintanH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good shout @cloudhead, this looks better organised now 🙌

Copy link
Contributor

@cloudhead cloudhead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 👍

@rudolfs rudolfs merged commit 55cd394 into master Jul 23, 2020
@rudolfs rudolfs deleted the rudolfs/extract-helper-to-lib branch July 23, 2020 13:42
@FintanH FintanH mentioned this pull request Sep 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants