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

Raw exception shown when files do not exist #6351

Open
kit-ty-kate opened this issue Jan 6, 2025 · 0 comments
Open

Raw exception shown when files do not exist #6351

kit-ty-kate opened this issue Jan 6, 2025 · 0 comments
Labels

Comments

@kit-ty-kate
Copy link
Member

$ cat packages/test/test.1/opam
opam-version: "2.0"
extra-files: ["does-not-exist" "md5=fa3f5d536909bb625ae9f77392261a3f"]
$ opam install test
The following actions will be performed:
=== recompile 1 package
  ↻ test 1

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>

#=== ERROR while compiling test.1 =============================================#
Sys_error("/home/kit_ty_kate/.opam/repo/tmp/packages/test/test.1/files/does-not-exist: No such file or directory")


<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
┌─ The following actions failed
│ λ build test 1
└─ 
╶─ No changes have been performed
$ cat packages/test/test.1/opam
opam-version: "2.0"
patches: "does-not-exist"
$ opam install test
The following actions will be performed:
=== recompile 1 package
  ↻ test 1

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[ERROR] Patch file "/home/kit_ty_kate/.opam/5.3/.opam-switch/build/test.1/does-not-exist" not found.

#=== ERROR while compiling test.1 =============================================#
Not_found


<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
┌─ The following actions failed
│ λ build test 1
└─ 
╶─ No changes have been performed
$ cat packages/test/test.1/opam
opam-version: "2.0"
substs: "does-not-exist"
$ opam reinstall test
The following actions will be performed:
=== recompile 1 package
  ↻ test 1

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>

#=== ERROR while compiling test.1 =============================================#
String expansion failed for these files:
  - does-not-exist.in: OpamSystem.File_not_found("/home/kit_ty_kate/.opam/5.3/.opam-switch/build/test.1/does-not-exist.in")



<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
┌─ The following actions failed
│ λ build test 1
└─ 
╶─ No changes have been performed

In these examples, the presence of a non-existent file in either substs, patches or extra-files causes opam to display the raw exception instead of a more reasonable error message

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

No branches or pull requests

1 participant