rluvaton commented on issue #22192:
URL: https://github.com/apache/datafusion/issues/22192#issuecomment-4476851119

   sorry, I'm having hard time to understand.
   
   could you please answer the following questions for each of the cases I list 
below:
   1. what label will be added/removed if any
   2. what comment will be added/updated/removed if any with what breaking 
changes being flagged
   3. will it show failure in CI and which ci job?
   
   
   ## Scenario
   Latest released crate has the following code
   ```rust
   pub fn hello() -> u32 {
      1
   }
   
   pub fn world() -> u32 {
      2
   }
   
   pub fn how() -> u32 {
      3
   }
   ```
   
   main is:
   ```rust
   pub fn hello(arg: u32) -> u32 { // <-- added arg - breaking change
      1
   }
   
   pub fn world(a: u32, b: u32) -> u32 { // <-- added 2 args, breaking change
      2
   }
   
   pub fn how() -> u32 {
      3
   }
   ```
   
   which in diff against the released version is:
   ```diff
   -pub fn hello() -> u32 {
   +pub fn hello(arg: u32) -> u32 {
      1
   }
   
   -pub fn world() -> u32 {
   +pub fn world(a: u32, b: u32) -> u32 {
      2
   }
   ```
   
   ## PRs against main
   
   
   <details>
   <summary>Revert all the breaking changes made in main</summary>
   
   #### Diff against main
   ```diff
   -pub fn hello(arg: u32) -> u32 {
   +pub fn hello() -> u32 {
      1
   }
   
   -pub fn world(a: u32, b: u32) -> u32 {
   +pub fn world() -> u32 {
      2
   }
   ```
   
   #### Diff against the released version
   no diff
   
   </details>
   
   
   <details>
   <summary>Revert one of the breaking changes</summary>
   
   #### Diff against main
   ```diff
   -pub fn hello(arg: u32) -> u32 {
   +pub fn hello() -> u32 {
      1
   }
   ```
   
   #### Diff against the released version
   only include the non-reverted breaking change:
   ```diff
   -pub fn world() -> u32 {
   +pub fn world(a: u32, b: u32) -> u32 {
      2
   }
   ```
   
   </details>
   
   <details>
   <summary>add another breaking change that DOES NOT depend on the already 
breaking changes</summary>
   
   #### Diff against main
   ```diff
   -pub fn how() -> u32 {
   +pub fn how(another: u32) -> u32 {
      3
   }
   ```
   
   #### Diff against the released version
   only existing breaking changes and the new one (adding arg to `how` function)
   ```diff
   -pub fn hello() -> u32 {
   +pub fn hello(arg: u32) -> u32 {
      1
   }
   
   -pub fn world() -> u32 {
   +pub fn world(a: u32, b: u32) -> u32 {
      2
   }
   
   -pub fn how() -> u32 {
   +pub fn how(another: u32) -> u32 {
      3
   }
   ```
   
   </details>
   
   <details>
   <summary>Add non-breaking changes that depend on a breaking change that 
already exists on main</summary>
   
   #### Diff against main
   ```diff
   pub fn hello(arg: u32) -> u32 {
   +  println!("hello {arg}");
      1
   }
   ```
   
   #### Diff against the released version
   ```diff
   -pub fn hello() -> u32 {
   +pub fn hello(arg: u32) -> u32 {
   +  println!("hello {arg}");
      1
   }
   
   -pub fn world() -> u32 {
   +pub fn world(a: u32, b: u32) -> u32 {
      2
   }
   ```
   
   </details>
   
   <details>
   <summary>Add non-breaking changes to a function that was not broke</summary>
   
   #### Diff against main
   ```diff
   pub fn how() -> u32 {
   +  println!("how");
      3
   }
   ```
   
   #### Diff against the released version
   ```diff
   -pub fn hello() -> u32 {
   +pub fn hello(arg: u32) -> u32 {
      1
   }
   
   -pub fn world() -> u32 {
   +pub fn world(a: u32, b: u32) -> u32 {
      2
   }
   
   pub fn how() -> u32 {
   +  println!("how");
      3
   }
   ```
   
   </details>
   
   <details>
   <summary>Modify existing breaking changes</summary>
   
   #### Diff against main
   ```diff
   -pub fn hello(arg: u32) -> u32 {
   +pub fn hello(arg: usize) -> u32 {
      1
   }
   ```
   
   #### Diff against the released version
   ```diff
   -pub fn hello() -> u32 {
   +pub fn hello(arg: usize) -> u32 {
      1
   }
   
   -pub fn world() -> u32 {
   +pub fn world(a: u32, b: u32) -> u32 {
      2
   }
   
   pub fn how() -> u32 {
      3
   }
   ```
   
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to