Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Workaround for renaming doesn't work on windows #8

Closed
fdopen opened this issue Sep 24, 2019 · 5 comments · Fixed by ocaml/opam-repository#14907
Closed

Workaround for renaming doesn't work on windows #8

fdopen opened this issue Sep 24, 2019 · 5 comments · Fixed by ocaml/opam-repository#14907

Comments

@fdopen
Copy link
Contributor

fdopen commented Sep 24, 2019

The workaround for renaming oUnit doesn't work on windows and probably with other filesystems that are case insensitive.

  • ounit/Makefile

    Line 54 in d0e06a9

    ocamlfind install oUnit src/lib/oUnit/META -patch-version $(version)
    will install a directory called oUnit
  • ounit/Makefile

    Line 55 in d0e06a9

    dune install ounit
    will re-use this directory and overwrite its content, because the directories oUnit and ounit are identic.
  • when the package is installed and oUnit is referenced instead of ounit inside a dune file, oUnit can't be found (the name of the library seems to be determined by the dune-package file, not the directory name). ocamlfind doesn't seem to have this problem.
@gildor478
Copy link
Owner

I need to try this scenario with Windows, to check what can be done.

If I install ounit 2.1.2 and I have the following dune file:

dune:
(test
(name foobar)
(libraries oUnit))

You think the test will fail to build?

@fdopen
Copy link
Contributor Author

fdopen commented Sep 24, 2019

Yes, I've create #9 in order to see, if I can trigger the error with the CI.

@fdopen
Copy link
Contributor Author

fdopen commented Sep 24, 2019

@gildor478
Copy link
Owner

Thanks a lot. I can now reproduce the problem. Maybe I can just use REVDEPS=re.

I see 2 solutions for now:

  1. Use the --metadir to install a file META.oUnit in a different directory with the name oUnit -- but I am unsure if it will work correctly
  2. Create a package ounit2 + ounit2-lwt and install the libraries in ounit2, continue to use the "ocamlfind install oUnit" and depends on ounit2. I think this one will solve the problem...

@gildor478
Copy link
Owner

The commit 53b9d1a should have solved the issue.

I'll do a release soon, let me know if you think there is a problem.

gildor478 added a commit to gildor478/opam-repository that referenced this issue Sep 25, 2019
CHANGES:

### Changed
- Rename ounit/ounit-lwt OPAM and library to ounit2/ounit2-lwt. The META file
  to rename oUnit to ounit was not working on Windows and MacOSX because their
  filesystems are case insensitive and the install directories were the same.
  The new ounit2/ounit2-lwt packages avoid name clash on Windows/MacOSX and
  we still have ounit/ounit-lwt to allow the transition to the new package
  name. (Closes: gildor478/ounit#8)
mseri pushed a commit to ocaml/opam-repository that referenced this issue Sep 27, 2019
* [new release] ounit2-lwt, ounit2, ounit-lwt and ounit (2.2.0)

CHANGES:

### Changed
- Rename ounit/ounit-lwt OPAM and library to ounit2/ounit2-lwt. The META file
  to rename oUnit to ounit was not working on Windows and MacOSX because their
  filesystems are case insensitive and the install directories were the same.
  The new ounit2/ounit2-lwt packages avoid name clash on Windows/MacOSX and
  we still have ounit/ounit-lwt to allow the transition to the new package
  name. (Closes: gildor478/ounit#8)

* Update packages/ounit2-lwt/ounit2-lwt.2.2.0/opam

Co-Authored-By: Kate <kit.ty.kate@disroot.org>

* Update opam

* Update opam

* Update packages/ounit-lwt/ounit-lwt.2.2.0/opam

Co-Authored-By: Kate <kit.ty.kate@disroot.org>

* Update packages/ounit/ounit.2.2.0/opam

Co-Authored-By: Kate <kit.ty.kate@disroot.org>
fdopen added a commit to fdopen/opam-repository-mingw that referenced this issue Sep 28, 2019
* [new release] ounit2-lwt, ounit2, ounit-lwt and ounit (2.2.0)

CHANGES:

### Changed
- Rename ounit/ounit-lwt OPAM and library to ounit2/ounit2-lwt. The META file
  to rename oUnit to ounit was not working on Windows and MacOSX because their
  filesystems are case insensitive and the install directories were the same.
  The new ounit2/ounit2-lwt packages avoid name clash on Windows/MacOSX and
  we still have ounit/ounit-lwt to allow the transition to the new package
  name. (Closes: gildor478/ounit#8)

* Update packages/ounit2-lwt/ounit2-lwt.2.2.0/opam

Co-Authored-By: Kate <kit.ty.kate@disroot.org>

* Update opam

* Update opam

* Update packages/ounit-lwt/ounit-lwt.2.2.0/opam

Co-Authored-By: Kate <kit.ty.kate@disroot.org>

* Update packages/ounit/ounit.2.2.0/opam

Co-Authored-By: Kate <kit.ty.kate@disroot.org>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants