Skip to content

Add example analysis_test with configuration #1343

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rbeazleyspot
Copy link
Contributor

@rbeazleyspot rbeazleyspot commented Jun 25, 2025

WIP

exploring analysis tests with different configuration properties set

arrange.bzl produces a small set of targets

[main_target_library] --dep--> [dependency_a] --dep--> [dependency_a_trans_dep_jar]

experimental_prune_transitive_deps_tests.bzl

has two tests, one test enables experimental_prune_transitive_deps the other dosnt.

basic assertions around the KotlinCompile action to check --classpath, --direct_dependencies and inputs

[dependency_a_trans_dep_jar] should be dropped when the experimental flag is enabled

for these tests to work I think all flags need to be public, ie not the ones in the internal/kotlin/kt_configure_toolchains function

These tests dont run perfectly yet but i thought i would share what i have so far, i have an issue with checking absolute paths atm

  0: bazel-out/darwin_arm64-fastbuild/bin/src/test/starlark/rules/enabled_dependency_a.abi.jar
actual argv:
  0: external/+rules_kotlin_extensions+com_github_jetbrains_kotlin_git/lib/annotations-13.0.jar
  1: external/+rules_kotlin_extensions+com_github_jetbrains_kotlin_git/lib/kotlin-stdlib.jar
  2: external/+rules_kotlin_extensions+com_github_jetbrains_kotlin_git/lib/kotlin-stdlib-jdk7.jar
  3: external/+rules_kotlin_extensions+com_github_jetbrains_kotlin_git/lib/kotlin-stdlib-jdk8.jar
  4: bazel-out/darwin_arm64-fastbuild-ST-d9dfb3145612/bin/src/test/starlark/rules/enabled_dependency_a.abi.jar

im guessing darwin_arm64-fastbuild-ST-d9dfb3145612 is something to do with the "reconfiguration" when the analysis test runs with the new flags

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant