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

xref tests occasionally fail #316

Open
juergenhoetzel opened this issue Jun 30, 2022 · 1 comment
Open

xref tests occasionally fail #316

juergenhoetzel opened this issue Jun 30, 2022 · 1 comment

Comments

@juergenhoetzel
Copy link
Collaborator

Description

xref tests occasionally fail due to a race/timing issue.

Repro steps

eldev test

Expected behavior

All tests pass

Actual behavior

 finds definition in pervasives  FAILED (347.78ms)
  finds definitions in other files of Project (11.74ms)

========================================
F# LSP Client finds definition in pervasives

Traceback (most recent call last):
  call-interactively(xref-find-definitions)
  funcall-interactively(xref-find-definitions "LSP identifier at point.")
  xref-find-definitions("LSP identifier at point.")
  xref--find-definitions("LSP identifier at point." nil)
  xref--show-defs(#[0 "\212\307\303!\203\303q\210\3101\304b0\202\210\202\210\306\305\302\"\211\204&\311\301\300\"\210\211\262)\207" ["LSP identifier at point." definitions "LSP identifier at point." #<buffer Program.fs> 260 eglot xref-backend-definitions buffer-live-p (error) xref--not-found-error] 4] nil)
  xref-show-definitions-buffer(#[0 "\212\307\303!\203\303q\210\3101\304b0\202\210\202\210\306\305\302\"\211\204&\311\301\300\"\210\211\262)\207" ["LSP identifier at point." definitions "LSP identifier at point." #<buffer Program.fs> 260 eglot xref-backend-definitions buffer-live-p (error) xref--not-found-error] 4] ((window . #<window 4 on FileTwo.fs>) (display-action) (auto-jump)))
error: (wrong-type-argument listp t)

Ran 20 specs, 1 failed, in 16.50s.

Known workarounds

rerun tests

Related information

All systems in Build matrix

@juergenhoetzel
Copy link
Collaborator Author

Related fsautocompleteoutput:

[stderr] [22:53:26.843 ERR] [LSP] PositionHandler - Failed during child operation on file /home/juergen/ghq/github.com/fsharp/emacs-fsharp-mode/test/Test1/Program.fs
[stderr] System.IndexOutOfRangeException: Index was outside the bounds of the array.
[stderr]    at <StartupCode$FsAutoComplete-Core>.$FileSystem.TryGetPrevChar@213.Invoke(Position np) in /home/runner/work/FsAutoComplete/FsAutoComplete/src/FsAutoComplete.Core/FileSystem.fs:line 213
[stderr]    at Microsoft.FSharp.Core.OptionModule.Map[T,TResult](FSharpFunc`2 mapping, FSharpOption`1 option) in D:\a\_work\1\s\src\fsharp\FSharp.Core\option.fs:line 53
[stderr]    at FsAutoComplete.SignatureHelp.loop@231-22(NamedText lines, Char ch, Position pos) in /home/runner/work/FsAutoComplete/FsAutoComplete/src/FsAutoComplete.Core/SignatureHelp.fs:line 232
[stderr]    at FsAutoComplete.SignatureHelp.getSignatureHelpFor@230.Invoke(Unit unitVar) in /home/runner/work/FsAutoComplete/FsAutoComplete/src/FsAutoComplete.Core/SignatureHelp.fs:line 240
[stderr]    at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvoke[T,TResult](AsyncActivation`1 ctxt, TResult result1, FSharpFunc`2 part2) in D:\a\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 447
[stderr]    at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction) in D:\a\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 104

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