Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jan 28 08:53

    peterebden on master

    Named Outputs can only be depen… (compare)

  • Jan 28 08:53
    peterebden closed #2670
  • Jan 28 07:21
    robxu9 opened #2670
  • Jan 27 17:08
    goddenrich opened #2669
  • Jan 27 17:01
    samwestmoreland synchronize #2667
  • Jan 27 15:59
    samwestmoreland synchronize #2667
  • Jan 27 15:50

    samwestmoreland on master

    Delete JavaBinaryExecutableByDe… (compare)

  • Jan 27 15:50
    samwestmoreland closed #2662
  • Jan 27 15:23
    samwestmoreland synchronize #2662
  • Jan 27 15:01
    samwestmoreland synchronize #2662
  • Jan 27 14:56
    samwestmoreland synchronize #2662
  • Jan 27 14:53
    samwestmoreland synchronize #2662
  • Jan 27 14:50
    samwestmoreland ready_for_review #2668
  • Jan 27 14:05
    samwestmoreland opened #2668
  • Jan 27 13:10
    samwestmoreland synchronize #2667
  • Jan 27 12:52
    samwestmoreland edited #2667
  • Jan 27 12:46
    samwestmoreland synchronize #2667
  • Jan 27 12:38
    samwestmoreland synchronize #2667
  • Jan 27 12:36
    samwestmoreland synchronize #2667
  • Jan 27 12:34
    samwestmoreland opened #2667
Stefanus
@sdtqb
does please allow some kind of substitution in the config file? I know I can define a buildconfig.foo and use that in build scripts s CONFIG.FOO, but can I also refer to such values from other configuration values?
3 replies
also just a shout out that please is awesome! As a xoogler it's wonderful to have so many familiar comforts from blaze without the end user complexity of bazel ;)
1 reply
Stefanus
@sdtqb
is there a reason cc_binary doesn't accept labels? It'd be nice for example to tag all our benchmarks so we can do a plz run sequential --labels=benchmark //... or similar
1 reply
Xinke Chen
@xinkecf35
Hello all. Regarding Bazel comaptibility within Please, what should someone be mindful of when using with Bazel BUILD files with Please? I would to fool around with both in the same project and looking for any info on how dumb of an idea that will be :-)
4 replies
Cyrus Lyons
@cbwl
Hi all. Wondering if it's possible to define a remote_file rule whose url depends on the values of the $OS and $ARCH environment variables. I want to build a please rule which can download a python-build-standalone distribution for the system currently building the rule, so I'm thinking it would be nice to write a bit of code which can map from $OS and $ARCH to the relevant LLVM target triple for python-build-standalone, then construct the URL for a given release on github and go and fetch it. Any advice welcome!
2 replies
Nathavee-mh
@Nathavee-mh
Hello, I'm trying to use the Go plugin. Is there a way to setup please to build a go ".so" file?
go build -buildmode=plugin
1 reply
Peter Bocan
@PeterBocan
What's the easiest way to setup the GRPC gateway using Please?
andrew
@andrew:wom.icu
[m]
Error building target //third_party/go:_wasmtime#a_rule: exit status 1
please_go install -> /usr/bin/go version
please_go install -> mkdir -p pkg/linux_amd64/bin

please_go install -> touch LD_FLAGS
Compiling package github.com/bytecodealliance/wasmtime-go from []
2022/10/03 11:34:40 failed to compile github.com/bytecodealliance/wasmtime-go: /path/to/plz-out/tmp/third_party/go/_wasmtime#a_rule._build/third_party/go/wasmtime/ffi.go: malformed #cgo argument: -I/path/to/plz-out/tmp/third_party/go/_wasmtime#a_rule._build/third_party/go/wasmtime/build/include

Looking for some advice on how to resolve this. I'm pretty positive that it's upset about the # character, given https://pkg.go.dev/cmd/cgo:

Also for security reasons, only a limited set of characters are permitted, notably alphanumeric characters and a few symbols, such as '.', that will not be interpreted in unexpected ways. Attempts to use forbidden characters will get a "malformed #cgo argument" error.

10 replies
Sessional
@Sessional

Hey folks! I've been eyeing please for the purpose of handling a mono repo, I was hoping maybe some folks could bounce some ideas with me on structure of the mono repo and the way to finagle myself into some lovely ideas. Currently I want to use please to explicitly handle building of containers that we can then use during a deployment pipeline (think CNAB style) . I've browsed the terraform pleasing, and unfortunately, I don't think it'll work for me primarily because I think it's more opinionated than I want it to be. I don't know if I WANT it to handle the terraform executable (bad of me I know...), or that I want it to manage providers. So I started on my adventure and would love some other great thoughts if they are available.

