Skip to content

v2-test in master should ignore --test-option[s] from the hash #5789

Open

Description

@fommil

in any project with tasty, with cabal 2.5, running this

cabal v2-test -O0 --test-options="--pattern Foo"

followed by

cabal v2-test -O0 --test-options="--pattern Bar"

will result in trying to recompile everything.

It looks like test-option and test-options are being included in the hash.

Activity

  1. added
    cabal-install: v2-build system
    on May 6, 2019
  2. anka-213 commented on Apr 8, 2021

    @anka-213

    Does anyone know of a workaround for this problem? It's getting pretty frustrating.

  3. fommil commented on Apr 8, 2021

    @fommil
    ContributorAuthor

    I invoke test binaries directly with run and just pretend test doesn't exist.

    cabal run tasty -- --pattern Foo
    cabal run tasty -- --pattern Bar
    

    doesn't recompile

  4. anka-213 commented on Apr 8, 2021

    @anka-213

    @fommil That almost works, but now the test-suite fails to execute the main executable ghcide and other tools which are included via build-tool-depends:

    test-suite ghcide-tests
        build-tool-depends:
            ghcide:ghcide,
            ghcide:ghcide-test-preprocessor,
            implicit-hie:gen-hie
        ...
    $ cabal run ghcide-tests
    Up to date
    cabal get -v1 Cabal-3.2.0.0 -d bench/example
    ghcide
      diagnostics
        haddock parse error:          FAIL
          Exception: ghcide: createProcess: runInteractiveProcess: exec: does not exist (No such file or directory)
    ...
        hover after edit:             FAIL
          Exception: gen-hie: createProcess: runInteractiveProcess: exec: does not exist (No such file or directory)
    

    Is there some alternative runtime-tool-depends or another way to make this work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    cabal-install: cmd/testcabal-install: v2-build systemtype: bugtype: enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions