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

cc_test is failing #577

Closed
cinemast opened this issue Mar 27, 2019 · 4 comments
Closed

cc_test is failing #577

cinemast opened this issue Mar 27, 2019 · 4 comments

Comments

@cinemast
Copy link

cinemast commented Mar 27, 2019

I get the same error as here: https://circleci.com/gh/thought-machine/please-examples/22.

///third_party/cc/unittest_cpp//:unittest_cpp depends on //third_party/cc:all, but the directory third_party/cc doesn't exist
    ///third_party/cc/unittest_cpp//:unittest_cpp
///third_party/cc/unittest_cpp//:unittest_cpp depends on //third_party/cc:all, but the directory third_party/cc doesn't exist

Does someone have an insight on that?

@peterebden
Copy link
Member

OK took a bit of investigation (sorry for the slow reply)... the issue is to do with fetching the unittest runner from a subrepo, and it trying to depend on another subrepo there.

Thinking about how we should best handle this, will see what I can come up with.

peterebden added a commit that referenced this issue Apr 11, 2019
If a subrepo defines a dependency on a subrepo of its own in a package that we have at the top level (as described in #577) then we don't find it (we already do have a fork for when that does not exist at the top level).
This lets the top-level repo override it but if it's not specified we can still find it.
@peterebden
Copy link
Member

Okay, the above should solve I think; it will fall back to looking in the appropriate place.

@macripps
Copy link
Collaborator

Marking as resolved - if this still occurs, please reopen.

@cpg314
Copy link

cpg314 commented Feb 13, 2021

It seems like this happens (latest release):

  • please init in a new folder.
  • BUILD file with content
github_repo(
  name = "pleasings",
  repo = "thought-machine/pleasings",
  revision = "master",
)
cc_test(
    name="test",
    srcs=["test.cpp"],
)

  • test.cpp file with only a main.

Then:

$ please run :test
Build stopped after 60ms. 1 target failed:
    ///third_party/cc/unittest_cpp//:unittest_cpp
///third_party/cc/unittest_cpp//:unittest_cpp depends on //third_party/cc:all, but the directory third_party/cc doesn't exist: third_party/cc

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

No branches or pull requests

4 participants