@@ -8,6 +8,7 @@ def _new_java_info_subject(java_info, meta):
88 public = struct (
99 compilation_args = lambda : _new_java_compilation_args_subject (self .actual , self .meta ),
1010 plugins = lambda : _new_java_info_plugins_subject (self .actual , self .meta ),
11+ is_binary = lambda : subjects .bool (getattr (java_info , "_is_binary" , False ), self .meta .derive ("_is_binary" )),
1112 )
1213 return public
1314
@@ -20,30 +21,31 @@ def _java_info_subject_from_target(env, target):
2021 ))
2122
2223def _new_java_compilation_args_subject (java_info , meta ):
24+ is_binary = getattr (java_info , "_is_binary" , False )
2325 actual = struct (
2426 transitive_runtime_jars = java_info .transitive_runtime_jars ,
2527 compile_jars = java_info .compile_jars ,
2628 transitive_compile_time_jars = java_info .transitive_compile_time_jars ,
2729 full_compile_jars = java_info .full_compile_jars ,
2830 _transitive_full_compile_time_jars = java_info ._transitive_full_compile_time_jars ,
2931 _compile_time_java_dependencies = java_info ._compile_time_java_dependencies ,
30- _is_binary = getattr (java_info , "_is_binary" , False ),
31- )
32+ ) if not is_binary else None
3233 self = struct (
3334 actual = actual ,
3435 meta = meta ,
3536 )
3637 return struct (
3738 equals = lambda other : _java_compilation_args_equals (self , other ),
39+ equals_subject = lambda other : _java_compilation_args_equals (self , other .actual ),
3840 self = self ,
3941 actual = actual ,
4042 )
4143
4244def _java_compilation_args_equals (self , other ):
43- if self .actual == other . actual :
45+ if self .actual == other :
4446 return
45- for attr in dir (other . actual ):
46- other_attr = getattr (other . actual , attr )
47+ for attr in dir (other ):
48+ other_attr = getattr (other , attr )
4749 this_attr = getattr (self .actual , attr )
4850 if this_attr != other_attr :
4951 self .meta .derive (attr ).add_failure (
0 commit comments