Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 16:09
    peterebden opened #788
  • 16:09
    peterebden review_requested #788
  • 15:32
    henryaj opened #787
  • 13:00

    henryaj on master

    Ensure binary rules are made ex… (compare)

  • 13:00
    henryaj closed #784
  • 11:25
    razvanco13 opened #786
  • 10:56

    the-hogfather on v14.1.11

    (compare)

  • 10:53
    henryaj synchronize #784
  • 10:49

    peterebden on master

    14.1.11 (compare)

  • 10:11
    henryaj commented #784
  • 10:11
    henryaj review_request_removed #784
  • Dec 05 18:03

    peterebden on master

    Support extracting xzip in jarc… (compare)

  • Dec 05 18:03
    peterebden closed #785
  • Dec 05 16:33
    peterebden synchronize #785
  • Dec 05 16:12
    henryaj commented #784
  • Dec 05 16:12
    henryaj review_requested #784
  • Dec 05 15:48
    peterebden opened #785
  • Dec 05 12:00
    henryaj synchronize #784
  • Dec 05 10:50
    henryaj synchronize #784
  • Dec 04 17:56
    henryaj commented #784
ʃɐm Wilʃon
@numbsafari_twitter
I was trying to strip that directory from the google-cloud-go rule, and have it also depend on that carve out. However, that means having to go_get rules with a parent-child relationship in their repository paths, which creates a race-condition whereby sometimes the build works and sometimes it doesn't.
I'd say "wouldn't be nice if there was a repo of BUILD files I could just import", but that solution creates the rats nest that got me to abandon Bazel.
ʃɐm Wilʃon
@numbsafari_twitter
I still get the warnings about the two rules writing to the same package location, but at least with this approach, what they both write is the same thing, so I haven't seen the race condition failure after quite a few runs. So I'm thinking the problem is solved.
Tim
@tim-smart
@numbsafari_twitter Do you have an example? I'm having similar issues.
Tim
@tim-smart
Urgh. This whole go dependency thing is fustrating.
ʃɐm Wilʃon
@numbsafari_twitter
Hey Tim, I'm trying to throw together a quick repo that I can share, both to demo how I "got it working" for myself but also to solicit feedback from others in terms of the approach. Will hopefully have a link for you later this evening (I'm on US Eastern time)
ʃɐm Wilʃon
@numbsafari_twitter
I'll say this... working through all the transitive deps for projects like these is a real pain, but it does help drive home exactly how much noise and "surface area" you are pulling into your own system. I can't even imagine doing something like this with, for example, React.
ʃɐm Wilʃon
@numbsafari_twitter
@tim-smart Here's an example of what I ended up doing in order to interact with PubSub in golang https://github.com/numbsafari/plz-examples/tree/master/gcp-pubsub
Tim
@tim-smart
@numbsafari_twitter Thanks. I ended up using Bazel lol. gazelle is really helpful.
Peter Ebden
@peterebden
👋 am back at last...
will try to catch up on a few things :)
@marcguilera re reproducible builds & tools: because we didn't want to have to write build rules about how to download & install everything for all platforms (that's a lot more practical for Google than us). We ensure reproducibility here by controlling the versions installed on our machines

(p.s. Is there a patreon or similar for please?)

There isn't; not sure what the legal ramifications would be of us accepting money for it vs. current employment... also the main limitation is us having enough time to spend on it more than not having enough money. Unless the Patreon raised enough to have a full-time developer but that seems like a very long stretch :)

