Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jun 12 17:17
    tiagovtristao commented #1553
  • Jun 12 08:49
    stale[bot] unlabeled #1546
  • Jun 12 08:49
    sagikazarmark commented #1546
  • Jun 12 05:46
    linuxerwang opened #1853
  • Jun 11 20:42
    stale[bot] labeled #1434
  • Jun 11 20:42
    stale[bot] labeled #1546
  • Jun 11 20:42
    stale[bot] commented #1434
  • Jun 11 20:42
    stale[bot] commented #1546
  • Jun 10 15:11
    Tatskaari opened #1852
  • Jun 10 14:34
    Tatskaari commented #1547
  • Jun 10 14:34
    Tatskaari closed #1547
  • Jun 09 14:35

    peterebden on master

    Be more defensive when disconne… (compare)

  • Jun 09 14:34
    peterebden closed #1849
  • Jun 09 14:22
    Tatskaari closed #1851
  • Jun 09 14:22
    Tatskaari commented #1851
  • Jun 09 14:18
    matthen opened #1851
  • Jun 09 13:52
    Tatskaari opened #1850
  • Jun 09 13:42
    peterebden synchronize #1849
  • Jun 09 13:41
    peterebden opened #1849
  • Jun 09 07:49
    peterebden review_requested #1848
Jonathan Poole
@Tatskaari
A nice! If you have any feature requests or bugs to report, I'm tracking issues in a separate repo here:
https://github.com/thought-machine/please-intellij/issues
Rauan Mayemir
@rauanmayemir
I had several issues with stubs for builtins, looks like they're still there. going to collect them and report

e.g stuff like this:

def package():
    pass

I've assumed that default_visibility arg is gone, but removing it will break stuff

Jonathan Poole
@Tatskaari
Yeah that's not very easy to solve... the problem is that Please doesn't support **kwargs so there's no python compatible way to represent that.
Rauan Mayemir
@rauanmayemir

btw, is this a plugin bug or i'm doing it wrong?

filegroup(
    name = "system_proto",
    srcs = [
        "system_proto.build_defs",
    ],
    visibility = ["PUBLIC"],
)

subinclude(':system_proto')

system_get_protoc_tool(
    name = "protoc.fetched",
    version = "3.15.4",
)

I'm including the build_defs and using it in the same scope to setup targets with default versions. ide can't recognize the system_get_protoc_tool function

6 replies
if I'd subincluded it from the different scope, ide would have recognized the function
Rauan Mayemir
@rauanmayemir
are there any examples for proper-ish multi-lang monorepos using please build? planning to move our scattered repositories into a single monorepo under plz umbrella
so far, I've only been using plz to build api sdks and clients, but it's another layer of pain to go back and forth for doing even tiny updates. now that I feel comfortable enough with plz, want to start using it for implementation packages
23 replies
Raphael
@raphaelfff
Hi all, i was trying to get Please to build my go modules, by using the go.mod/go.sum, and I got a little crazy with it, and got it to mostly work... but not quite
Thats what I came up with, it basically create the deps tree and create the relevant go_module with go_mod_download
The download works fine, but the build of the go_modules is not exactly happy, its failing with 2 types of errors such as
  • no buildable Go source files in <path>/github.com_davecgh_go-spew#dl
  • _build/github.com/chzyer/test/test.go, line 16, column 2: can't find import: "github.com/chzyer/logex"
I feel like i m really close, some insight from more experienced people would be greatly appreciated :)
Jonathan Yee
@jonyeezs
are there any resource on how one would integrate please with serverless framework?
BinHong Lee
@binhonglee
Hey I have a question about making my own build rules. I see that raise() is now deprecated (and planned to be removed on v17), what's the right way to throw an error in build rules?
1 reply
BinHong Lee
@binhonglee
Different question, is it possible to have a build_def file using function that exist in another build_def file? How do I go about defining this dependency?
1 reply
Thomas Weber
@towe:matrix.org
[m]
Hi all, sorry for bringing it up again. I wonder how i can correctly define a polyrepo structure. I discovered the "new_local_repository" subrepo rule in the source code. Do you have any example on how to use it? I would want to reference a second workspace checked out alongside to the main repo (not nested, just sibling) and the descriptions suggests that it might be the purpose of this rule.
Karabutin Alex
@KarabutinAlex