I'll continue my thoughts in the thread if anyone is interested and would like to chime in I'd love to hear some thoughts. :)

1 reply
platypus.activator
@platypus.activator:matrix.org
[m]
Is it doable to have a workspace which is compilable with both please and Baxel?
Similar to python 2/3?
PeterCDMcLean
@PeterCDMcLean
What is the facility (if any) to integrate external cmake build or libraries with please? The equivalent works be the cmake foreign_cc rules in Bazel
2 replies
Panlq
@Panlq
image.png
15 replies
Hi all. Pls how do I reference pip_library executable after pip_library installation?
Panlq
@Panlq
1665628190582.jpg
Mike Jack
@mikejack07

Hi,

I am an intern responsible for evaluating the distributed build systems available for both Windows and Linux.

I have few limitation which I need to consider before evaluating them

Should be Open Source/ Licensed (less preferably)
Supports both Win and Linux
Support CMake.

I wanted to know if Please satisfies all my requirements so that I can proceed with evaluating it for my team. Thanks.

4 replies
Panlq
@Panlq
image.png
23 replies
Alvin Henrick
@alvinhenrick
hi folks need help with this error when using pytest
 File "/Users/shona/PycharmProjects/please_monorepo/plz-out/tmp/src/greetings/greetings_test._test/run_1/greetings_test.pex/.bootstrap/pluggy/hooks.py", line 286, in __call__
  File "/Users/shona/PycharmProjects/please_monorepo/plz-out/tmp/src/greetings/greetings_test._test/run_1/greetings_test.pex/.bootstrap/pluggy/manager.py", line 93, in _hookexec
  File "/Users/shona/PycharmProjects/please_monorepo/plz-out/tmp/src/greetings/greetings_test._test/run_1/greetings_test.pex/.bootstrap/pluggy/manager.py", line 84, in <lambda>
  File "/Users/shona/PycharmProjects/please_monorepo/plz-out/tmp/src/greetings/greetings_test._test/run_1/greetings_test.pex/.bootstrap/pluggy/callers.py", line 203, in _multicall
  File "/Users/shona/PycharmProjects/please_monorepo/plz-out/tmp/src/greetings/greetings_test._test/run_1/greetings_test.pex/.bootstrap/_pytest/terminal.py", line 746, in pytest_terminal_summary
  File "/Users/shona/PycharmProjects/please_monorepo/plz-out/tmp/src/greetings/greetings_test._test/run_1/greetings_test.pex/.bootstrap/_pytest/terminal.py", line 1058, in short_test_summary
  File "/Users/shona/PycharmProjects/please_monorepo/plz-out/tmp/src/greetings/greetings_test._test/run_1/greetings_test.pex/.bootstrap/_pytest/terminal.py", line 1007, in show_simple
  File "/Users/shona/PycharmProjects/please_monorepo/plz-out/tmp/src/greetings/greetings_test._test/run_1/greetings_test.pex/.bootstrap/_pytest/terminal.py", line 1120, in _get_line_with_reprcrash_message
ModuleNotFoundError: No module named 'wcwidth'
Trying to use pytest
[Python]
TestRunner = pytest
Alvin Henrick
@alvinhenrick
TestRunnerBootstrap Do I need to set up the custom runner to make this work? Does anyone have an example for it?
24 replies
Panlq
@Panlq
image.png
Panlq
@Panlq
image.png
Panlq
@Panlq
image.png
aronggile
@aronggile
I am planning to distribute please as part of an automated process. Is there a way to configure please so that it does not write outside the current repo. For example, in the users home directory?
6 replies
Cyrus Lyons
@cbwl

Hello! I'm struggling to understand how to use go_mod_download to resolve a circular go package problem. Specifically, I'm trying to add a dependency on the go opentelemetry module. I've tried quite a lot of things but consistently come back to errors either along the lines of:

failed to compile go.opentelemetry.io/otel/propagation: package cycle detected:
go.opentelemetry.io/otel/propagation
 ->go.opentelemetry.io/otel/trace
 ->go.opentelemetry.io/otel/internal/global
 ->go.opentelemetry.io/otel/propagation

