google / or-tools

Google's Operations Research tools:
https://developers.google.com/optimization/
Apache License 2.0
11.24k stars 2.13k forks source link

Breaking change in version bump from 8.0 to 8.1 #3115

Closed hklarner closed 6 months ago

hklarner commented 2 years ago

Version: 8.0.8283 and 8.1.8487 Language: Python 3.8 Solver: Routing System: Ubuntu 20.04

When I update to ortools version from 8.0.8283 to 8.1.8487 my code breaks. It is difficult for me to generate a MWE (I am working on it), but it is a vehicle routing problem that uses only a time dimension. I will post a MWE as soon as I have it, but in the mean time I was wondering if you already have a suggestion of what might be the cause from looking at the error message:

Process finished with exit code 134 (interrupted by signal 6: SIGABRT)
terminate called after throwing an instance of 'std::bad_function_call'
  what():  bad_function_call
Aborted (core dumped)
lperron commented 2 years ago

why not use 9.2 ? We will not fix 8.1.

hklarner commented 2 years ago

I want to use 9.2, yes. I bumped from 7 to 9.2 but noticed the break. 8.1 is the first breaking version for me.

Mizux commented 2 years ago
  1. Google use internally a mono repo without a concept of version...
  2. OR-Tools is an aggregate of several components (cp-sat, mpsolver etc..) so while some are stable/mature other are in development e.g. a breaking change in MPSolver is irrelevant for routing user...
  3. We don't have the (human) ressource to split the repo per components which would have their own semantic versionning.
  4. This is research code without public/private code separation so everything is virtually public so it is virtually impossible for us to NOT break any API each time a new commit is pushed... ref: https://xkcd.com/1172/
  5. Currently we bump the major when adding new components or large refactor, and bump the minor for regular (breaking change) update...
hklarner commented 2 years ago

@Mizux thanks for the link, I did not know about this "mono repo".

I opened this issue because I hoped you might have a clue what is going on, given the error message. Like, generally speaking, what could be the cause? Garbage collection maybe?

But yeah, this issue is just a desperate attempt at speeding up my code changes for running v9.2.

jmarca commented 2 years ago

This is an old issue, so perhaps not relevant anymore, but one approach is to see what changed using git.

Clone OR Tools on your local machine, then do:

git diff v8.0 v8.1 ortools/constraint_solver/routing.*

of for 9.3,

git diff v8.0 v9.3 ortools/constraint_solver/routing.*

Or similar. This will give you a clue what changed in the routing solver without having to wade through all the other stuff that changed.

Mizux commented 6 months ago

nothing we can do here, beside trying to better advertise breaking changes in release note...