Open alex65536 opened 4 months ago
side note: ubuntu 24.04 doesn't seem to ship libpcre3
by default, you have to install pcre
manually => https://github.com/nim-lang/Nim/pull/23649
This is an excellent opportunity to deprecate the re module and recommend a library instead, such as https://github.com/nitely/nim-regex (this way the library can be updated without waiting months for a release and getting hit by other unrelated changes)
This is an excellent opportunity to deprecate the re module and recommend a library instead
Well, part of Nim depends on regexes itself. I took a quick look over the code base and discovered two such places in Nim itself: nimgrep
and tests for nimsuggest
. The latter one may be easy to remove, but for nimgrep
using regexes is the core functionality, and the Nim repo seems to avoid dependencies on Nimble packages for now.
Nim repo seems to avoid dependencies on Nimble packages for now.
actually it does not - some packages are depended upon and downloaded to a special dist
folder to create a "full" source distribution - the same can be done for regex, to create stand-alone compiler code releases.
+1 to deprecate it and to use an external package. I don't mind to have it in the std. The issue I see is the lib dep
also, nimgrep
could easily be a package - there's literally nothing in there that needs to live in nim proper.
Did you get a chance to work on it? Nim has been out of debian testing for a while by now due to this being a release critical bug for us (pcre3) not being a part of next release.
FWIW I found no migration guide.
fwiw, there is this https://github.com/PCRE2Project/pcre2/issues/51#issuecomment-973011802 and the linked PRs as migration examples.
Description
Nim depends on the obsolete PCRE library, which is no longer supported with last release in 2021, and should migrate to PCRE2 library available since 2015.
I am concerned that Debian wants to remove the deprecated PCRE library (see this bug report), making some of the functionality and some of the Nim packages unusable in the next stable Debian release.
So, please consider porting
std/nre
andstd/re
to PCRE2. PCRE and PCRE2 seem to be API incompatible, but it should not be a problem for anyone who doesn't use the C wrappers directly.Nim Version
Any version at the time of writing (
devel
branch is affected as ofcdfc886f88cc95a8dc05e2211d1030b146a521f5
)Current Output
No response
Expected Output
No response
Possible Solution
No response
Additional Information
No response