@@ -8,6 +8,7 @@ def _new_java_info_subject(java_info, meta):
8
8
public = struct (
9
9
compilation_args = lambda : _new_java_compilation_args_subject (self .actual , self .meta ),
10
10
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" )),
11
12
)
12
13
return public
13
14
@@ -20,30 +21,31 @@ def _java_info_subject_from_target(env, target):
20
21
))
21
22
22
23
def _new_java_compilation_args_subject (java_info , meta ):
24
+ is_binary = getattr (java_info , "_is_binary" , False )
23
25
actual = struct (
24
26
transitive_runtime_jars = java_info .transitive_runtime_jars ,
25
27
compile_jars = java_info .compile_jars ,
26
28
transitive_compile_time_jars = java_info .transitive_compile_time_jars ,
27
29
full_compile_jars = java_info .full_compile_jars ,
28
30
_transitive_full_compile_time_jars = java_info ._transitive_full_compile_time_jars ,
29
31
_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
32
33
self = struct (
33
34
actual = actual ,
34
35
meta = meta ,
35
36
)
36
37
return struct (
37
38
equals = lambda other : _java_compilation_args_equals (self , other ),
39
+ equals_subject = lambda other : _java_compilation_args_equals (self , other .actual ),
38
40
self = self ,
39
41
actual = actual ,
40
42
)
41
43
42
44
def _java_compilation_args_equals (self , other ):
43
- if self .actual == other . actual :
45
+ if self .actual == other :
44
46
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 )
47
49
this_attr = getattr (self .actual , attr )
48
50
if this_attr != other_attr :
49
51
self .meta .derive (attr ).add_failure (
0 commit comments