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

opam admin check results in an exception #6329

Closed
hannesm opened this issue Dec 10, 2024 · 5 comments · Fixed by #6331
Closed

opam admin check results in an exception #6329

hannesm opened this issue Dec 10, 2024 · 5 comments · Fixed by #6331

Comments

@hannesm
Copy link
Member

hannesm commented Dec 10, 2024

I'm using opam 2.3.0, and with opam-repository 1b2a01620fb88e9beac02940ce59c6de74151655 I run into an exception:

# opam admin check --installability -v -v --debug-level=9
...
00:13.764  FILE(opam)             Read /usr/home/hannes/devel/mirage/opam-repository/packages/zxcvbn/zxcvbn.2.4+1/opam in 0.000s
Checking installability of every package. This may take a few minutes...
00:14.182  SOLVER                 cudf_versions_map
'opam admin check --installability -v -v --debug-level=9' failed.
Fatal error:
Invalid_argument("filter_deps")
Backtrace:
  Raised at Stdlib.invalid_arg in file "stdlib.ml", line 30, characters 20-45
  Called from OpamFilter.resolve_ident_raw in file "src/format/opamFilter.ml", line 212, characters
  10-44
  Called from OpamFilter.resolve_ident in file "src/format/opamFilter.ml", line 236, characters 8-53
  Called from OpamFilter.reduce in file "src/format/opamFilter.ml", line 390, characters 8-54
  Called from OpamFilter.eval_to_bool in file "src/format/opamFilter.ml" (inlined), line 398, characters
  54-68
  Called from OpamFilter.filter_constraints.(fun) in file "src/format/opamFilter.ml", line 526,
  characters 11-40
  Called from OpamFormula.partial_eval in file "src/format/opamFormula.ml", line 284, characters 11-30
  Called from OpamFormula.partial_eval in file "src/format/opamFormula.ml", line 284, characters 11-30
  Called from OpamFilter.gen_filter_formula.(fun) in file "src/format/opamFilter.ml", line 560,
  characters 29-43
  Called from OpamFormula.map in file "src/format/opamFormula.ml", line 154, characters 35-44
  Called from OpamFormula.map in file "src/format/opamFormula.ml", line 154, characters 25-34
  Called from OpamSolver.cudf_versions_map.add_referred_to_packages.(fun) in file
  "src/solver/opamSolver.ml", line 54, characters 38-49
  Called from OpamStd.Map.Make.fold.(fun) in file "src/core/opamStd.ml", line 347, characters 14-28
  Called from Stdlib__Map.Make.iter in file "map.ml", line 297, characters 20-25
  Called from Stdlib__Map.Make.iter in file "map.ml", line 297, characters 10-18
  Called from Stdlib__Map.Make.iter in file "map.ml", line 297, characters 10-18
  Called from Stdlib__Map.Make.iter in file "map.ml", line 297, characters 10-18
  Called from Stdlib__Map.Make.iter in file "map.ml", line 297, characters 10-18
  Called from Stdlib__Map.Make.iter in file "map.ml", line 297, characters 10-18
  Called from Stdlib__Map.Make.iter in file "map.ml", line 297, characters 10-18
  Called from Stdlib__Map.Make.iter in file "map.ml", line 297, characters 10-18
  Called from Stdlib__Map.Make.iter in file "map.ml", line 297, characters 10-18
  Called from Stdlib__Map.Make.iter in file "map.ml", line 297, characters 10-18
  Called from OpamStd.Map.Make.fold in file "src/core/opamStd.ml", line 346, characters 6-72
  Called from OpamSolver.cudf_versions_map in file "src/solver/opamSolver.ml", line 62, characters 17-74
  Called from OpamSolver.load_cudf_packages in file "src/solver/opamSolver.ml", line 341, characters
  14-45
  Called from OpamSolver.load_cudf_universe in file "src/solver/opamSolver.ml", line 374, characters
  15-74
  Called from OpamAdminCheck.installability_check in file "src/client/opamAdminCheck.ml", line 69,
  characters 4-94
  Called from OpamAdminCheck.check in file "src/client/opamAdminCheck.ml", line 434, characters 6-31
  Called from OpamAdminCommand.check_command.cmd in file "src/client/opamAdminCommand.ml", line 795,
  characters 6-118
  Called from Cmdliner_term.app.(fun) in file "src_ext/cmdliner/src/cmdliner_term.ml", line 24,
  characters 19-24
  Called from Cmdliner_eval.run_parser in file "src_ext/cmdliner/src/cmdliner_eval.ml", line 35,
  characters 37-44
  Called from Cmdliner_eval.eval_value in file "src_ext/cmdliner/src/cmdliner_eval.ml", line 203,
  characters 14-39
  Called from OpamCliMain.run.(fun) in file "src/client/opamCliMain.ml", line 459, characters 8-84
  Called from OpamCliMain.main_catch_all in file "src/client/opamCliMain.ml", line 339, characters 6-10
@kit-ty-kate
Copy link
Member

I have opened a fix in #6331 (which should be backported to an upcoming 2.3.1 release)

@kit-ty-kate
Copy link
Member

As an aside i would be happy to have some feedbacks on #6335 since you seem to be the only user of opam admin check that we know of at the moment.

@hannesm
Copy link
Member Author

hannesm commented Dec 12, 2024

Thanks @kit-ty-kate for your PRs and fixes.

@Alizter
Copy link

Alizter commented Dec 22, 2024

FTR @kit-ty-kate We at https://github.com/coq/opam are also using it.

@kit-ty-kate
Copy link
Member

good to know, thanks!

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

Successfully merging a pull request may close this issue.

3 participants