Skip to content

Invalid path in vg.install installing vg from opam on Windows #40

Description

@Tchou

Hi,
I have the following set-up (in a VM):

  • Windows 11
  • Windows Terminal
  • opam installed with winget install OCaml.opam (version 2.4.1)
  • either Powershell or Bash (from cygwin installed via opam) as a shell

When doing opam install vg, it fails during installation with the following error message:

[ERROR] At C:\Users\user\AppData\Local\opam\default\.opam-switch\build\vg.0.9.5\vg.install:11:7-11:7::
        illegal escape sequence [skipped]

(this is in powershell, the same error message when using bash, but with Unix paths).
Then opam thinks the package is installed, but the META and library files are not installed. Upon closer investigation, the file vg.install contains:

#vg

doc: [
  "_build/CHANGES.md" {"CHANGES.md"}
  "_build/LICENSE.md" {"LICENSE.md"}
  "_build/README.md" {"README.md"}
  "_build/doc/image_howto.mld" {"odoc-pages/image_howto.mld"}
  "_build/doc/index.mld" {"odoc-pages/index.mld"}
  "_build/doc/semantics.mld" {"odoc-pages/semantics.mld"}
  "_build/doc/tutorial.mld" {"odoc-pages/tutorial.mld"}
  "doc\doc-aeo.png" {"odoc-assets/doc-aeo.png"}
  "doc\doc-anz.png" {"odoc-assets/doc-anz.png"}
  "doc\doc-caps.png" {"odoc-assets/doc-caps.png"}
  "doc\doc-circle-outline.png" {"odoc-assets/doc-circle-outline.png"}
  "doc\doc-dot.png" {"odoc-assets/doc-dot.png"}
  "doc\doc-earcs.png" {"odoc-assets/doc-earcs.png"}
  "doc\doc-gray-circle.png" {"odoc-assets/doc-gray-circle.png"}
  "doc\doc-gray-square.png" {"odoc-assets/doc-gray-square.png"}
  "doc\doc-joins.png" {"odoc-assets/doc-joins.png"}
  "doc\doc-scatter-plot.png" {"odoc-assets/doc-scatter-plot.png"}
  "doc\doc-subpaths.png" {"odoc-assets/doc-subpaths.png"} ]
lib: [
  "_build/opam" {"opam"}
...

Line 11, column 7 corresponds to \d. Now I'm not sure whether this is a bug in opam or vg, but vg is the only package so far for which this happens (e.g. gg and many of your other packages install just fine).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions