-
-
Notifications
You must be signed in to change notification settings - Fork 662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
migrate pcre #10491
Comments
I'm guessing this is more complicated than just changing |
I've heard that the APIs are different, so prepare to have some code changes. |
At times like this I realize that GitHub needs a crying emoji... |
I think the best info is (will be) over PCRE2Project/pcre2#51 |
Recently I did this for mac 62ee6a9 |
hmm... Shouldn't pcre2 uses |
Maybe the worker has it pre-installed now and our manual compilation of pcre is obsolete? |
Probably. Then it is still not using pcre2. Should also check whether the haxe binary dynamic depends on pcre or not. I think we build and install our own pcre because we want to static link it. |
Compared to Neko and Hashlink, migrating eval to pcre2 is a bit more involved. The current ocaml pcre library used by haxe is just a copy of: https://github.com/mmottl/pcre-ocaml (besides minor edits, most of which were lost when updating). Unfortunately, there does not seem to be a pcre2 equivalent of this library for ocaml yet. See mmottl/pcre-ocaml#25. Unless such a library is released, if we were to do this ourselves it would require writing:
|
@tobil4sk Since a comprehensive pcre2 ocaml binding does not seem to be forthcoming, we could build our own with ctypes. The down side to this is that we would have to write our own binding but the up side is we would only need to flesh out enough of it to make our haxe eval port work instead of trying to make a comprehensive ocaml binding. |
Indeed, while writing OCaml bindings isn't much fun, we're only using like 5 or so PCRE functions for which we would need bindings. |
Well, I submitted ocaml/opam-repository#21349, it was merged and we now at least have |
I do not think this actually does work. And I am not sure 56bb846 was the right thing to do either. If we needed mbedtls why was ac399e2 done? Are we trying to move away from homebrew for macos? I notice we are still depending on: conf-libpcre, conf-zlib and conf-neko, each of which specifies homebrew as the system installation source for macos (despite using the HaxeFoundation build of neko and building our own libz during our own build process for ci and binary releases, etc.).
Yes, we should be and the library should be changed from
Probably for two reasons. One, maybe we ran the tests earlier and the lua tests install pcre (not pcre2) including from homebrew on macos here. opam users (I notice opam is way behind for haxe) will fail upon install because we depend on
Exactly, and building pcre2 during the haxe build just wastes time during the build because it is not actually used. We should be using a system install of that anyway and I recommend using homebrew as we tell our users to do in the build instructions, |
@tobil4sk: as per my recent comments, you can probably tell I am have been poking about to understand how haxe uses pcre in order to understand how to port to pcre2. There are at least two other uses of pcre: php and lua targets. I am not sure we can do anything about php. We directly use the binding in php itself which has already changed in php 7.3. Users have noticed a few minor functional changes but apparently the php API stable despite the changes under the hood. As for the lua target, that might prove pretty easy (but I need to study the interfaces a bit more). Apparently haxe's main use for pcre is to implement a EDIT: Okay, this is a pain in the butt. It seems our lua test infrastructure (see tests/runci/targets/Lua.hx) likely has not been updated in quite a while. It properly system installs EDIT: Thankfully this has now been straightened out (for now) by bypassing haxe-deps with #10916. Of course php and lua are source targets and as such are not direct targets of haxe itself but rather the code it generates. So from our perspective, that should only change dependencies here for tests. php takes care of itself (you cannot install php without either pcre or prec2 for 7.3+ being installed) but we will have to update the lua target tests here to specify pcre2 system install vs. pcre previously to account for the move from Sadly, it appears pcre-ocaml (which our eval binding is based upon) appears to export many lower level details of pcre (such as the study interface that disappears in pcre2; see API doc). I doubt we use that much of it to implement |
Until the pcre2 migration is actually done, only build pcre. Context: HaxeFoundation#10491
Until the pcre2 migration is actually done, only build pcre. Context: HaxeFoundation#10491
* Differentiate PCRE2 from PCRE, fix missed version substitution * cd back out of source folders after building dependencies * Build pcre from source to fix macOS 10.13 compatibility pcre is linked into Haxe, so it's important that it honors our macOS deployment target. 43df805 replaced pcre with pcre2. This commit brings pcre back so both are built side by side. This fixes #10723 * Update pcre download links From pcre.org: > Note that the former ftp.pcre.org FTP site is no longer available. and > You can also download PCRE2 or the older, unmaintained PCRE library > from an unofficial mirror at SourceForge: > > https://sourceforge.net/projects/pcre/files/ * Remove unused pcre2 build Until the pcre2 migration is actually done, only build pcre. Context: #10491
See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1000117
The text was updated successfully, but these errors were encountered: