Closed nabbar closed 10 months ago
Hi! In short calling EnableTriggerComplete disables setting total. For more please refer to: https://github.com/vbauerster/mpb/blob/fab44347b86bef9303c52067ebfb1b8831acacd1/bar_test.go#L70 https://github.com/vbauerster/mpb/blob/fab44347b86bef9303c52067ebfb1b8831acacd1/bar_test.go#L101
Hello,
First of all thank you for your library, it's great :)
I have a problem with the latest version v8 and the "complex bar". This issue was not found in V5. (I just upgraded to V8, but this problem seems to be present in v6, v7 too).
I made an example here: Go Playground
Here's the problem:
Make a loop for each bar:
The bar with a total set at creation will work normally but the bar created with 0 as total will have 0 when executed, even after a SetTotal.
When I analyze, not all complex bars have started, this value has a false value: bState.triggerComplete. But once the first bar is finished, this value will have real value for all the others.
I think the problem comes from this test which is triggered once a bar is finished and remains valid for all the others.![image](https://github.com/vbauerster/mpb/assets/19818221/2875bad4-db23-48e2-a76c-6800fff168ce)
https://github.com/vbauerster/mpb/blob/master/bar.go#L211
It's possible that I missed something, unless it's a bug or expected behavior (but in this case, I didn't see it in the migration details)