Hi all,
I use Please within Node.js so I use WebStorm.
I tried to install this plugin https://plugins.jetbrains.com/plugin/16816-please but I got next error:

Plugin 'Please' requires plugin 'com.intellij.modules.python' to be installed

I took a look if it's possible to enable Python support in WebStorm but I figured out that it isn't supported and it isn't even planned to support Python.
So I have a question. Is it planned to add supporting WebStorm.
Thank you.

2 replies
Karabutin Alex
@KarabutinAlex
@towe:matrix.org

Example structure:

  • repo1/.plzconfig
  • repo1/BUILD
  • repo2/BUILD
  • repo2/greeting.txt

repo1/BUILD:

local_repository(
  name = 'repo_2',
  path = '../repo2',
)

repo2/BUILD:

export_file(
  name = 'greeting',
  src = 'greeting.txt',
)

repo2/greeting.txt:

Hello Please!

Using:

$ cd repo1
$ plz build ///repo_2//:greeting
$ cat $(plz query output ///repo_2//:greeting)
Hello Please!
Thomas Weber
@towe:matrix.org
[m]
@KarabutinAlex: thank you. I was not aware of the fact that any path can point to a folder outside the please workspace. I will give it a try. It certainly fits my usecase of a bigger please monorepo and a few "satellites".
Josh Katz
@gravypod
Wow! Please has an idea plugin now?
1 reply
Xinke Chen
@xinkecf35
I apologize if this is a silly question, but what's the most idiomatic way to create a Python library with Please? I recall awhile back on this lobby that was a dislike towards how setup.pydid things and was curious on the preferred the way to generate a bdist with Please.
4 replies
Nicolas Huray
@nhuray
@xinkecf35 I read your article about Pex and Please: https://overthinkingcode.net/posts/2020/12/lambda-deployment-with-please. I have the same kind of project (multi lambda functions in python). Do you have a project you might share with me ?
14 replies
Yariv Gilad
@YarivGilad
Does anyone use please with javascript? I'm looking for the right tool to create and manage a monorepo that will include react apps, react component libraries, node.js servers as well as golang servers
Nicolas Huray
@nhuray
I'm not using Please yet for JS but you might inspired yourself from that project: https://github.com/simplebuild/please.make/tree/master/example_web
Jonathan Poole
@Tatskaari
There’s also this which wraps up the yarn workspaces workflow so you can use webpack dev servers and such: https://github.com/thought-machine/pleasings/tree/master/js/yarn_workspace_example
BinHong Lee
@binhonglee
imo the pleasings version of yarn is really comprehensive probably the best way to get the most juice out of both please and yarn. but I'm using pnpm and I haven't figure out how to properly download them in a way pnpm wants / expects so I'm just using please as a wrapper over pnpm for now. https://github.com/binhonglee/GlobeTrotte/tree/main/build_defs/npm
Josh Katz
@gravypod
Is there a version of iblaze for please?
3 replies
Jonathan Poole
@Tatskaari

Hey all! I've posted a discussion around how we are going to support third party plugins for Please going forward:
https://github.com/thought-machine/please/discussions/1843

By plugin I just mean a repo that provides build definitions for a language or technology e.g. C# or terraform

Let me know what you think of this approach.

Alexander Lyashuk
@mooskagh

I'm currently using meson for my personal monorepo (mostly C++), and trying to switch to please. I happen to have some hundreds of dependencies to libraries installed in my system (all discoverable through pkg-config), and I wonder what would be the best way to migrate them?

  1. As far as I understand, there's no way to use system libraries in please, and it's better to either build from source (looking up online repos with sources and writing BUILD files is not what I'm looking for to do for more than a couple of libs), ...
  2. ...or copy .so / .h files into my repository and write BUILD files to link them.

Assuming that that item 2 is not completely insane, I have another question:

  • I don't want to put those .h files to the root of my repo, ideally they should be in /third_party/library_name/*.h. However, as one library usually has many .h files and they often reference each other using absolute paths, I have to edit those manually and add /third_party/library_name/ to all such #include's.
    Isn't there a way to make please add -Ithird_party/library_name to C++ compiler for all C++ rules depending on that library?
Jonathan Poole
@Tatskaari

As far as I understand, there's no way to use system libraries in please

I don't think this is true. Please will find system libs in the standard locations (more accurately clang and gcc will). You can pass more system library locations through the cc flags config options:https://please.build/config.html#cpp

I'm not 100% sure on pkg-config support in Please. Have you tried it and found it doesn't work? We definitely have some level of support because we can add additional paths for pkg-config through Cpp.PkgConfigPath
I think it's nice to compile stuff from source because you're less dependent on the host repo but it's definitely possible to rely on system level libs too.
Nap Joseph Calub
@njncalub
Hi, everyone. How does one usually search for please-related resources on the web? I tried searching for "please build nextjs" but it returns generic results. 😅 Is there a tag we can use to make it more specific? (for example, using"golang" instead of just plain "go")
1 reply
Alexander Lyashuk
@mooskagh

I don't think this is true. Please will find system libs in the standard locations (more accurately clang and gcc will). You can pass more system library locations through the cc flags config options:https://please.build/config.html#cpp

I think this describes the global C++ options, but I'd like it to work "automatically", e.g. if I list //third_party/tensorflow:tensorflow_cc (or whatever) as a dependency to my library, then linker does -ltensorflow_cc -ltensorflow_framework -L/usr/lib when the binary depending on it is linked.

With global override of linker options, all I can do is list all external libraries there, and then all my target will be linked against 200 libraries that I use (in different projects of one repo)

17 replies
Alexander Lyashuk
@mooskagh

Is there a way to query please to get a rule particular file is part of?
E.g if there's cc_library( name="blah", srcs=['a.cc']) then please query <something> path/to/a.cc would return //foo/bar:blah?

Only need that for cc_library and cc_binary, only for .cc (and .h in hdrs as a bonus).

Need it for "Compile the file I'm editing" shortcut in IDE.

Jonathan Poole
@Tatskaari
Yes as of 16.1.0!
plz query whatinputs
Alexander Lyashuk
@mooskagh
That sounds great! Thanks!
windrunner99
@windrunner99
2 replies
somewhere availabe ?
ʃɐm Wilʃon
@numbsafari_twitter
Curious if anyone else has gotten the terraform build-defs in the pleasings repo to work or not. I'm having trouble importing them into my project and am about ready to just copy/paste them over as a work around.
ʃɐm Wilʃon
@numbsafari_twitter
It seems as though the terraform build-defs aren't fully self-contained, so using the approach of remote_file as per the docs examples for integrating with the rust pleasings, won't work. So I've been trying to import as a github_repo, but that doesn't seem to address that the references contained inside the pleasings repo would need to be interpreted within the context of that repo, rather than the importing project. I have a feeling this is a me problem, and not a please problem.
ʃɐm Wilʃon
@numbsafari_twitter
Making lots of progress by picking this apart: https://github.com/VJftw/vjpatel.me
Super helpful!
BinHong Lee
@binhonglee
I have a question about code coverage reports. Is there any formats supported by nyc / istanbul that's currently accepted by please? and how should I name the code coverage file?
3 replies
Immortalin
@Immortalin
Hello
I am getting Sha256 errors on Linuxbrew