Age | Commit message (Collapse) | Author |
|
This reverts commit 1508c18d9e27325a8d9c574a90d205e0a1d8a78f.
Reason for revert: breaks build, not caught by treehugger
Change-Id: Id40b5eefc5f4f0f6e4a0122fbfa53b0c3c265985
|
|
This patch deletes the old copy of `bazel_integration_test` that we
had vendored into the repo. It's replaced with the maintained
`rules_bazel_integration_test`.
Summary of changes:
* Increases minimum tested bazel version to 6.4.0.
rules_bazel_integration_test depends on some features in 6.4
* Moves several CI jobs to be BIT tests. This free ups
about 10 CI slots.
* Runs these tests under a separate CI job. This is so that feedback
from the regular test jobs is faster.
Notes about these bazel-in-bazel integration tests:
* The tests are very heavy and easily overwhelm a system. Unfortunately,
there doesn't appear to be a way to cap their parallelism; only
disable it entirely using the `exclusive` tag. Some light
testing shows there is some speedup to be gained on CI
if we can, in the future, limit them to 2 or 4 concurrent
executions.
* A special version named "self" is created that re-uses
whatever the outer Bazel program is. This is mainly so that
Bazel's "at head" testing pipelines (the one that runs tests
with Bazel built from head) are able to affect the integration tests.
It also comes in handy when locally testing a custom Bazel build.
* The globbing of child workspace files can be somewhat prone to
following `bazel-*` symlinks, so its important the `.bazelignore`
and deleted packages configs are up-to-date. Otherwise the
globbing can turn into 30,000+ files and consume a system-freezing
level of memory and CPU.
Fixes #1209
---------
Co-authored-by: Richard Levasseur <rlevasseur@google.com>
|
|
The tests have been deleted, so the supporting code is now unused.
Moves the update_deleted_packages script to tools, since it isn't
specific to the bazel_integration_test code.
|
|
Before this PR all of our examples are referring to the default PyPI by
its
legacy URL. This PR just makes things more consistent by updating URLs
to point
to the pypi.org as pypi.python.org does not have any guarantees to be
up.
See https://packaging.python.org/en/latest/guides/migrating-to-pypi-org/
|
|
Before this PR we could not build `module_extension` docs because of a
really old `stardoc` version. This updates `stardoc` to the latest
version
and regenerates the documentation. The addition of the docs for
`module_extension` is out of scope of this PR.
Work towards #1178
Summary:
- feat(bzlmod): add stardoc as a dev dep
- feat(docs): enable running on bzlmod
- chore: USE_BAZEL_VERSION=latest bazel run --enable_bzlmod
//docs:update
- refactor: create wrappers for http_archive and http_file in
internal_deps
- chore(legacy): bump stardoc to 0.6.2
|
|
versions (#1410)
This makes rules_python's usage of Go work with upcoming Bazel versions.
The
`_whitelist_function_transition` attribute in the Go rules is being
removed, per
https://github.com/bazelbuild/bazel/issues/19493. Newer Go rule releases
are compatible
with the upcoming Bazel versions.
Fixes : [1409](https://github.com/bazelbuild/rules_python/issues/1409)
|
|
This uses the 0.4.0 release of rules_python, which has several features
we can make use of
* Various internal APIs have been made public
* target_compatible_with can be set to skip tests by platform
* Unit tests are easier to write
Also adds rules_license 0.0.7, which is a dependency of rules_testing.
Work towards #1297
|
|
Upgrading to the latest version of gazelle and rules_go. This should
address `--incompatible_config_setting_private_default_visibility` flag.
|
|
This fixes a problem where bazel skylib does not load during the
toolchain integration test.
The skylib dependency was introduced by #1191, but skylib was not
present in the WORKSPACE configs of several things. To fix, skylib just
needs to be added to the workspace files.
|
|
This just keeps it at a recent version, which makes errors easier to
grok. rules_testing recently underwent a large refactor, so it's
confusing when errors reference lines that no longer exist in recent
versions.
|
|
This is to provide some regression tests for the Starlark rewrite.
These tests are approximately the same as Bazel's Java-implemented
tests.
Work towards #1069
|
|
* Add missing copyright headers
Done by running:
`addlicense -v -c "The Bazel Authors. All rights reserved." .`
With a few changes reverted because they're for generated files or test goldens.
Fixes #916
|
|
feat!(gazelle): Move the plugin to a separate workspace
Summary:
* Move go.mod to gazelle.
* Move gazelle definition.
* Fix file distribution for the gazelle module.
* Update the example test.
* Include rules_python_gazelle_plugin during integration tests
* Update ignored packages
* Update CI configuration
|
|
* Add py_proto_library
* Bump versions of rules_proto and protobuf
* Update documentation
* Bump rules_pkg version
|
|
Fix //docs:update
Also regenerates docs with the new stardoc version.
Right now the command errors out on fresh clones or after a `bazel
clean`.
$ bazel run //docs:update
cp: cannot stat 'bazel-bin/docs/packaging.md_': No such file or directory
cp: cannot stat 'bazel-bin/docs/pip.md_': No such file or directory
cp: cannot stat 'bazel-bin/docs/pip_repository.md_': No such file or directory
cp: cannot stat 'bazel-bin/docs/python.md_': No such file or directory
I submitted bazelbuild/stardoc#139 to fix this. @brandjon pointed out
that this should just work as-is, but doesn't because of
bazelbuild/bazel#15043. Until the bazel bug is addressed, we can make
`//docs:update` work by pulling in the latest stardoc version.
One side effect of this patch is that the generated documentation
itself changed a decent amount.
Now the tool works again without errors even after a fresh clone or a
`bazel clean`
$ bazel run //docs:update
'bazel-bin/docs/packaging.md_' -> 'docs/packaging.md'
'bazel-bin/docs/pip.md_' -> 'docs/pip.md'
'bazel-bin/docs/pip_repository.md_' -> 'docs/pip_repository.md'
'bazel-bin/docs/python.md_' -> 'docs/python.md'
|
|
|
|
Signed-off-by: Thulio Ferraz Assis <3149049+f0rmiga@users.noreply.github.com>
|
|
|
|
Gazelle plugin
* Add new example to --deleted_packages
* Update examples/build_file_generation/BUILD
Co-authored-by: Jonathon Belotti <jonathon@canva.com>
* fix: gazelle:exclude on coarse-grained
Signed-off-by: Thulio Ferraz Assis <3149049+f0rmiga@users.noreply.github.com>
* fix: comment on Kinds()
Co-authored-by: Jonathon Belotti <jonathon@canva.com>
* owner: f0rmiga
Signed-off-by: Thulio Ferraz Assis <3149049+f0rmiga@users.noreply.github.com>
* fix: build and setuptools pinned versions
With the recent change in pypa/setuptools#2769, some wheels started to
fail build immediately with an unpinned setuptools in isolation mode.
Signed-off-by: Thulio Ferraz Assis <3149049+f0rmiga@users.noreply.github.com>
* refactor: use local_repository in examples
Signed-off-by: Thulio Ferraz Assis <3149049+f0rmiga@users.noreply.github.com>
* bump: examples Bazel version
Signed-off-by: Thulio Ferraz Assis <3149049+f0rmiga@users.noreply.github.com>
* fix: add missing .gitignore to example
Signed-off-by: Thulio Ferraz Assis <3149049+f0rmiga@users.noreply.github.com>
* refactor: remove python_coarse_grained_generation
Also add the python_generation_mode directive.
Signed-off-by: Thulio Ferraz Assis <3149049+f0rmiga@users.noreply.github.com>
* fix: gazelle spam from org_golang_x_tools
Signed-off-by: Thulio Ferraz Assis <3149049+f0rmiga@users.noreply.github.com>
* revert: example .bazelversion
Signed-off-by: Thulio Ferraz Assis <3149049+f0rmiga@users.noreply.github.com>
* fix: simplify std_modules.py
Signed-off-by: Thulio Ferraz Assis <3149049+f0rmiga@users.noreply.github.com>
* feat: test py_library without __init__.py
Signed-off-by: Thulio Ferraz Assis <3149049+f0rmiga@users.noreply.github.com>
* feat: manifest generation tag manual
Signed-off-by: Thulio Ferraz Assis <3149049+f0rmiga@users.noreply.github.com>
* fix: check std modules last
Performing the check last is more correct and yields better performance,
noticeable on large repositories.
Signed-off-by: Thulio Ferraz Assis <3149049+f0rmiga@users.noreply.github.com>
Co-authored-by: Alex Eagle <eagle@post.harvard.edu>
Co-authored-by: Jonathon Belotti <jonathon@canva.com>
|
|
Previously we just suggested you run a shell script to update, but there was no clue when that was needed in a PR
|
|
|
|
BREAKING CHANGE:
The load statement for "pip_import" and "pip_repositories" has moved to //python/legacy_pip_import:pip.bzl
Use of the old load site will print a failure message indicating this.
|
|
This runs a py_test with a copy of bazel as a data dep.
It glob()s up the sources for each example and runs nested bazel test on them.
This detects whether the examples are fully working and self-contained.
Follow-up step is to replace the rules_python.tgz with a HEAD version so we detect
breakages.
|
|
This lets users understand the example in isolation. They can copy/paste the example directory
and it works correctly.
This refactors the existing examples which are quite weak, only really demonstrating pip usage.
This makes room for examples demonstrating other features (like protocol buffers) or package
managers (like poetry).
In a later commit I'll add bazel-integration-testing so we get a test target that confirms
the examples build (including their WORKSPACE being self-contained)
|
|
It's currently a stalled project so it's not useful for us to direct new users there in our README.
Separately it is harder to develop on rules_python since it is currently not self-contained.
For example it's hard to find or adjust the version of rules_pkg without looking/editing in the federation repo.
Tony says this is an okay change: https://github.com/bazelbuild/bazel-federation/commit/63f9746afd4e8564d1033c529ce5065f69d6c7f9#commitcomment-40577834
|
|
This migrates the repo to satisfy buildifier and adds buildifier as a presubmit.
|
|
This adds a packaging target to create a Bazel Federation-compliant distribution.
|
|
|
|
This commit allows rules_python to be a member of the Bazel federation, since it adds the required bzl files related to setup and dependencies.
Moreover, it also changes the WORKSPACE to fetch all dependencies through the federation.
rules_python_internal_setup() in internal_setup.bzl still needs some work since some of the dependencies don't export their proper setup functions yet, which means that the present commit has to work around that particular problem.
|