Page MenuHomePhabricator

`differential.generated-paths` doesn't actually prevent code from being shown in Differential
Closed, InvalidPublic


My differential.generated-paths is set to ["#^Gemfile.lock$#","/compiled\\.js$/","#/vendor/#"], but I'm looking at a diff which adds files underneath vendor/... and they're showing up as the full file. I've run ./bin/cache purge --purge-all and refreshed.

Related Objects

Event Timeline

nornagon raised the priority of this task from to Needs Triage.
nornagon updated the task description. (Show Details)
nornagon added a project: Differential.
nornagon added a subscriber: nornagon.

I don't see that it takes JSON, looking at the form.

chad claimed this task.

Presume operator error. Let us know if you have problems after updating the field.

It seems to show the "Current Value" as JSON in the config summary, but it's set to a newline-separated list in the actual value:

☺_Differential_Configuration.png (158×896 px, 28 KB)

☺_Edit_differential_generated-paths.png (630×724 px, 50 KB)

That's correct.

That's how I have the value set and it still expands by default files whose
path matches one of those regexes.

Oh, it wasn't really clear. I thought you were saying it worked, but the config page was different/confusing.

chad removed chad as the assignee of this task.Aug 1 2015, 5:01 PM

D13885 is a test I ran, at least on this instance regex's are working fine with @^webroot/rsrc/image/autosprite\.png$@

I can't reproduce this. Here's what I did:

I configured differential.generated-paths like your example:

Screen Shot 2015-09-27 at 6.31.09 AM.png (978×1 px, 161 KB)

I made some changes locally:

$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

	new file:   Gemfile.lock
	new file:   something-with-compiled.js
	new file:   vendor/example.c

I arc diff'd these changes, and got hits on two rules:

Screen Shot 2015-09-27 at 6.33.17 AM.png (503×1 px, 61 KB)

The third rule doesn't hit because it requires a leading /. I modified the rule into:


Then ran arc diff again and got hits on all three rules:

Screen Shot 2015-09-27 at 6.34.04 AM.png (527×1 px, 66 KB)

Note that these rules are evaluated the first time a changeset is rendered, not each time we re-render a changeset. If you're reloading existing diffs, they won't re-evaluate the rules. I'm going to assume that's the issue here and fix this with a documentation change.

epriestley claimed this task.

Never mind, there's already such a note.

cache_note.png (978×1 px, 134 KB)

I had this same issue because it wasn't clear to me from the example regex's that #/vendor/# wouldn't match a vendor folder that's at the root. Would it make sense to change that 2nd example value (#/autobuilt/#) to something like the modified rule from your comment? #(^|/)autobuilt/#