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

dune subst Error: stat(test): No such file or directory on semgrep #9593

Closed
jmikedupont2 opened this issue Jan 2, 2024 · 3 comments · Fixed by #9810
Closed

dune subst Error: stat(test): No such file or directory on semgrep #9593

jmikedupont2 opened this issue Jan 2, 2024 · 3 comments · Fixed by #9810
Assignees
Labels

Comments

@jmikedupont2
Copy link

Expected Behavior

should work as part of semgrep build in opam

Actual Behavior

"Error: stat(test): No such file or directory"

dune subst  --debug
Error: stat(test): No such file or directory
Raised by primitive operation at Stdune__Path.stat_exn in file
  "otherlibs/stdune/src/path.ml", line 1322, characters 17-40
Called from Main__Subst.is_a_source_file in file "bin/subst.ml", line 19,
  characters 5-25
Called from Main__Subst.subst.(fun) in file "bin/subst.ml", line 360,
  characters 7-28
Called from Stdlib__List.iter in file "list.ml", line 110, characters 12-15               Called from Fiber__Core.O.(>>|).(fun) in file "vendor/fiber/src/core.ml",                   line 252, characters 36-41
Called from Fiber__Scheduler.exec in file "vendor/fiber/src/scheduler.ml",

Reproduction

  • PR with a reproducing test:

Specifications

  • Version of dune (output of dune --version):
  • Version of ocaml (output of ocamlc --version)
  • Operating system (distribution and version):

Additional information

  • Link to gist with verbose output (run dune with the --verbose flag):
@jmikedupont2
Copy link
Author

So my thoughts are that we can just add a check for a broken symlink and skip it.

@nojb
Copy link
Collaborator

nojb commented Jan 2, 2024

In order to investigate this issue, reproduction instruction would be needed, ideally in an example as small as possible. Thanks!

emillon added a commit to emillon/dune that referenced this issue Jan 5, 2024
@emillon
Copy link
Collaborator

emillon commented Jan 5, 2024

Repro in #9637

@rgrinberg rgrinberg added the bug label Jan 8, 2024
emillon added a commit to emillon/dune that referenced this issue Jan 8, 2024
emillon added a commit to emillon/dune that referenced this issue Jan 15, 2024
emillon added a commit to emillon/dune that referenced this issue Jan 16, 2024
emillon added a commit that referenced this issue Jan 16, 2024
@emillon emillon self-assigned this Jan 22, 2024
emillon added a commit to emillon/dune that referenced this issue Jan 23, 2024
emillon added a commit to emillon/dune that referenced this issue Jan 23, 2024
emillon added a commit to emillon/dune that referenced this issue Jan 23, 2024
emillon added a commit that referenced this issue Jan 24, 2024
* fix(subst): ignore broken symlinks

Fixes #9593

Signed-off-by: Etienne Millon <[email protected]>
emillon added a commit to emillon/dune that referenced this issue Feb 5, 2024
emillon added a commit to emillon/dune that referenced this issue Feb 5, 2024
* fix(subst): ignore broken symlinks

Fixes ocaml#9593

Signed-off-by: Etienne Millon <[email protected]>
emillon added a commit that referenced this issue Feb 5, 2024
* test: subst should not fail on broken symlinks (#9637)

See #9593

Signed-off-by: Etienne Millon <[email protected]>

* fix(subst): ignore broken symlinks (#9810)

* fix(subst): ignore broken symlinks

Fixes #9593

Signed-off-by: Etienne Millon <[email protected]>

---------

Signed-off-by: Etienne Millon <[email protected]>
emillon added a commit to emillon/opam-repository that referenced this issue Feb 5, 2024
CHANGES:

- Fix performance regression for incremental builds (ocaml/dune#9769, fixes ocaml/dune#9738,
  @rgrinberg)

- Fix `dune ocaml top-module` to correctly handle absolute paths. (ocaml/dune#8249, fixes
  ocaml/dune#7370, @Alizter)

- subst: ignore broken symlinks when looking at source files (ocaml/dune#9810, fixes
  ocaml/dune#9593, @emillon)

- subst: do not fail on 32-bit systems when large files are encountered. Just
  log a warning in this case. (ocaml/dune#9811, fixes ocaml/dune#9538, @emillon)

- boot: sort directory entries in readdir. This makes the dune binary
  reproducible in terms of filesystem order. (ocaml/dune#9861, fixes ocaml/dune#9794, @emillon)
nberth pushed a commit to nberth/opam-repository that referenced this issue Jun 18, 2024
CHANGES:

- Fix performance regression for incremental builds (ocaml/dune#9769, fixes ocaml/dune#9738,
  @rgrinberg)

- Fix `dune ocaml top-module` to correctly handle absolute paths. (ocaml/dune#8249, fixes
  ocaml/dune#7370, @Alizter)

- subst: ignore broken symlinks when looking at source files (ocaml/dune#9810, fixes
  ocaml/dune#9593, @emillon)

- subst: do not fail on 32-bit systems when large files are encountered. Just
  log a warning in this case. (ocaml/dune#9811, fixes ocaml/dune#9538, @emillon)

- boot: sort directory entries in readdir. This makes the dune binary
  reproducible in terms of filesystem order. (ocaml/dune#9861, fixes ocaml/dune#9794, @emillon)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants