aboutsummaryrefslogtreecommitdiff
path: root/internal_deps.bzl
AgeCommit message (Collapse)Author
2024-01-17Revert "Upgrade bazelbuild-rules_python to 0.28.0"Yifan Hong
This reverts commit 1508c18d9e27325a8d9c574a90d205e0a1d8a78f. Reason for revert: breaks build, not caught by treehugger Change-Id: Id40b5eefc5f4f0f6e4a0122fbfa53b0c3c265985
2024-01-06chore: Migrate to rules_bazel_integration_test (#1598)Philipp Schrader
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>
2024-01-05cleanup(dev): remove remnants of old bazel_integration_test code (#1668)Richard Levasseur
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.
2023-12-17doc: switch to pypi.org (#1622)Ignas Anikevicius
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/
2023-10-09doc(bzlmod): bump stardoc to 0.6.2 and enable bzlmod docs building (#1476)Ignas Anikevicius
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
2023-09-13fix(gazelle): upgrade rules_go: 0.39.1 -> 0.41.0 to work with upcoming Bazel ↵Gowroji Sunil
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)
2023-07-11chore: Bump rules_testing to 0.4.0 from 0.0.5 (#1306)Richard Levasseur
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
2023-06-20feat: Upgrading gazelle and rules_go (#1283)Chris Love
Upgrading to the latest version of gazelle and rules_go. This should address `--incompatible_config_setting_private_default_visibility` flag.
2023-05-03tests: Add skylib to various test dependencies to fix CI (#1199)Chris Love
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.
2023-04-27tests: Upgrade rules_testing to 0.0.5 (#1184)Richard Levasseur
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.
2023-02-27test(core): Add analysis tests for base Python rules. (#1102)upstream/0.19.0Richard Levasseur
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
2023-01-29Add missing copyright headers (#1030)Richard Levasseur
* 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
2023-01-25feat(gazelle)!: Move the plugin to a separate workspace (#972)Ignas Anikevicius
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
2023-01-18Implement py_proto_library (#832)Ivo List
* Add py_proto_library * Bump versions of rules_proto and protobuf * Update documentation * Bump rules_pkg version
2022-11-19Fix //docs:update (#876)Philipp Schrader
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'
2022-10-12chore: update go dependencies (#854)Thulio Ferraz Assis
2022-04-08bump: go from 1.17 to 1.18 (#686)Thulio Ferraz Assis
Signed-off-by: Thulio Ferraz Assis <3149049+f0rmiga@users.noreply.github.com>
2021-12-28Deleted legacy pip_import rule (#582)UebelAndre
2021-11-16Gazelle extension for Python (#514)Thulio Ferraz Assis
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>
2021-10-12docs: enforce that api docs are up-to-dateAlex Eagle
Previously we just suggested you run a shell script to update, but there was no clue when that was needed in a PR
2021-06-09Migrate from bazelbuild/skydoc to bazelbuild/stardoc (#484)Jonathon Belotti
2020-09-30move pip_import rule to legacy_pip_importAlex Eagle
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.
2020-08-03ci: add bazel_integration_test (#338)Alex Eagle
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.
2020-07-17feat(examples): move examples to a nested WORKSPACE (#337)Alex Eagle
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)
2020-07-14Remove mention and usage of Bazel Federation (#339)Alex Eagle
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
2019-10-23Enable buildifier presubmit check (#245)Marcel Hlopko
This migrates the repo to satisfy buildifier and adds buildifier as a presubmit.
2019-10-04Use rules_pkg to create distributions (#234)aiuto
This adds a packaging target to create a Bazel Federation-compliant distribution.
2019-10-04remove unneeded references to sass and skydoc. stardoc does not need them (#233)aiuto
2019-08-13Comply with the standards of the Bazel federation (#223)Florian Weikert
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.