Skip to content

Testdata directory not included in Hackage release for HLS-Retrie Plugin #3807

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

Closed
Vekhir opened this issue Sep 14, 2023 · 1 comment · Fixed by #3808
Closed

Testdata directory not included in Hackage release for HLS-Retrie Plugin #3807

Vekhir opened this issue Sep 14, 2023 · 1 comment · Fixed by #3808
Labels
status: needs triage type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@Vekhir
Copy link
Contributor

Vekhir commented Sep 14, 2023

The HLS-retrie plugin doesn't include the test/testdata directory within the Hackage release version. See also the src/ directory on Hackage. This issue exists since v1.0.4.0 (where I encountered the issue), but afaict persists through the latest 2.2.0.0 release.

The tests try to find the test/testdata directory, but if it's not included, then it cannot be found.

Your environment

OS: Arch Linux
Kernel: 6.4.12-arch1-1
GHC: 9.0.2 (official package)
haskell-hls-retrie-plugin: 1.0.4.0 (tested; all versions since are affected)

HLS-retrie-plugin is the version as released on Hackage

Steps to reproduce

Build hls-retrie-plugin with tests enabled
Commandline:

  runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
    --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --enable-tests \
    --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \
    --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
    --ghc-option='-pie'

  runhaskell Setup build $MAKEFLAGS
  runhaskell Setup register --gen-script
  runhaskell Setup unregister --gen-script
  sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
  sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh

Then run the tests

  runhaskell Setup test --show-details=direct

Expected behaviour

Tests should pass

Actual behaviour

Tests fail with message

Error while initializing: ResponseError {_code = InternalError, _message = "Error on initialize: /build/haskell-hls-retrie-plugin/src/hls-retrie-plugin-1.0.4.0/test/testdata: changeWorkingDirectory: does not exist (No such file or directory)", _xdata = Nothing}

Debug information (Full Error Log)

Running 1 test suites...
Test suite tests: RUNNING...
Retrie
  Inline this
    provider
      lhs:                                Error while initializing: ResponseError {_code = InternalError, _message = "Error on initialize: /build/haskell-hls-retrie-plugin/src/hls-retrie-plugin-1.0.4.0/test/testdata: changeWorkingDirectory: does not exist (No such file or directory)", _xdata = Nothing}
Error while initializing: ResponseError {_code = InternalError, _message = "Error on initialize: /build/haskell-hls-retrie-plugin/src/hls-retrie-plugin-1.0.4.0/test/testdata: changeWorkingDirectory: does not exist (No such file or directory)", _xdata = Nothing}
FAIL
        Exception: Language server unexpectedly terminated
        Use -p '/lhs/' to rerun this test only.
      identifier:                         Error while initializing: ResponseError {_code = InternalError, _message = "Error on initialize: /build/haskell-hls-retrie-plugin/src/hls-retrie-plugin-1.0.4.0/test/testdata: changeWorkingDirectory: does not exist (No such file or directory)", _xdata = Nothing}
Error while initializing: ResponseError {_code = InternalError, _message = "Error on initialize: /build/haskell-hls-retrie-plugin/src/hls-retrie-plugin-1.0.4.0/test/testdata: changeWorkingDirectory: does not exist (No such file or directory)", _xdata = Nothing}
Error while initializing: ResponseError {_code = InternalError, _message = "Error on initialize: /build/haskell-hls-retrie-plugin/src/hls-retrie-plugin-1.0.4.0/test/testdata: changeWorkingDirectory: does not exist (No such file or directory)", _xdata = Nothing}
Error while initializing: ResponseError {_code = InternalError, _message = "Error on initialize: /build/haskell-hls-retrie-plugin/src/hls-retrie-plugin-1.0.4.0/test/testdata: changeWorkingDirectory: does not exist (No such file or directory)", _xdata = Nothing}
Error while initializing: ResponseError {_code = InternalError, _message = "Error on initialize: /build/haskell-hls-retrie-plugin/src/hls-retrie-plugin-1.0.4.0/test/testdata: changeWorkingDirectory: does not exist (No such file or directory)", _xdata = Nothing}
Error while initializing: ResponseError {_code = InternalError, _message = "Error on initialize: /build/haskell-hls-retrie-plugin/src/hls-retrie-plugin-1.0.4.0/test/testdata: changeWorkingDirectory: does not exist (No such file or directory)", _xdata = Nothing}
Error while initializing: ResponseError {_code = InternalError, _message = "Error on initialize: /build/haskell-hls-retrie-plugin/src/hls-retrie-plugin-1.0.4.0/test/testdata: changeWorkingDirectory: does not exist (No such file or directory)", _xdata = Nothing}
Error while initializing: ResponseError {_code = InternalError, _message = "Error on initialize: /build/haskell-hls-retrie-plugin/src/hls-retrie-plugin-1.0.4.0/test/testdata: changeWorkingDirectory: does not exist (No such file or directory)", _xdata = Nothing}
Error while initializing: ResponseError {_code = InternalError, _message = "Error on initialize: /build/haskell-hls-retrie-plugin/src/hls-retrie-plugin-1.0.4.0/test/testdata: changeWorkingDirectory: does not exist (No such file or directory)", _xdata = Nothing}
FAIL
        Exception: Language server unexpectedly terminated
        Use -p '/provider.identifier/' to rerun this test only.
      imported identifier:                FAIL
        Exception: Language server unexpectedly terminated
        Use -p '/imported identifier/' to rerun this test only.
      nested where:                       FAIL
        Exception: Language server unexpectedly terminated
        Use -p '/provider.nested where/' to rerun this test only.
      nested let:                         FAIL
        Exception: Language server unexpectedly terminated
        Use -p '/provider.nested let/' to rerun this test only.
      class member:                       FAIL
        Exception: Language server unexpectedly terminated
        Use -p '/class member/' to rerun this test only.
      operator:                           FAIL
        Exception: Language server unexpectedly terminated
        Use -p '/provider.operator/' to rerun this test only.
    command
      top level function:                 Error while initializing: ResponseError {_code = InternalError, _message = "Error on initialize: /build/haskell-hls-retrie-plugin/src/hls-retrie-plugin-1.0.4.0/test/testdata: changeWorkingDirectory: does not exist (No such file or directory)", _xdata = Nothing}
FAIL (7.77s)
        Language server unexpectedly terminated
        Use -p '$0=="Retrie.Inline this.command.top level function"' to rerun this test only.
      top level function in another file: FAIL (4.54s)
        Language server unexpectedly terminated
        Use -p '/top level function in another file/' to rerun this test only.
      nested where function:              FAIL (5.83s)
        Language server unexpectedly terminated
        Use -p '/nested where function/' to rerun this test only.
      nested let function:                FAIL (3.90s)
        Language server unexpectedly terminated
        Use -p '/nested let function/' to rerun this test only.
      operator:                           FAIL (3.26s)
        Language server unexpectedly terminated
        Use -p '/command.operator/' to rerun this test only.

12 out of 12 tests failed (7.77s)
Test suite tests: FAIL
Test suite logged to: dist/test/hls-retrie-plugin-1.0.4.0-tests.log
0 of 1 test suites (0 of 1 test cases) passed.
@Vekhir Vekhir added status: needs triage type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. labels Sep 14, 2023
@fendor
Copy link
Collaborator

fendor commented Sep 15, 2023

Thank you for the bug report!

Likely simply a forgotten path in extra-source-files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs triage type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants