Closed SkySkimmer closed 2 months ago
(I don't know if this patch is expected to work outside windows or if it needs some modification)
I would say the main question is if we want separate functions also in Unix, so that one could more easily write portable code. If so, then on Unix the two channel_of_descr
functions would be the same, on Windows not. On all OSes one should use the correct function depending on if one is working with a file or a socket. The downside of this portability would be that it would require distinctions which would be quite artificial in Linux in some playes - maybe even annoying.
I've changed it quite a lot. Basically, since OCaml uses a common tagged data structure for sockets and handles, there is no need to have separate functions. Unfortunately, I have no environment to test that on windows. Can you check that it works ? Also, I'm not opposed to add the other ocaml function name for backward compatibility, if it matters.
I don't have a windows to test either
@garrigue : I can test it. Are we talking about the PR branch or can I find the code somewhere else?
I pushed the code to the pr branch.
OK, give me a few days. I put it on my list for Friday.
Sorry, I had to delay it to Monday, but it is still on my list ...
Not sure what is going on, but I can't get the patch applied by opam. If I run opam reinstall -b lablgtk3
I don't see the patch applied in the opam build folder (the patch file as such is there).
I downloaded https://patch-diff.githubusercontent.com/raw/garrigue/lablgtk/pull/176.patch, added it to the opam file in the usual way (there was already one in my local patch repo - I just had to change the name). All looks good, no errors, opam lint says all is good, but the patch is not done.
If I modify the name of the patch file, opam complains that the patch file is not there (as it should). Also my original patch works. But if I put in the patch of this PR nothing happens. I have not the slightest idea what is going on here.
It might take a bit ...
I think I found it - the patch produced by github (see link above) contains several separate patches for separate commits (4 in total) - apparently opam / patch does not support this.
I split the patch file into 4 and added all 4 to opam - this also doesn't work (no errors, no patch applied).
Can someone please squash this PR - maybe this fixes it.
I don't think squashing would change the patch.
Also why test with a patch instead of pointing the url at my branch?
Also why test with a patch instead of pointing the url at my branch?
It is Coq Platform policy to only use official releases + patches which are kept directly in the Coq Platform repo.
But this can be handled - I will just clone the repo (I am lazy and didn't do sp as yet) and I am sure I find a way to create the patch - worst case I put both versions in separate folders ...
I squashed it in a local branch and created a patch from that - this did work.
One obviously needs to adjust CoqIDE then - I guess we do this from Coq 8.20 on. We need to take care to link it to the proper lablgtk versions in opam then.
I did a quick test of the resulting CoqIDE and it works fine.
=> good to go.
One obviously needs to adjust CoqIDE then
That's what
Also, I'm not opposed to add the other ocaml function name for backward compatibility, if it matters.
is about no?
One obviously needs to adjust CoqIDE then
That's what
Also, I'm not opposed to add the other ocaml function name for backward compatibility, if it matters.
is about no?
Yes. I am not sure we want this, though. It is for sure cleaner to get rid of it and assuming everyone is using opam it should not be a problem to manage the version restrictions. But I have no strong feelings about this - adding the old function name as an alias would also be an option.
Thinking about it: one would have to add an upper bound for the lablgtk version for all older versions of CoqIDE. I still would prefer this solution, but again no strong feelings.
So is this going to be merged?
Sorry the long delay, I got to do other things and forgot. But I still need to do a release, probably next week.
This PR upstreams a patch which was carried in windows opam repos, eg https://github.com/coq/platform/blob/main/opam/opam-repository/packages/lablgtk3/lablgtk3.3.1.3/files/0001-Add-function-channel_of_descr_socket-windows-has-dif.patch
See also https://github.com/coq/coq/issues/18607