Skip to content
This repository has been archived by the owner on Aug 5, 2024. It is now read-only.

Commit

Permalink
[fix] aspects don't throw an exception for kotlin rules if an attr do…
Browse files Browse the repository at this point in the history
…esn't exist

Merge-request: BAZEL-MR-378
Merged-by: Marcin Abramowicz <marcin.abramowicz@jetbrains.com>
  • Loading branch information
abrams27 authored and qodana-bot committed Jul 20, 2023
1 parent d594e65 commit fc5383a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@


## [Unreleased]
### Features 🎉
- Experimental `workspace/libraries` endpoint that returns list of external libraries
- Support for Python targets, including `buildTarget/pythonOptions` endpoint

### BREAKING CHANGES 🚨

Expand All @@ -19,9 +16,13 @@
### Features 🎉
- Enhance support for Kotlin by providing Kotlin target's specific info.
| [#BAZEL-460](https://youtrack.jetbrains.com/issue/BAZEL-460)
- Experimental `workspace/libraries` endpoint that returns list of external libraries
- Support for Python targets, including `buildTarget/pythonOptions` endpoint

### Fixes 🛠️
- Now we report the failure of the whole test target and binaries are reporting stdout.
- Aspects don't throw an exception for kotlin rules if an attr doesn't exist.


## [2.7.2]

Expand Down
4 changes: 2 additions & 2 deletions install/src/main/resources/aspects.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def extract_runtime_jars(target, provider):

def extract_compile_jars(provider):
compilation_info = getattr(provider, "compilation_info", None)
transitive_compile_time_jars = getattr(provider, "transitive_compile_time_jars", [])
transitive_compile_time_jars = getattr(provider, "transitive_compile_time_jars", depset())

return compilation_info.compilation_classpath if compilation_info else transitive_compile_time_jars

Expand All @@ -247,7 +247,7 @@ def extract_java_info(target, ctx, output_groups):

runtime_jars = extract_runtime_jars(target, provider).to_list()
compile_jars = extract_compile_jars(provider).to_list()
source_jars = provider.transitive_source_jars.to_list()
source_jars = getattr(provider, "transitive_source_jars", depset()).to_list()
resolve_files += runtime_jars
resolve_files += compile_jars
resolve_files += source_jars
Expand Down

0 comments on commit fc5383a

Please sign in to comment.