... or, with various attempts to refactor out a go_mod_download for go.opentelemetry.io/otel and then reuse that as the download parameter to multiple go_module rules, something like this:

failed to compile go.opentelemetry.io/otel/propagation: package cycle detected:
go.opentelemetry.io/otel/propagation
 ->go.opentelemetry.io/otel/propagation

Can anyone point me to some working examples elsewhere, some documentation, or some other hints on how to resolve this? Thanks in advance!

aronggile
@aronggile
Hello all! Is there a way to configure the location of the build directory, which is something like: TMPDIR={PROJECT_ROOT}/plz-out/tmp/ directory? The issue is it often results in a long file name and that is causing Unix socket binding related issues. For context, I am working on a rule for simplifying Hashicorp's Packer image creation process and I am hitting this issue: hashicorp/packer#2091
3 replies
Peter Bocan
@PeterBocan
hi, is there anywhere documentation for the CONFIG variable?
1 reply
Peter Bocan
@PeterBocan
I do struggle to find the contents and what is set in the CONFIG variable on the runtime. //project/BUILD: config:%!(EXTRA *asp.pyConfig=<global config object>) is not very helpful ... maybe I could raise a PR ?
2 replies
huguesm
@huguesm:izissise.net
[m]

Hello, I'm having trouble using please. I'm trying to build ipxe with some custom config, so I have to copy a file into the newly downloaded ipxe sources, but I'm having a hard time doing it:

name = 'ipxe'
version = '1.21.1'

url = 'https://github.com/' + name + '/' + name + '/archive/refs/tags/v' + version + '.zip'

extract = new_http_archive(
    name = name + '_' + version,
    urls = [url],
    strip_prefix = name + '-' + version,
    build_file = name + '.BUILD',
)
# here I tried all sequences described here
# https://please.build/build_rules.html
# none worked except 'hash'
extract_loc = '$(out_location ' + extract + ')'

patch = genrule(
    name = 'patch',
    srcs = {
        'config_h': ['config.h'],
    },
    outs = {
        'config_h': ['config.h'],
    },
    tools = {
        "cp": ["echo"],
    },
    cmd = [
        '$TOOLS_CP "${SRCS_CONFIG_H}" AA' + extract_loc + 'AA ${OUTS_CONFIG_H}> /tmp/here'
    ],
    deps = [extract],
)

filegroup(
    name = 'ipxe',
    deps = [extract, patch],
    visibility = ['PUBLIC'],
)

The replacement sequence end up being empty (except for hash), so nothing between the 'AA'.
How can I add config.h in the newly downloaded sources?
Thanks,
Hugues

3 replies
huguesm
@huguesm:izissise.net
[m]
Hello, How can I access global CONFIG from a subinclude?
5 replies
huguesm
@huguesm:izissise.net
[m]
Hello, How can I add XXX/plz-out/bin/ in the PATH for the current genrule?
4 replies
Stefanus
@sdtqb
I noticed pytest is pretty out of date in https://github.com/thought-machine/please/blob/master/third_party/python/BUILD (5.4.3, from mid-2020). Are there are any plans to upgrade? This version doesn’t seem to work with recent versions of python
10 replies
huguesm
@huguesm:izissise.net
[m]
Thanks for the replies :)
a
@elimination:matrix.org
[m]
Hello, im new to using please, can someone help me with adding the home variable to an include directory?
1 reply
huguesm
@huguesm:izissise.net
[m]
New question, is it possible to get the outs dict of a rule? there is get_outs but it only return a list, I'd like to do something like this
stg1 = genrule(
    name = 'stage1_longprocessing',
    outs = {
        'A': ['a'],
        'B': ['b'],
    },
    cmd = f"""
    set -eux

    stage1 --outputs "$OUTS_A" "$OUTS_B"
    """
)

stg2env = '\n'.join([f'STG1_{k}={v}' for k, v in get_outs(stg1)])
stg2 = genrule(
    name = 'stage2',
    srcs = [stg1],
    cmd = f"""
    set -eux
    {stg2env}

    stage2 "$STG1_A" "$STG1_B"
    """
)
Nolan Holden
@nolanholden
Can someone tell me why python unpacking is not supported???!
x = [1,2,3]
y = [*x,4,5,6]
d1 = dict(a=1, b=2)
d2 = {**d1, b=3}
Nolan Holden
@nolanholden

this is seriously inconvenient! Was writing a custom rule with this shape, but it's not possible:

