Improve logic for building daml-lf-archive-java (#2059)

daml-lf-archive-java is put together from the proto sources with the
compiled java classes. However, the logic that picks the java classes
was dependent on the output of $(locations :daml_lf_proto_lib_java),
because it always would pick the first item.

The new logic filters by name rather than position.

Fixes #2058.
This commit is contained in:
Gerolf Seitz 2019-07-09 13:44:36 +02:00 committed by mergify[bot]
parent 2371d173b1
commit 840ee94bf6
2 changed files with 2 additions and 1 deletions

View File

@ -195,7 +195,7 @@ genrule(
], ],
outs = ["daml_lf_archive_java.jar"], outs = ["daml_lf_archive_java.jar"],
cmd = """ cmd = """
INPUT=$$(echo "$(locations :daml_lf_proto_lib_java)" | cut -d ' ' -f 1) INPUT=$$(echo "$(locations :daml_lf_proto_lib_java)" | tr ' ' '\n' | grep -v '\-src.jar')
cp -L $$INPUT $@ cp -L $$INPUT $@
chmod u+w $@ chmod u+w $@
$(location @zip_dev_env//:zip) -g $@ $(locations :proto_srcs) $(location @zip_dev_env//:zip) -g $@ $(locations :proto_srcs)

View File

@ -10,3 +10,4 @@ HEAD — ongoing
-------------- --------------
- [daml assistant] Fix VSCode path for use if not already in PATH on mac - [daml assistant] Fix VSCode path for use if not already in PATH on mac
- [DAML-LF] Fixed regression that produced an invalid daml-lf-archive artefact. See `#2058 <https://github.com/digital-asset/daml/issues/2058>`__.