Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rsc re-uses DirectoryDigest from process execution rather than re-snapshotting #7861

Conversation

illicitonion
Copy link
Contributor

No description provided.

@illicitonion
Copy link
Contributor Author

Depends on #7858

Copy link
Sponsor Member

@stuhood stuhood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Copy link
Contributor

@cosmicexplorer cosmicexplorer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wonderful!!!

@@ -678,14 +656,13 @@ def _runtool_nonhermetic(self, parent_workunit, classpath, main, tool_name, args
return runjava_workunit

def _runtool(self, args, distribution,
tgt=None, input_digest=None, output_dir=None):
tgt=None, input_digest=None, ctx=None):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great change!

@@ -361,7 +337,7 @@ def work_for_vts_rsc(vts, ctx):
classpath_product = self.context.products.get_data('rsc_mixed_compile_classpath')
classpath_entries = classpath_product.get_classpath_entries_for_targets(dependencies_for_target)
for _conf, classpath_entry in classpath_entries:
classpath_paths.append(classpath_entry.path)
classpath_paths.append(fast_relpath(classpath_entry.path, get_buildroot()))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keeping the path as absolute within the ClasspathEntry itself seems definitely like the right thing to do here -- thanks for making this consistent compared to the first diff I had posted!

@cosmicexplorer
Copy link
Contributor

I might note in the description that this fixes what is almost definitely a quadratic slowdown induced by filesystem traversals -- or perhaps link to #7838 / steal that PR's description.

@illicitonion
Copy link
Contributor Author

I might note in the description that this fixes what is almost definitely a quadratic slowdown induced by filesystem traversals -- or perhaps link to #7838 / steal that PR's description.

#7858 was the PR that did that; this just stops re-snapshotting one file, the output jar from rsc :)

@illicitonion illicitonion merged commit 42f162d into pantsbuild:master Jun 7, 2019
@illicitonion illicitonion deleted the dwagnerhall/rsc/avoid-re-snapshotting-2 branch June 7, 2019 08:52
stuhood pushed a commit that referenced this pull request Jun 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants