Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gringo: Switch to the default SCons version #53566

Merged
merged 1 commit into from Jan 12, 2019
Merged

Conversation

primeos
Copy link
Member

@primeos primeos commented Jan 7, 2019

@vbgl I saw that you've applied this change in 4e0a952, with the following message:

Using version 3 breaks some OCaml packages (namely ppx_deriving_yojson).

Do you still remember if that was a build failure or if the SCons version had some strange affect on the run-time behaviour of the binary?

Just thought I'd ping you before I break it again... (gringo --version still works and I can build all 3 packages that depend on gringo)

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Version 3.0.2 works fine and 2.5.1 is therefore no longer required.
@vbgl
Copy link
Contributor

vbgl commented Jan 7, 2019

@GrahamcOfBorg build opam opam_1_2

@vbgl
Copy link
Contributor

vbgl commented Jan 8, 2019

I do not remember what the failure was. However, at that time, many OCaml packages did depend on opam. This is not the case any longer. Best would be to get feed-back from actual opam users.

This change LGTM.

@primeos
Copy link
Member Author

primeos commented Jan 9, 2019

@vbgl Thank you very much for your feedback :)

I did some further research on this topic with the following findings:

  • The scons version does indeed affect the final binary and could therefore change the runtime behaviour
  • This change is propagated to opam (trough aspcud)
  • http://potassco.sourceforge.net/ states the following: "Development: The latest gringo source code is available on github.com/potasso/clingo. There are branches for each of the major releases." (cc @hakuch)
  • The new webpage (https://potassco.org/clingo/) provides some more information:

clingo combines both gringo and clasp into a monolithic system. This way it offers more control over the grounding and solving process than gringo and clasp can offer individually - e.g., incremental grounding and solving.

Both clingo and gringo are released together in one package.

Attention! The languages of clingo 3 and 4 are not fully compatible because clingo 4 adheres to the recent ASP language standard. For processing legacy encodings, we recommend downloading the latest version of clingo 3 in addition to clingo 4. The language did not change in version 5 but there were many API changes.

And other distributions do not use the older gringo package anymore (Debian still provides a package named gringo (https://packages.debian.org/sid/gringo) but the use the source-code from clingo as well).

clingo uses cmake instead of scons.

Running the following worked (not sure if that was what failed or something else, I'm unfortunately not familiar with OCaml):

nix-shell -I nixpkgs=. -p opam m4 which
opam install ppx_deriving_yojson

I would therefore suggest that we try it again and if it still breaks something we replace gringo with clingo (we should probably do that anyway).

@henrytill (opam maintainer) would you be ok with this? Just want to give you a heads up ;)
@hakuch (gringo maintainer) if you have time for it you could try to switch to clingo?

@henrytill
Copy link
Member

@primeos: seem fine to me!

@primeos
Copy link
Member Author

primeos commented Jan 12, 2019

@henrytill ok, thanks for your response and feel free to ping me if there will be any unexpected regressions.

@primeos primeos merged commit d8bbec2 into NixOS:master Jan 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants