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

definition.Imported symbol (reexported) fails without $TEMPDIR/hls-test-root #4348

Open
komikat opened this issue Jul 5, 2024 · 0 comments

Comments

@komikat
Copy link
Contributor

komikat commented Jul 5, 2024

running HLS_TEST_HARNESS_NO_TESTDIR_CLEANUP=1 HLS_TEST_LOG_STDERR=1 TASTY_PATTERN="/definition.Imported symbol (reexported)/" cabal test ghcide-tests
FAILS (>=GHC94)

expected: Location {_uri = Uri {getUri = "$TMPDIR/hls-test-root/extra-dir-85406152527/Bar.hs"}, _range = Range {_start = Position {_line = 3, _character = 5}, _end = Position {_line = 3, _character = 8}}}
 but got: Location {_uri = Uri {getUri = "$TMPDIR/hls-test-root/extra-dir-85406152527/Bar.hs"}, _range = Range {_start = Position {_line = 3, _character = 0}, _end = Position {_line = 3, _character = 14}}}

Notes

  • AtPoint.hs.gotoDefinition calls locationsAtPoint
  • it is using nameToLocation when failing
  • itExists <- liftIO $ doesFileExist fs returns true
  • doesn't seem to be falling back to db
  • in srcSpanToLocation sp
    rng <- srcSpanToRange src
    reports a different location from what's expected in the test
  • the sp comes from
    nameSrcSpan name
    in that branch.

Originally posted by @komikat in #4273 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant