Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
use jdeps to run dep-usage task #8093
The current implementation of the dep-usage goal uses analysis files which are output from zinc compiles to track dependencies between java and scala targets. We want to replace zinc with rsc eventually so we need to disconnect the dep usage and dep linting tasks from zinc output.
We replace using zinc analysis files to track target dependencies with the the jdk tool
Changes are transparent to the user with the exception of the format of one error message when the user requests pants lint with the
Thanks, looks good!
We'll need to add deprecations for the removed products, and find a cleaner way to locate the jdeps binary, but should be able to save that for when CI is greener.
Regarding deprecation: what you can do is claim to continue to export these products in
Gotcha, I didn’t follow it all the way down so I assumed it was using zinc output somewhere. Shouldn’t be a problem to use that for the deps classpath then.…
On Thu, Jul 25, 2019 at 11:49 Stu Hood ***@***.***> wrote: ***@***.**** commented on this pull request. ------------------------------ In src/python/pants/backend/jvm/tasks/analysis_extraction.py <#8093 (comment)>: > - classes_by_source, - product_deps_by_src) - - def _extract_analysis(self, target, analysis_file, summary_json_file): - target_classpath = self._zinc.compile_classpath('runtime_classpath', target) - analysis_by_cp_entry = self._analysis_by_runtime_entry - upstream_analysis = list(self._upstream_analysis(target_classpath, analysis_by_cp_entry)) + jdeps_output_json, + product_deps_by_target) + + @memoized_property + def _jdeps_summary_line_regex(self): + return re.compile(r"^.+\s->\s(.+)$") + + def _run_jdeps_analysis(self, target, target_artifact_classpaths, potential_deps_classpaths, jdeps_output_json): + with self.aliased_classpaths(potential_deps_classpaths) as classpaths_by_alias: The goal is to remove reliance on usage of the zinc tool: but this classpath-computation codepath is our code, and will likely just be renamed at some point. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#8093?email_source=notifications&email_token=ABFQH5A57NCUZ4MDUIXZPELQBHYUPA5CNFSM4IF6DSJKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB7TVGMA#discussion_r307449048>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ABFQH5CROIYH4BGJ6QMC5G3QBHYUPANCNFSM4IF6DSJA> .
Jul 26, 2019
1 check passed
Apologies, I'm going to revert this because @stuhood found that it causes some issues in the pantsbuild repo:
Hopefully we can get it re-landed soon! :)