jaredly / jaredly/reason-language-server

No such file or directory error with ppx_expect

Ouverte
#421 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Langage dominant
OCaml
Étoiles
649
Forks
85
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

I'm using ppx_expect to test my Reason files. In any Reason module that includes let%expect_test I see the following build error:

type error here Line 1:
Error: I/O error: : No such file or directory

I'm building with esy. When I run the tests with esy dune runtest everything runs just fine. This problem only effects editing Reason files that use let%expect_test (ml files do not exhibit this issue). All other files work fine.

The entire build command from debug.log is too much to paste here, but the last part of the build command the output showing the error are:

{snip}
 -bin-annot -open NaismithSrc -open Core_kernel -open NaismithExt.Pipe -ppx '/src/reason-playground/naismith/_esy/default/store/b/naismith-6ce4e131/default/.ppx/c71d0a51e5287292e3bae7e7566a859b/ppx.exe --as-ppx --cookie '\''library-name="NaismithSrc"'\''' -impl /src/reason-playground/naismith/_esy/default/store/b/naismith-6ce4e131/.lsp/NaismithSrc__Repl.ast with pwd /src/reason-playground/naismith/src
Now loading /src/reason-playground/naismith/_esy/default/store/b/naismith-6ce4e131/.lsp/NaismithSrc__Repl.cmt
Size 55934
<< Making lastDefinitions with type error for file:///src/reason-playground/naismith/src/Repl.re
type error here Line 1:
Error: I/O error: : No such file or directory
Sending notification {"jsonrpc": "2.0", "method": "textDocument/publishDiagnostics", "params":{"uri": "file:///src/reason-playground/naismith/src/Repl.re", "diagnostics": [{"range": {"start": {"line": 0, "character": 0}, "end": {"line": 0, "character": 0}}, "message": "Line 1:\nError: I/O error: : No such file or directory", "severity": 1}]}}

If it helps, here's the output of esy ls-libs showing installed libraries and versions:

naismith@0.1.0 [build pending]
├── @esy-ocaml/reason@3.6.0 [built]
│   ├── reason.easy_format
│   ├── reason.cmdliner
│   └── reason
├── @opam/alcotest@opam:1.0.0 [built]
│   └── alcotest
├── @opam/base@opam:v0.13.0 [built]
│   ├── base.shadow_stdlib
│   ├── base.md5
│   ├── base.caml
│   ├── base.base_internalhash_types
│   └── base
├── @opam/core_kernel@opam:v0.13.0 [built]
│   ├── core_kernel.weak_pointer
│   ├── core_kernel.weak_hashtbl
│   ├── core_kernel.weak_array
│   ├── core_kernel.version_util
│   ├── core_kernel.uuid
│   ├── core_kernel.uopt
│   ├── core_kernel.unpack_buffer
│   ├── core_kernel.univ
│   ├── core_kernel.tuple_pool
│   ├── core_kernel.total_map
│   ├── core_kernel.timing_wheel
│   ├── core_kernel.thread_safe_queue
│   ├── core_kernel.thread_pool_cpu_affinity
│   ├── core_kernel.sexp_hidden_in_test
│   ├── core_kernel.rope
│   ├── core_kernel.pooled_hashtbl
│   ├── core_kernel.pairing_heap
│   ├── core_kernel.moption
│   ├── core_kernel.linked_stack
│   ├── core_kernel.limiter
│   ├── core_kernel.int_set
│   ├── core_kernel.hash_heap
│   ├── core_kernel.force_once
│   ├── core_kernel.flags
│   ├── core_kernel.fheap
│   ├── core_kernel.composition_infix
│   ├── core_kernel.bounded_int_table
│   ├── core_kernel.binary_packing
│   ├── core_kernel.base_for_tests
│   ├── core_kernel.balanced_reducer
│   └── core_kernel
├── @opam/dune@opam:2.2.0 [built]
│   ├── dune.configurator
│   └── dune
├── @opam/expect_test_helpers_kernel@opam:v0.13.0 [built]
│   ├── expect_test_helpers_kernel.expect_test_helpers_base
│   └── expect_test_helpers_kernel
├── @opam/fmt@opam:0.8.8 [built]
│   ├── fmt.tty
│   ├── fmt.top
│   ├── fmt.cli
│   └── fmt
├── @opam/menhir@opam:20200123 [built]
│   └── menhir
├── @opam/merlin@opam:3.3.3 [built]
│   └── merlin
├── @opam/odoc@opam:1.5.0 [built]
│   ├── odoc.xref
│   ├── odoc.parser
│   ├── odoc.odoc
│   ├── odoc.model
│   ├── odoc.loader
│   ├── odoc.html
│   ├── odoc.compat
│   └── odoc
├── @opam/patdiff@opam:v0.13.0 [built]
│   ├── patdiff.lib
│   └── patdiff
├── @opam/ppx_deriving@opam:4.4 [built]
│   ├── ppx_deriving.std
│   ├── ppx_deriving.show
│   ├── ppx_deriving.runtime
│   ├── ppx_deriving.ord
│   ├── ppx_deriving.map
│   ├── ppx_deriving.make
│   ├── ppx_deriving.iter
│   ├── ppx_deriving.fold
│   ├── ppx_deriving.eq
│   ├── ppx_deriving.enum
│   ├── ppx_deriving.create
│   ├── ppx_deriving.api
│   └── ppx_deriving
├── @opam/ppx_expect@opam:v0.13.0 [built]
│   ├── ppx_expect.payload
│   ├── ppx_expect.matcher
│   ├── ppx_expect.evaluator
│   ├── ppx_expect.config
│   ├── ppx_expect.common
│   ├── ppx_expect.collector
│   └── ppx_expect
├── @opam/rtop@opam:3.5.2 [built]
│   └── rtop
├── @opam/sedlex@opam:2.1 [built]
│   ├── sedlex.ppx
│   └── sedlex
├── @opam/stdio@opam:v0.13.0 [built]
│   └── stdio
├── @pesy/esy-pesy@0.1.0-alpha.5 [built]
│   ├── pesy--esy-pesy.utils
│   ├── pesy--esy-pesy.lib
│   ├── pesy--esy-pesy.errors
│   └── pesy--esy-pesy
├── @reason-native/console@0.1.0 [built]
│   ├── console.lib
│   └── console
├── @reason-native/pastel@0.3.0 [built]
│   ├── pastel.lib
│   ├── pastel.internal
│   └── pastel
├── @reason-native/rely@3.2.1 [built]
│   ├── rely.lib
│   ├── rely.internal
│   └── rely
├── ocaml@4.8.1000 [built]
└── refmterr@3.3.0 [built]
    ├── refmterr.lib
    └── refmterr

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Reproduisez l’erreur en modifiant un fichier Reason contenant let%expect_test avec la configuration esy indiquée dans le rapport, puis comparez les diagnostics de l’éditeur avec esy dune runtest. Suivez la commande de build du serveur de langage et son invocation de ppx_expect présentées dans le rapport. La tâche est terminée lorsque les fichiers Reason ne reçoivent plus le diagnostic I/O et que la commande de test existante continue de réussir.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
ocaml
Domaine
devtools
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.