ocurrent / ocurrent/ocaml-version

Failure("unknown variant: options")

Open
#58 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
OCaml
Stars
9
Forks
16
Avg merge
1h 56m
Merged PRs (30d)
1

Description

2023-01-19 22:28.50: >>> Failure("unknown variant: options") (score = 30)
2023-01-19 22:28.50: >>> Failure("unknown variant: options") (score = 30)
2023-01-19 22:28.50: unknown variant: options

https://ci.ocamllabs.io/github/ocsigen/lwt/commit/3d6f0fac4fed71d3c9cbdc5b90d6a443949bb0d6/variant/(analysis)

This issue seems to come from
https://github.com/ocurrent/ocaml-version/blob/5b5413a42c3a9e3c10ca0a9b247ef11c78b23b9b/ocaml_version.ml#L599
the only place afaict that introduces the variant "options". It is however not present in
https://github.com/ocurrent/ocaml-version/blob/5b5413a42c3a9e3c10ca0a9b247ef11c78b23b9b/ocaml_version.ml#L412-L425
so there's an error at
https://github.com/ocurrent/ocaml-version/blob/5b5413a42c3a9e3c10ca0a9b247ef11c78b23b9b/ocaml_version.ml#L456-L461

I can't manage to prove that this is where the "options" variant was introduced in the version value, nor find another place where it might have, nor figure out why the extra field isn't None in Opam.V2.package.

cc @benmandrew who first found the issue.
cc @dra27 who might have a clue?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the CI failure linked in the issue, then inspect ocaml_version.ml around lines 412-425, 456-461, and 599. Trace how the "options" variant enters the version value and why the extra field is not None in Opam.V2.package. Done means identifying the source of the unexpected variant and correcting the parsing or version handling.

Written by the indexing model from the issue text.

Assessment

Tech stack
ocaml
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.