MathNya / umya-spreadsheet

A pure rust library for reading and writing spreadsheet files
MIT License
238 stars 41 forks source link

insert_and_remove_cells incorrect output #155

Closed meettitan closed 6 months ago

meettitan commented 7 months ago

The insert_and_remove_cells test is non deterministically removing and shuffling cells.

One run of the test yields: Screenshot from 2023-12-02 19-52-12

while another run yields: Screenshot from 2023-12-02 19-52-49

Neither of which seem correct.

MathNya commented 7 months ago

@meettitan Thank you for your report. We will investigate the cause of the problem and proceed with the repair.

meettitan commented 7 months ago

You're welcome! Thank you for the work you've already done, and the timely response. You've got a great crate here, and if this is fixed I'll definitely use it in production for a few projects.

I did some preliminary debugging, and I think it's only happening when bubbling up rows after deletion. When I have more time I'll look into it more and report here.

Thanks again, Sean

MathNya commented 6 months ago

@meettitan We were able to identify the cause of the malfunction. We will release a corrected version as soon as possible.

meettitan commented 6 months ago

@MathNya Very nice, you guys beat me to the solution! I had only gotten to the map collisions in Cells::rebuild_map().

I look forward to seeing your solution, and contributing in the future. Thanks again guys!

MathNya commented 6 months ago

@meettitan The latest version has been released. Please check it out.

meettitan commented 6 months ago

@MathNya I have looked into it and was testing the solution. I think some style formatting may still be incorrect, but I haven't had time to fully test. The core issue is resolved, I'll mark it as such; and if I can reproduce the styling issue concisely, I'll open a separate issue. Thanks again for your time.