Gustavo Chaín
@gchaincl
is there a gazelle like tool for plz?
Tim
@tim-smart
How would one import these https://github.com/protocolbuffers/protobuf/tree/master/src/google into a proto_library rule?
Tim
@tim-smart
Got it. Used github_repo + filegroup + protoc_flags.
Peter Ebden
@peterebden
oh nice :thumbsup:
FWIW we were looking at making some of the well-known types more available recently - I think that repo has a bigger set from the look of it though
Tim
@tim-smart
@peterebden I saw that commit. How do you use it? I tried import "google/protobuf/descriptor.proto" but it failed to find the import.
Any plans for Go modules support somehow? Trying to bring in a dependency that uses the import path feature (directory structure doesn't match the import path). Fun times.
Gustavo Chaín
@gchaincl
Hey all, I'm trying to use the proto_library rule, and I'm getting the following error:
Build stopped after 50ms. 4 targets failed:
    //third_party/python:protobuf
//proto:_obm#py depends on //third_party/python:protobuf, but the directory third_party/python doesn't exist
    //third_party/go:protobuf
//proto:_obm#go depends on //third_party/go:protobuf, but the directory third_party/go doesn't exist
    //third_party/java:protobuf
//proto:_obm#java depends on //third_party/java:protobuf, but the directory third_party/java doesn't exist
    //proto:_obm#protoc
protoc-gen-go not found in PATH /home/gchain/.please:/usr/local/bin:/usr/bin:/bin
I'm kind of lost, do I need to update PATH?
Peter Ebden
@peterebden
@tim-smart I think a further commit to fix some other issues might have broken the ability to transparently import it. Might need to be added as an explicit dependency or something...
Go modules has come up a bunch of times - would love something better than the current go_get setup but it's quite a bit of work. Annoyingly there is no available parser for go.mod files so it's very hard to do anything dynamic with them (and go mod graph is not sufficiently complete for our purposes)
@gchaincl try setting languages on the proto rule to just the one you want? for most of them you'll also need to add a third-party dependency for the runtime library
Gustavo Chaín
@gchaincl
I added go
ah I see, I'll try adding something like deps: [@third_party/protoc]
@peterebden any example of it?
Gustavo Chaín
@gchaincl

@peterebden I did

...
deps = ['//third_party/python:protobuf'],
languages = ["py"],
...

but I get the following error when plz build:

//proto:_obm#proto depends on //third_party/python:protobuf, but the directory third_party/python doesn't exist
Peter Ebden
@peterebden
yeah, the please repo has an example of a similar thing (although there's a bunch more going on in there too)
basically add third_party/python/BUILD containing
Gustavo Chaín
@gchaincl
oh I see, they are examples, I assumed they were automatically included
thanks!
Peter Ebden
@peterebden
pip_library(
    name = "six",
    outs = ["six.py"],
    version = "1.11.0",
)

pip_library(
    name = "protobuf",
    outs = ["google"],
    version = "3.6.1",
    deps = [":six"],
)
or something along those lines :)
Gustavo Chaín
@gchaincl
also, is there a way to avoid redefining go dependencies (go_get() rule) and rely on go.mod ?
Peter Ebden
@peterebden
as above, there is not at present; I'd love one but don't have time to dig into it at present; very happy if something gets contributed
unfortunately it's very hard to parse go.mod which doesn't help being able to automatically rely on it (but that's not the only issue here...)
Gustavo Chaín
@gchaincl
so why not just call go build instead of go tool compile ?
Peter Ebden
@peterebden
"just" :)
Gustavo Chaín
@gchaincl
ok, I assume it's harder than it looks
Peter Ebden
@peterebden
you have to recreate a GOPATH that it's happy with; it's generally very slow as well since you're basically invoking one build system within another
Gustavo Chaín
@gchaincl
a gazelle like tool might be useful I guess
redefining dependencies by hand is too painful
Peter Ebden
@peterebden
yeah, agreed
Tim
@tim-smart
@peterebden Looks like gazelle uses the rolling instead of parsing go.mod https://github.com/bazelbuild/bazel-gazelle/blob/master/language/go/modules.go
*uses the tooling
Tim
@tim-smart

I have been playing around with a quick and dirty go.mod thing. https://gitlab.com/tim-smart/please-go-mod-example

It pretty much side-steps please for a lot of stuff.

It relies heavily on go.mod's replace directive.
Tim
@tim-smart
Simplified some more to not use replace, but the build rules feel a bit hacky still.