def rule1(name, a=None, b=None, c=None):
return genrule(
**_rule1_impl(a, b),
name = name,
...
)

Narek Vardanjan
@vnarek
Can I somehow tell please to download go modules using ssh insteadOf http? It works when I use go mod download from the command line, but plz doesn't take .gitconfig into account. I have private repositories on private gitlab.
John Pignato
@jpig18
Good Afternoon. I'm sorry if I missed this in the documentation but is it possible to use Please with multiple Go mods that reference each other in a single repo?
1 reply
aronggile
@aronggile
I have the exact same issue as thought-machine/please#1179. Has anyone been able to make a rule work both in and out of a repo? For some reason subrepo_name or canonicalise return empty string(wrong) or throw null reference pointer exception error(should I report?). The error happens when either of the functions is used at the package level.
6 replies
Stefanus
@sdtqb
I’m having an issue where a nested run of plz within a script being run by plz run that uses a different config causes //_please:download to be rebuilt every time (more details in thread)
8 replies
Stefanus
@sdtqb
(sorted out the previous issue so feel free to ignore it unless you want to hear me talk to myself ;) )
aronggile
@aronggile
Is there a way to make alias commands of a subrepo available too the parent repo? Or better yet, a way to tap into Pleases command line system via Golang or something even simple similar to customgit sub-commands?
2 replies
erikakire
@erikakire:matrix.org
[m]
Hello everyone!
I'm trying to build a docker container running linux+please on my mbair M1 apparently https://get.please.build/linux_arm64/16.26.1/please_16.26.1.tar.gz (nor linux-aarch64) is not published. I'm aware that I can build it on the fly but still wondering why I can't find a prebuilt binary... does someone know, please?
10 replies
Adam Helbling
@adamhelbling:matrix.org
[m]
Can someone help me understand the please way to use a specific version of something like a kotlinc to build a kotlin module? For example I have created a way to download and extract a kotlinc compiler to a specific directory in plz-out/gen/. I'd then like to expose a command (or tool possibly) that all kotlin projects can use based on this 'pinned' version of kotlinc. I thought the $(out_location) to my remote_file //path/to:target would work but it gets put into a bash script that can't be referenced from within the build env bash env.
8 replies
aronggile
@aronggile
I assumed running plz query output '@plugin//path:target' inside a plugin repo would be equivalent to running plz query output '//path:target'. But the CLI breaks. Is this expected behavior?
2 replies
Peter Bocan
@PeterBocan

Is it possible to pass github_repo to genrule as follows

tools = github_repo()
return genrule(
    name = "tools", 
    srcs = [tools], 
    ... 
)

?

Stefanus
@sdtqb
I believe plz is not correctly rebuilding one of our cc_test targets when a header it references is changed.
48 replies
Daniel Krastev
@daniel-krastev

Good afternoon. Can someone help me understand why when importing the pgx library in golang my lib is failing while building:

❯ pb //src/dbconn:main
Build stopped after 360ms. 1 target failed:
    //src/dbconn:main
Error building target //src/dbconn:main: exit status 1
cannot find package github.com/jackc/pgx/v5/pgconn (using -importcfg)
cannot find package github.com/jackc/pgx/v5/internal/anynil (using -importcfg)
cannot find package github.com/jackc/pgx/v5/internal/sanitize (using -importcfg)
cannot find package github.com/jackc/pgx/v5/internal/stmtcache (using -importcfg)
cannot find package github.com/jackc/pgx/v5/pgtype (using -importcfg)
cannot find package github.com/jackc/pgx/v5/internal/pgio (using -importcfg)
/usr/lib/go/pkg/tool/linux_amd64/link: cannot open file : open : no such file or directory

This happens when I import the lib in go like:

import (
    _ "github.com/jackc/pgx/v5"
)

fyi the library itself is declared and build successfully like (all deps are also build OK):

go_module(
    name = "pgx",
    module = "github.com/jackc/pgx/v5",
    version = "v5.2.0",
    deps = [
        ":xtext",
        ":xcrypto",
        ":pgpassfile",
        ":pgservicefile",
    ],
)
26 replies
Stefanus
@sdtqb
I’m building a java target for the first time and I always see this at the end of the build:
10:04:44.026   DEBUG: Terminating build worker /src/plz-out/bin/_please/javac_worker
10:04:44.026   DEBUG: Sending signal terminated to -122
10:04:44.056   DEBUG: Sending signal killed to -122
2 replies