Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

This adds support for applying overlapping patches to the same AST witho... #4

Merged
merged 1 commit into from Apr 23, 2012

Conversation

oyvindkinsey
Copy link
Contributor

...ut having to do multiple passes on the entire file.

…thout having to do multiple passes on the entire file.
@CGamesPlay
Copy link

I'm nervous about the performance trade-off this has, but it's a good change for now. Also, really need test coverage on the jspatch code :-X

CGamesPlay pushed a commit that referenced this pull request Apr 23, 2012
This adds support for applying overlapping patches to the same AST witho...
@CGamesPlay CGamesPlay merged commit a1f0d72 into facebookarchive:master Apr 23, 2012
@oyvindkinsey
Copy link
Contributor Author

Unfortunately it's currently the only way to make a pass of jspatch consistent - without this there's no guarantee that every patch in the patchfile will be applied to the source.

Of course, the optimal solution would be to only properly keep track of the modified segments so at to allow overlapping change sets.

Alternatively a separate mode where the AST is modified freely and then compiled back in to js.

@CGamesPlay
Copy link

Oh, and of course this change means that jspatch might not terminate (without crashing) :)

Either of the proposed solutions is better. We can deal with it later.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants