-
Notifications
You must be signed in to change notification settings - Fork 371
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
pin local source tree does not pick up locally modified extra-files #3833
Comments
I'll need more information on this one. I reproduced your use case, and extra-files get updated, not taken from repository. Hint for further investigation: (you can share your full log if more convenient)
$ pwd
llvm/_opam/.opam-switch/overlay/llvm/files
$ grep -C 1 debuginfo META.patch
package "debuginfo" (
requires = "llvm"
--
description = "Debug information in LLVM IR form"
- archive(byte) = "llvm_debuginfo.cma"
- archive(native) = "llvm_debuginfo.cmxa"
+ archive(byte, -llvm.static) = "shared/llvm_debuginfo.cma"
+ archive(native, -llvm.static) = "shared/llvm_debuginfo.cmxa"
+ archive(byte, llvm.static) = "shared/llvm_debuginfo.cma"
+ archive(native, llvm.static) = "shared/llvm_debuginfo.cmxa"
)
$ pwd
llvm/_opam/.opam-switch/build/llvm.8.0.0
$ git status
[...]
Untracked files:
(use "git add <file>..." to include in what will be committed)
META.patch
fix-shared.patch
install.sh
link-META.patch
[...]
$ grep -C 3 debuginfo META.patch
+ archive(native, llvm.static) = "static/llvm_executionengine.cmxa"
)
package "debuginfo" (
requires = "llvm"
version = "@PACKAGE_VERSION@"
description = "Debug information in LLVM IR form"
- archive(byte) = "llvm_debuginfo.cma"
- archive(native) = "llvm_debuginfo.cmxa"
+ archive(byte, -llvm.static) = "shared/llvm_debuginfo.cma"
+ archive(native, -llvm.static) = "shared/llvm_debuginfo.cmxa"
+ archive(byte, llvm.static) = "shared/llvm_debuginfo.cma"
+ archive(native, llvm.static) = "shared/llvm_debuginfo.cmxa"
)
package "ipo" ( |
ping @jberdine - what is the status of this issue ? |
(Sorry I am slow @rjbou, it's just that testing this takes a lot of context switching.) First, thanks a lot for your hints and suggestions, they have been very helpful for me to understand what is going on underneath. I am not sure how to proceed. It might be that this use case is just hard to support smoothly. That is, for a package where the opam metadata is not in the source repo, but only in opam-repo, then the extra files are not going to be committed, so git-pinning a local clone of the package doesn't have a smooth way of using updated extra files. For my particular use case, it would be convenient if opam looked in the locally git-pinned directory for metadata files even if they aren't committed. But I don't know if there are other bad consequences of doing that. Also, for prioritization purposes, in this particular case it seems that I can work around this difficulty by rearranging things and using a directory pin instead of git. But if the package's build system wasn't flexible enough to allow moving things out from under the package source directory, I'd be stuck. |
It's my turn to feel sorry, I don't identify the issue :)
You can find the material in this gist
opam 1.2 was mixing directory & git pinning. With opam 2.0, we choose to separate those two kind for simplicity & consistency. There is some options you can use like If you want to share the modified extra files (as said in the discuss post), why don't you version them? |
Cross referencing #4652 which came to the conclusion of "won't fix" |
opam
directory in the root of a local source tree of a packageopam
file andfiles
directory from opam-repository into the localopam
directoryopam/opam
file and something inopam/files/
What I see is the updated opam file being taken into account, but the extra files are taken from the opam-repository rather than using the local version. (The build fails without the local changes to the extra-files.)
I encountered this when trying to pin a modified llvm (master plus this diff). The package is the llvm ocaml bindings, and to install the opam package with my local changes I need to modify files/META.patch. See also discuss.
The text was updated successfully, but these errors were encountered: