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

Initial package organization for garden builds #44

Merged
merged 7 commits into from
Feb 13, 2023

Conversation

mjcarroll
Copy link
Collaborator

No description provided.

Signed-off-by: Michael Carroll <[email protected]>
Signed-off-by: Michael Carroll <[email protected]>
@mjcarroll mjcarroll mentioned this pull request Feb 9, 2023
33 tasks
README.md Outdated Show resolved Hide resolved
example/bazel.repos Show resolved Hide resolved
example/bazelproject.example Outdated Show resolved Hide resolved
lint/buildifier-tables.json Outdated Show resolved Hide resolved
lint/buildifier-tables.json Outdated Show resolved Hide resolved
Signed-off-by: Michael Carroll <[email protected]>
README.md Outdated Show resolved Hide resolved
Copy link

@iche033 iche033 left a comment

Choose a reason for hiding this comment

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

went through the README instructions and they worked fine for me

@mjcarroll
Copy link
Collaborator Author

It is generally going to be easier to keep the license BSD-3-Clause to match the upstream drake implementation I am using as the basis of our new implementation. I have changed the license and added a credit in the readme to reflect this.

@mjcarroll mjcarroll force-pushed the mjcarroll/init_garden branch 18 times, most recently from 604a613 to 1669054 Compare February 9, 2023 22:34
@mjcarroll mjcarroll force-pushed the mjcarroll/init_garden branch 18 times, most recently from 6751ba0 to e07723d Compare February 10, 2023 03:04

```
wget https://raw.githubusercontent.com/ignitionrobotics/ign-bazel/master/example/bazel.repos
wget https://raw.githubusercontent.com/gazebosim/gz-bazel/garden/example/bazel.repos
Copy link
Contributor

Choose a reason for hiding this comment

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

What file should I use? This link doesn't work, and I tried https://github.com/gazebosim/gz-bazel/pull/43/files#diff-b3c5fb2260c8de45c8de2a1b0170ffd91e9136b9e81a774595ce0be17dd1a374, but it's missing the gz-bzel repo and when I try to include it I get the following build errors:

ERROR: /home/nkoenig/gz/msgs/BUILD.bazel:94:17: no such package '@com_google_protobuf//': The repository '@com_google_protobuf' could not be resolved: Repository '@com_google_protobuf' is not defined and referenced by '//msgs:gzmsgs_cc_proto'
ERROR: /home/nkoenig/gz/msgs/BUILD.bazel:94:17: every rule of type _gz_msgs_generate_gen implicitly depends upon the target '@com_google_protobuf//:protoc', but this target could not be found because of: no such package '@com_google_protobuf//': The repository '@com_google_protobuf' could not be resolved: Repository '@com_google_protobuf' is not defined
ERROR: Analysis of target '//msgs:gzmsgs_cc_proto' failed; build aborted: Analysis failed

Copy link
Collaborator Author

@mjcarroll mjcarroll Feb 10, 2023

Choose a reason for hiding this comment

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

Ah, there is probably a bit of a chicken-and-egg problem here. gazebosim/gz-bazel/garden/example/bazel.repos will be valid when this PR is merged.

For now, I am cloning the gz-bazel repo separately to get the right branch, since it is the one changing the most frequently. CI also assumes that gz-bazel is checked out separately (because actions will always do that) and then copied into the workspace.

This PR (and the sequence that follows it for each package) is intended to replace #43, that one can be ignored.

For now, do

cd ~/gz
git clone https://github.com/gazebosim/gz-bazel bazel -b mjcarroll/init_garden

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Additionally, this PR is only setting up the CI and the initial stuff we need to build the bazel package. The ones on top actually build up the gazebo packages.

@mjcarroll mjcarroll mentioned this pull request Feb 10, 2023
README.md Outdated Show resolved Hide resolved
Copy link

@iche033 iche033 left a comment

Choose a reason for hiding this comment

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

just one minor comment, otherwise looks good to me

@nkoenig
Copy link
Contributor

nkoenig commented Feb 11, 2023

I'm getting the following errors when running bazel build //...

Starting local Bazel server and connecting to it...
ERROR: /home/nkoenig/gz/msgs/BUILD.bazel:94:17: no such package '@com_google_protobuf//': The repository '@com_google_protobuf' could not be resolved: Repository '@com_google_protobuf' is not defined and referenced by '//msgs:gzmsgs_cc_proto'
ERROR: /home/nkoenig/gz/msgs/BUILD.bazel:94:17: every rule of type _gz_msgs_generate_gen implicitly depends upon the target '@com_google_protobuf//:protoc', but this target could not be found because of: no such package '@com_google_protobuf//': The repository '@com_google_protobuf' could not be resolved: Repository '@com_google_protobuf' is not defined
ERROR: Analysis of target '//msgs:gzmsgs_cc_proto' failed; build aborted: Analysis failed
INFO: Elapsed time: 2.151s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (76 packages loaded, 838 targets c\
onfigured)

@mjcarroll
Copy link
Collaborator Author

ERROR: Analysis of target '//msgs:gzmsgs_cc_proto' failed; build aborted: Analysis failed

For this PR, you shouldn't have msgs. The only repo here should be gz/bazel

Signed-off-by: Michael Carroll <[email protected]>
@mjcarroll mjcarroll merged commit 2a1c81d into master Feb 13, 2023
@mjcarroll mjcarroll deleted the mjcarroll/init_garden branch February 13, 2023 13:52
@nkoenig
Copy link
Contributor

nkoenig commented Feb 13, 2023

I'm getting the following errors when running bazel build //...

Starting local Bazel server and connecting to it...
ERROR: /home/nkoenig/gz/msgs/BUILD.bazel:94:17: no such package '@com_google_protobuf//': The repository '@com_google_protobuf' could not be resolved: Repository '@com_google_protobuf' is not defined and referenced by '//msgs:gzmsgs_cc_proto'
ERROR: /home/nkoenig/gz/msgs/BUILD.bazel:94:17: every rule of type _gz_msgs_generate_gen implicitly depends upon the target '@com_google_protobuf//:protoc', but this target could not be found because of: no such package '@com_google_protobuf//': The repository '@com_google_protobuf' could not be resolved: Repository '@com_google_protobuf' is not defined
ERROR: Analysis of target '//msgs:gzmsgs_cc_proto' failed; build aborted: Analysis failed
INFO: Elapsed time: 2.151s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (76 packages loaded, 838 targets c\
onfigured)

Ahh, I see. thanks.

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