MiniZincIDE icon indicating copy to clipboard operation
MiniZincIDE copied to clipboard

Adding to "Extra solver search paths" does not work (macOS 12.6 Intel, MiniZincIDE 2.6.4)

Open PerMildner opened this issue 3 years ago • 4 comments

I added the OR tools solvers directory to "Extra solver search paths" but when I press OK on the preferences dialog and then open the preferences again, the "Extra solver search paths" is empty again. The same thing happens with SICStus Prolog, so it does not seem to be specific to OR tools.

See screen shot. extra_solver_search_paths

PerMildner avatar Sep 27 '22 20:09 PerMildner

The preferences are (AFAIK) stored in the ~ /.minizinc/Preferences.json file.

  • If you add solver path in the GUI, does the preference file change?
  • If you add the change manually, does it show up in the GUI?

For reference, the relevant part would look like this

{
    "mzn_solver_path": [
        "/Users/permsolvers/bin//or-tools_cpp_MacOsX-12.5_v9.4.1874/share/minizinc/solvers",
        /// ... additional solver paths
    ],
    // ... additional preferences
}

zayenz avatar Sep 28 '22 08:09 zayenz

If I first create an empty ~/.minizinc/ folder, everything seems to work as it should (a Preferences.json is created when I add a path in the IDE, and the menu in the IDE shows OR Tools as a choice when I close the settings dialog).

PerMildner avatar Sep 28 '22 08:09 PerMildner

There may be a similar problem on Windows 10. I tried to configure the IDE but the setting disappeared, and there is no user-setting directory C:Users/spdev/AppData/Roaming/MiniZinc/ created (the user is "spdev"). I.e. the directory used for "userConfigFile" and "userSolverConfigDir", as shown by minizinc.exe --config-dir, is not created automatically, it seems.

Also on Windows 10, manually creating the user-specific MiniZinc directory makes the preference save the settings for "Extra solver search paths".

PerMildner avatar Sep 28 '22 20:09 PerMildner

Thanks for reporting this issue. Indeed the user configuration directory was not being created when modifying the solver search paths. This will be fixed in the next release. As a workaround for now, it can be manually created, or if you add a new solver/modify a solver in the Solvers tab it will also be created.

cyderize avatar Sep 28 '22 23:09 cyderize