Skip to content

Update solver Hackage benchmark for v2 commands #6417

Closed

Description

@sebright

The Hackage benchmark currently measures the performance of the solver by running the "cabal install" command with --dry-run. Now that cabal uses v2 commands by default, "install" only works for executables. The benchmark needs to be updated to run a command that can invoke the solver for any package on Hackage.

install command:

[cabal, "install", unPackageName pkg, "--dry-run", "-v0"] ++ flags

Activity

  1. phadej commented on Dec 11, 2019

    @phadej
    Collaborator
    % cabal install --lib stylish-haskell --dry
    Resolving dependencies...
    Build profile: -w ghc-8.6.5 -O1
    In order, the following would be built (use -v for more details):
     - mono-traversable-1.0.13.0 (lib) (requires build)
     - conduit-1.3.1.1 (lib) (requires build)
     - libyaml-0.1.1.1 (lib) (requires build)
     - yaml-0.11.2.0 (lib) (requires build)
     - stylish-haskell-0.9.4.4 (lib) (requires download & build)
     - stylish-haskell-0.9.4.4 (exe:stylish-haskell) (requires download & build)
    

    seems to work. Maybe it shouldn't. I'm not sure :)

    EDIT: I think this automated use-case is something which should work with v2-install. I don't remember what's the motivation for requiring --lib flag is either, maybe @hvr can comment. At least when install --lib related issues are fixed, requiring --lib could be dropped (or required only for ambiguous cases).

    i.e. just adding --lib there, even if you try to install an exe.

  2. sebright commented on Dec 12, 2019

    @sebright
    CollaboratorAuthor

    I'm not sure I understand the behavior of --lib. I thought that I couldn't use it for a package that doesn't contain a library, but then I realized that I was running the command in the cabal directory, and cabal.project probably influenced the behavior.

    with cabal.project and .cabal file:

    $ cabal install --lib --dry-run 3d-graphics-examples
    Resolving dependencies...
    cabal: Cannot build the libraries in the package 3d-graphics-examples because
    it does not contain any libraries. Check the .cabal file for the package and
    make sure that it properly declares the components that you expect.
    

    without cabal.project or .cabal file:

    $ cabal install --lib --dry-run 3d-graphics-examples
    Resolving dependencies...
    Build profile: -w ghc-8.6.5 -O1
    In order, the following would be built (use -v for more details):
     - ObjectName-1.1.0.1 (lib) (requires download & build)
     - StateVar-1.2 (lib) (requires download & build)
     - fixed-0.3 (lib) (requires download & build)
     - half-0.3 (lib) (requires download & build)
     - OpenGLRaw-3.3.4.0 (lib) (requires download & build)
     - GLURaw-2.0.0.4 (lib) (requires download & build)
     - OpenGL-3.0.3.0 (lib) (requires download & build)
     - GLUT-2.7.0.15 (lib) (requires download & build)
     - 3d-graphics-examples-0.0.0.2 (exe:mountains) (requires download & build)
     - 3d-graphics-examples-0.0.0.2 (exe:l-systems) (requires download & build)
    

    --lib will probably work for the benchmark as long as it is run outside of a project.

  3. phadej commented on Dec 12, 2019

    @phadej
    Collaborator

    Or/and we need cabal install -z to be there. #5919

  4. added 3 commits that reference this issue on Dec 15, 2019
    1860bc1
    3e3fb20
    adf6519
  5. added a commit that references this issue on Dec 18, 2019
    84209a0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions