-
Notifications
You must be signed in to change notification settings - Fork 1.2k
"Assuming foo.src.zip is a JAR and renaming to foo.src.jar" suggestion should be "... and renaming to foo-sources.jar" #855
Comments
cc @shs96c |
Maybe zip appends We used |
OK, I looked into it and found the root cause: Jsr199Javac.java:391 reads:
where the definitions of the constants are:
so after following the suggestion form the warning:
and renaming
Moreover, looking at the current documentation, i see that this new warning/suggestion isn't reflected there as well:
|
Unrelated to this issue, but it worth noting, that Bazel requires another suffix:
It would be nice if Buck could also support it, so that identical rules can be used in both tool chains. |
Oh I see what is going on: you have a genrule creating a source jar and use it both as sources and as binary in a prebuilt_jar. Let's see what we can do. |
cc @marcinkosiba, @shs96c |
It was fixed by renaming the input file. |
This version fixed a major issue: [1] that was a reason of frustration of many plugin developers: Not cache sources files under symbolic link. Now for all such source files, the warning is issued: " Disabling caching for target //plugins/wip:wip__plugin, because one or more input files are under a symbolic link ({plugins/wip=/home/davido/projects/wip}). This will severely impact performance! To resolve this, use separate rules and declare dependencies instead of using symbolic links. " To suppress this warning we add project.allow_symlink option. This doesn't have any impact for gerrit core but silences the warning above when plugins are built in gerrit tree mode. As pointed out in this issue: [2], we are using some artifacts as source to the java_library() rule as well as binary_jar for prebuilt_ja rule. To avoid the warning, we rename sources to have "-sources.jar" suffix and we rename *.zip to end with .jar in other places. " Assuming edit.src.zip is a JAR and renaming to edit.src.jar in //gerrit-patch-jgit:edit_src. Change the extension of the binary_jar to '.jar' to remove this warning. " source_under_test attribute was removed from java_test() rule. Replication and cookbook-plugin are updated as well. local.properties support was removed, but we use it only for download process customization in our own python script, so that we can keep it usage and not need to move it to .buckconfig.local. [1] facebook/buck#341 [2] facebook/buck#855 Change-Id: Idf76cc71c21df43e808179b645f9175767b322a8
After upgrading to 6a19cf9 we've got this warning:
on this rule:
After renaming the output in the above rule to
edit.src.jar
, the above warning is disappeared andbuck build gerrit
still works.However, after that renaming,
buck test
is failing with this error:To reproduce, clone Gerrit Code Review from here: [1].
The text was updated successfully, but these errors were encountered: