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

Local dependencies outside the project aren't transferred to the host #12

Open
kirillt opened this issue Feb 25, 2020 · 2 comments · May be fixed by #21
Open

Local dependencies outside the project aren't transferred to the host #12

kirillt opened this issue Feb 25, 2020 · 2 comments · May be fixed by #21
Labels
enhancement New feature or request

Comments

@kirillt
Copy link

kirillt commented Feb 25, 2020

Dependencies which lie in folders outside the project aren't transferred to the building machine.

This case is useful for working with local versions of dependencies, e.g. for debugging. It is possible to just copy outer folder into the project, but sometimes not that easy, e.g. when both projects use workspaces.

Steps to reproduce:

$ cargo init main
$ cargo init dep
$ echo 'dep = { path = "../dep" }' >> main/Cargo.toml
$ cd main/
$ cargo build
   Compiling main v0.1.0 (/home/kirill/Code/Parity/tmp/main)
    Finished dev [unoptimized + debuginfo] target(s) in 0.23s
$ cargo remote -r build-host -- build
2020-02-25 15:59:13,538 INFO  [cargo_remote] Project dir: "/home/kirill/Code/Parity/tmp/main"
2020-02-25 15:59:13,538 INFO  [cargo_remote] Transferring sources to build server.
            501 100%   36.01kB/s    0:00:00 (xfr#3, to-chk=0/5)
2020-02-25 15:59:13,751 INFO  [cargo_remote] Build ENV: "RUST_BACKTRACE=1"
2020-02-25 15:59:13,751 INFO  [cargo_remote] Environment profile: "/etc/profile"
2020-02-25 15:59:13,751 INFO  [cargo_remote] Build path: "~/remote-builds/18053543074719935937/"
2020-02-25 15:59:13,751 INFO  [cargo_remote] Starting build process.
info: using existing install for 'stable-x86_64-unknown-linux-gnu'
info: default toolchain set to 'stable-x86_64-unknown-linux-gnu'

  stable-x86_64-unknown-linux-gnu unchanged - rustc 1.41.0 (5e1a79984 2020-01-27)

error: failed to load source for a dependency on `dep`

Caused by:
  Unable to update /home/kirillt/remote-builds/dep

Caused by:
  failed to read `/home/kirillt/remote-builds/dep/Cargo.toml`

Caused by:
  No such file or directory (os error 2)
Connection to 192.168.2.5 closed.
2020-02-25 15:59:14,025 INFO  [cargo_remote] Transferring Cargo.lock file back to client.
              0   0%    0.00kB/s    0:00:00 (xfr#0, to-chk=0/1)
@sgeisler sgeisler added the enhancement New feature or request label Feb 25, 2020
@sgeisler
Copy link
Owner

Great idea! It should be possible to find out all local dependencies of a project, in the worst case one could just parse the Cargo.toml. If you are interested in this feature feel free to open a PR that introduces this feature behind a flag and/or config option, so it won't be used accidentally.

@devanshu0987
Copy link

Was this issue solved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants