Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: bazelbuild/rules_testing
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.5.0
Choose a base ref
...
head repository: bazelbuild/rules_testing
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.6.0rc1
Choose a head ref
  • 13 commits
  • 10 files changed
  • 4 contributors

Commits on Oct 11, 2023

  1. chore: Disable Bzlmod explicitly for workspace setup (#73)

    The upcoming Bazel version defaults to having bzlmod enabled, which means workspace
    builds will need to explicitly disable it to continue to be workspace-based.
    
    bazelbuild/bazel#18958
    meteorcloudy authored Oct 11, 2023
    Configuration menu
    Copy the full SHA
    8c70cee View commit details
    Browse the repository at this point in the history
  2. chore: fix order of loads to satisfy buildifier check

    A recent commit changed the order to satisfy the internal ordering, but
    ended up breaking the external ordering.
    
    PiperOrigin-RevId: 572474447
    rickeylev authored and Blaze Rules Copybara committed Oct 11, 2023
    Configuration menu
    Copy the full SHA
    b88ee3c View commit details
    Browse the repository at this point in the history

Commits on Dec 6, 2023

  1. docs: document 0.4.0 and 0.5.0 changes

    The last couple releases didn't have the changelog updated to reflect what
    was actually released.
    
    PiperOrigin-RevId: 588396254
    rickeylev authored and Blaze Rules Copybara committed Dec 6, 2023
    Configuration menu
    Copy the full SHA
    fc5c104 View commit details
    Browse the repository at this point in the history

Commits on Dec 8, 2023

  1. chore: upgrade (dev only dependency) rules_python 0.22.0 -> 0.27.0

    This removes a hack to make the dev-only register_toolchains() call
    not break the production configuration. This hack is no longer necessary
    as of rules_python 0.23.0 and higher. Version 0.27.0 is chosen because
    the latest release has some code for building Sphinx documentation
    I'd like to experiment with re-using.
    
    Coincidentally, this should also fix an an issue with the Bazel@HEAD
    downstream CI pipeline running tests for Mac/Windows that should be
    skipped, but fail due to very early MODULE-phase errors. With this
    change, it's able to get past that failure and run enough that the
    Bazel@HEAD downstream CI should be happy. Note those tests aren't
    gauranteed to continue to work on those platforms, they just happen to.
    
    Fixes #76
    rickeylev committed Dec 8, 2023
    Configuration menu
    Copy the full SHA
    082e330 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #81 from rickeylev:upgrade.rules.python

    PiperOrigin-RevId: 589135805
    Blaze Rules Copybara committed Dec 8, 2023
    Configuration menu
    Copy the full SHA
    3eb7423 View commit details
    Browse the repository at this point in the history

Commits on Dec 11, 2023

  1. feat: allow custom target-under-test attributes

    This allows customizing what attributes are considered a target under test,
    i.e. that they have aspects, config settings, etc applied. This allows having
    multiple targets be tested, which is useful for comparing targets in different
    configurations, multiple targets with a custom configuration, or some combination
    of that.
    
    When this is used, the implementation function is passed a struct of the
    targets under test, keyed by their attribute name, instead of the singular
    target under test.
    
    Fixes #67
    
    PiperOrigin-RevId: 589888837
    rickeylev authored and Blaze Rules Copybara committed Dec 11, 2023
    Configuration menu
    Copy the full SHA
    28486ac View commit details
    Browse the repository at this point in the history

Commits on Dec 12, 2023

  1. fix(analysis_test)!: make all args keyword only

    By convention, rule-like macros and rules should be called with keyword args.
    Enforce this by using `*` notation in the `analysis_test` signature.
    
    BREAKING CHANGE:
      * If you were passing any positional args, you must update the calls
        to use keyword args.
    
    PiperOrigin-RevId: 590253370
    rickeylev authored and Blaze Rules Copybara committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    d86056e View commit details
    Browse the repository at this point in the history

Commits on Feb 15, 2024

  1. Add support for provider maps to rules_testing

    Currently, If you are testing a custom provider, the API requires you to write:
        env.expect.that_target(targets.foo).provider(FooInfo, factory=FooFactory)...
        env.expect.that_target(targets.foo).provider(BarInfo, factory=BarFactory)...
    
    This can get very tedious, and more importantly, is not very safe, since you can write:
        env.expect.that_target(targets.foo).provider(FooInfo, factory=FooFactory)...
        env.expect.that_target(targets.foo).provider(BarInfo, factory=FooFactory)...
    
    Additionally, custom types are always rendered as "<provider>".
    
    To solve this, we add the ability to directly specify a list of factories for custom types in your test.
    
    analysis_test(
        ...,
        provider_factories = [struct(type = FooInfo, name = "FooInfo", factory = FooFactory)]
    )
    
    PiperOrigin-RevId: 607174706
    A Googler authored and Blaze Rules Copybara committed Feb 15, 2024
    Configuration menu
    Copy the full SHA
    da76c59 View commit details
    Browse the repository at this point in the history
  2. Update changlog for 0.6.0 release

    PiperOrigin-RevId: 607232096
    rickeylev authored and Blaze Rules Copybara committed Feb 15, 2024
    Configuration menu
    Copy the full SHA
    c9abae8 View commit details
    Browse the repository at this point in the history
  3. breaks internal tests

    PiperOrigin-RevId: 607261014
    A Googler authored and Blaze Rules Copybara committed Feb 15, 2024
    Configuration menu
    Copy the full SHA
    1d2ce3f View commit details
    Browse the repository at this point in the history

Commits on Feb 18, 2024

  1. Roll forward of "Add support for provider maps to rules_testing"

    PiperOrigin-RevId: 608172011
    A Googler authored and Blaze Rules Copybara committed Feb 18, 2024
    Configuration menu
    Copy the full SHA
    4528096 View commit details
    Browse the repository at this point in the history

Commits on Feb 19, 2024

  1. Fix expect.that_struct. It is currently broken, since it won't take i…

    …n attrs, and attrs in a mandatory attribute for the new function on a struct.
    
    Also add expect.that_value to allow you to work with arbitrary types
    
    PiperOrigin-RevId: 608252913
    A Googler authored and Blaze Rules Copybara committed Feb 19, 2024
    Configuration menu
    Copy the full SHA
    fd1237c View commit details
    Browse the repository at this point in the history

Commits on Feb 20, 2024

  1. provide "meta" as a kwarg. Previously it would work if your factory d…

    …efined
    
    def factory(value, meta)
    
    but would fail if you wrote the signature as
    
    def factory(value, *, meta)
    
    PiperOrigin-RevId: 608504071
    A Googler authored and Blaze Rules Copybara committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    220fb65 View commit details
    Browse the repository at this point in the history
Loading