difftastic icon indicating copy to clipboard operation
difftastic copied to clipboard

Be smarter about splitting up work when there's novel code at the end of a file

Open Wilfred opened this issue 4 months ago • 2 comments

struct Foo {
  // New
  let x = 1

  // In both
  let y = 2
}

struct Unchanged {}

// New
func bar() {}

We shouldn't need to consider bar, and definitely shouldn't hit the graph limit here.

Wilfred avatar Sep 05 '25 16:09 Wilfred

The file Protos/Tests/SwiftProtobufTests/generated_swift_names_fields.proto in https://github.com/apple/swift-protobuf/commit/e271b13e96c351084229eb0a9a55290b4002ba01#diff-3bd8bc669a3a912d4a8381aec5bc7704ddb1b48e9f054b09a76d758dac097cea seems to be hitting the graph limit and might be a good test case.

See also #629 and #623.

Wilfred avatar Nov 16 '25 16:11 Wilfred

https://github.com/apple/swift-protobuf/commit/60153e3ee8adf563dac27c19d1c680ba5c723312#diff-d9afc38bdc272c3d9e8f79273b50970fd122303e5b04ffb82fc5c758091c372d is another interesting test case, only a few lines changing in a large file but hitting the graph limit.

Wilfred avatar Nov 16 '25 16:11 Wilfred