Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Sep 27 18:21
    Tatskaari synchronize #2082
  • Sep 27 16:34

    Tatskaari on master

    Updawte go deps to v0.3.1 (#209… (compare)

  • Sep 27 16:34
    Tatskaari closed #2094
  • Sep 27 16:34
    Tatskaari edited #2094
  • Sep 27 16:34
    Tatskaari opened #2094
  • Sep 27 15:43

    Tatskaari on master

    Fix concurrent map writes in pa… (compare)

  • Sep 27 15:43
    Tatskaari closed #2089
  • Sep 27 15:38
    Tatskaari synchronize #2093
  • Sep 27 15:37
    Tatskaari opened #2093
  • Sep 27 15:29
    Tatskaari labeled #2090
  • Sep 27 15:29
    Tatskaari commented #2090
  • Sep 27 15:28
    Tatskaari commented #2090
  • Sep 27 15:28
    Tatskaari commented #2090
  • Sep 27 15:21
    Tatskaari opened #2092
  • Sep 27 14:31
    tiagovtristao synchronize #2091
  • Sep 26 16:48
    tiagovtristao review_requested #2091
  • Sep 24 18:15
    tiagovtristao review_requested #2091
  • Sep 24 18:15
    tiagovtristao review_requested #2091
  • Sep 24 18:15
    tiagovtristao review_request_removed #2091
  • Sep 24 18:15
    tiagovtristao review_requested #2091
Karabutin Alex
@KarabutinAlex
So... How can I use one tool from another tool?
Thank you.
Gary Godfrey
@yerfdogyrag
Hi - just curious. I'm looking through some of the pleasings and see a bunch of instances of "build_rule" . Is that the same thing as "genrule"? It doesn't seem to be documented from what I can tell.
Gary Godfrey
@yerfdogyrag
Ah, nevermind - I found it in rules/misc_rules.build_defs . It looks like genrule is just a wrapper with help/type checking around build_rule.
Jonathan Poole
@Tatskaari
@yerfdogyrag Yeah pretty much. So build_rule() is aimed towards rule authors trying to implement their own build definitions, whereas genrule() and gentest() have some conveniences, and hide some implementation details and so that makes them slightly better suited for use in BUILD files. Ultimately the distinction is not very big, but I would consider it an anti-pattern to see a naked build_rule() invocation in a BUILD file.
Ricky Hartmann
@hartmannr76
:wave:
Jonathan Poole
@Tatskaari
Hi! How's it going?
Ricky Hartmann
@hartmannr76
Going well! Thank you for the invite :) I'll be sure to drop and comments I have in here but I can already see theres a lively discussion on Windows in here haha
tretinha
@tretinha
Hi! How is everyone doing? So, I would like to run a script in my CI if anything inside a specific folder changes, but I'm just not sure the best way to do that. I was looking into sh_cmd, would you say this is the way to go? Thanks!
Florin STAN
@namtzigla
@Tatskaari hi, I notice since 16.4.0 release (fix for cover #1975) the excludeextension setting in .plzconfig is not used anymore
16 replies
it is intentional ?
there is a replacement option ?
tretinha
@tretinha
Hi, do any of you know a tool that can help me listing my Go project's imports, so I can create the dependencies and libraries more easily with Please? Thanks
2 replies
Peter Bocan
@PeterBocan
Hey guys, I have noticed that go_benchmark is missing from the documentation https://please.build/lexicon.html#go is that intentional?
mvgijssel
@mvgijssel

Hi! I'm on macos and want to use the GNU coreutils within my build/run scripts in Please beacuse this prevents me from having to write conditional statements for Linux VS Macos every time I use one of these tools.

One way of solving this is by installing the coreutils through Homebrew brew install coreutils and by adding /usr/local/opt/coreutils/libexec/gnubin to the build path in .plzconfig. Even though this works, it's unfortunate this dependency is managed outside of Please.

Ideally what I would like is that Please downloads/builds the coreutils for me and ensures it's available in the path of every build/run script before those are executed. One imaginary example of solving this would be the ability to reference build labels in the config:

[build]
path = "$(out_location //tools/coreutils)"

Do you folks know of an existing way to achieve this in Please?

Jonathan Poole
@Tatskaari
No, we don’t have a nice way to add a tool like that to every rule. You would have to create entry points into the remote file for each core utils and add that as a tool to each rule that used them. That’s an interesting idea though. I wonder if we could do something like that. Might have a think about the implications of having a remote file at the root of every build rule. Could have some impact on incrementally.
mvgijssel
@mvgijssel

I've solved this currently by defining a preload build def in .plzconfig like

[Parse]
PreloadBuildDefs = ./tools/please/sh_rules.build_defs

and within that file alias the regular sh_cmd like:

old_sh_cmd = sh_cmd

so I'm able to wrap all sh_cmd with the additional behaviour I want

def sh_cmd(args):
  # Extend the cmd to add coreutils to the path
  return old_sh_cmd(args)

It feels a bit hacky, but it prevents me from having to add these common tools to every rule.

mvgijssel
@mvgijssel

Is it expected that the following fails?

plz: canonicalise("//some:tool|output")10:14:38.198   ERROR: Invalid build label: //some:tool|output

Isn't the |output a valid part of a build label? 🤔

Jonathan Poole
@Tatskaari
@mvgijssel That seems like a bug... I might have to plumb that through in a few more places.
Sorry about that
mvgijssel
@mvgijssel
No worries! Should I file an issue for that?
2 replies
Peter Bocan
@PeterBocan
Hey guys, qq: why can't I --shell into a CC test rule? It looks like the option is ignored in this case. (v16.6.0) I am running plz build --shell //tests:tests which contains a single cc_test.
12 replies
Peter Bocan
@PeterBocan
Also cc_test requires to produce a test.resultsfile. Is this by design?
21:36:18.596 WARNING: failed to read test results file: Didn't find any test results in plz-out/tmp/tests/tests._test/run_1/test.results
21:36:18.597   ERROR: //tests:tests failed: Test failed to produce output results file
4 replies
Elthariel
@elthariel
Hey folks ! I've a project using build for which I've already made a few tiny contributions to the pleasings. I'm now trying to get my frontend code to build with it, which doesn't seem like a very fun thing to do, especially regarding my poor js knowledge
I've noticed there's a whole shenanigan to build webpack with please, since this one cannot webpack itself
Jonathan Poole
@Tatskaari
Yeah JS is really hard to wrangle into Please which expects a more traditional compiler design
Elthariel
@elthariel
I wanted to let you know that I've managed to build a "static"(or self-contained) bundle of rollup (a competitor to webpack), that could be used instead of webpack
I'm starting to experiment a bit around this tool in the pleasings repo
Jonathan Poole
@Tatskaari
Have you seen the yarn rules on Pleasings? That's essentially what we use internally here.
I've had a play at using es-build which fits nicely into Please and gives properly incremental builds, but it's very much a work in progress: https://github.com/tatskaari/please-js
Elthariel
@elthariel
Yeah, I've started to read them, but the whole thing is not yet very clear to me
Thanks @Tatskaari for the link. I'll have a look. I'm very sad that I didn't talk to you before investing 2 days into building rollup and its plugins statically
Elthariel
@elthariel
The cool thing about rollup is that it's extensible by plugins and stuff. But 5 min of reading show that esbuild has some undeniable strengths
Jonathan Poole
@Tatskaari
You don't need plugins if you utilise Please for that sort of thing.
Instead of having your minifier transpile typescript to javascript, you can have Please do the ts -> js conversion, and pass that js to the es-build rules.
Elthariel
@elthariel
CommonJS module support is a plugin, node_modules path resolution as well. lots of stuff are done by plugins in rollup, so you'd have to use them anyway
Jonathan Poole
@Tatskaari
Those rules were made in a weekend as a proof of concept but I think they work.
Elthariel
@elthariel
Any rough idea of how compatible is esbuild with the mess that the js ecosystem is ?
Jonathan Poole
@Tatskaari
I'm not really a js dev but I think it's compatible. I'm just using it as a minifier though so those rules won't work with crazier modules. They also don't support having modules at different versions right now.
Peter Bocan
@PeterBocan
Hey guys, qq: what is stored in .plz-cache ? What's the purpose of these caches?
3 replies
slithiaote
@slithiaote
Hi, in the spirit of literate programming, I am trying to insert the contents of the BUILD file in the documentation. How can I do that with Please ? When I write srcs=["BUILD"], I get : misc_rules.build_defs:244:12: error: You can't specify the BUILD file as an input to a rule.
2 replies
Xinke Chen
@xinkecf35

Hello all. I've been looking at issue #1577 again (making pip_library executable) now that I have more time. At the moment, I have limited examples (flake8 and Chalice) of feeding both a pip_library and a entrypoint file to a python_binary that are able to invoke the packages in build rules. It's not perfect (hard to explain, but filesystem operations were a little hit and miss), but the idea is doable.

At the moment, I have the following questions:

  • My current method requires me to produce and return a PEX. Is there a way for me to modify pip_library to produce this PEX and provides this as a tool without seriously breaking the existing returns of the pip_library rule?
  • Given some of the finickiness and caveats with the process so far (filesystem operations so far being the culprit) , would it be better to instead contribute a pleasings rule that could take in a pip_library and produce the PEX for you? At the moment, I just manually introspect the Wheel and copy and paste the entrypoint file :sweat_smile:
5 replies
windrunner99
@windrunner99
It seems like the SHA sum was not updated to version 16.7.0 in brew.
brew install please                                                                                                                                                                                                                                                  
==> Downloading https://github.com/thought-machine/homebrew-please/releases/download/v16.7.0/please-16.7.0.el_capitan.bottle.tar.gz
Already downloaded: ~/Library/Caches/Homebrew/downloads/861b10e5b448f6fb80e617749eef0e9688ef32364415d00b8c6f9cbb2350308d--please-16.7.0.el_capitan.bottle.tar.gz
Error: please: SHA256 mismatch
Expected: 1bee420ecefeeb387ffe180ed31871cf0a041b4d3dbb894f09c343149d4c5bfc
  Actual: d84bcc7d58a9170ada31e85c403c1a1017b64eae509955a5e2bfc6d73ff73ae8
    File: ~/Library/Caches/Homebrew/downloads/861b10e5b448f6fb80e617749eef0e9688ef32364415d00b8c6f9cbb2350308d--please-16.7.0.el_capitan.bottle.tar.gz
To retry an incomplete download, remove the file above.
4 replies
Thomas Steinert
@chronicc
Hi, is there a way to use authentication with maven_jar for private repositories? I did not find any hint for such a feature on the website.
40 replies
Thomas Steinert
@chronicc
I've added something to the faq page to help other ppl forced to get please running inside WSL. thought-machine/please#2071
Sylvain Firmery
@sfirmery
Hello,
I have an issue using add_exported_dep() in post_build.
When I add a dep that is a standard rule, it works well, but when it's a custom rule (imported with a subinclude()), I have an error CRITICAL: Target //target:label not found in build graph.
Using add_dep() works well even with custom rules.
4 replies
Arek Sredzki
@ArekSredzki
Hey there, I just came across Please and am curious as to whether there are any guidelines/hints about how much work it is to attempt to use Please for an existing project that is currently using Bazel. There seems to be a lot of overlap between the supported functionality of the two build systems but is there a list of features that aren't yet supported in Please? Additionally, how stable is the experimental remote build feature? That's pretty critical for larger C++ projects. Thanks!
20 replies
jcdennis
@jcdennis
Hi,
I am having an issue using python_test() to run pytest. Our pytest passes when run regularly. Our file structure consists of a tests folder with 4 .py files. When trying to use python_test() I am getting this error when trying to load file2: "from tests.file1 import Class1 Error: No module named 'tests.file1'. Can anyone help with this issue?
12 replies
qianzheng12
@qianzheng12
Hi everyone
I am currently trying to use Please to zip my code and upload it AWS lambda . However I am having issue with zipping every dependencies I used into the same zip file, I wonder if any one ever used please to do similar thing before that can help me out
Sylvain Firmery
@sfirmery
Hello, I'm trying to use the HTTP cache but it seems that things are rebuilt after retrieving artifacts from the HTTP cache, but works well when data are in the dir cache:
DEBUG: Need to rebuild //_please:download, metadata file is missing
...
DEBUG: Retrieved artifacts for //_please:download from cache
...
DEBUG: Need to rebuild //_please:please_tools, //_please:download has changed