Skip to content
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

break cyclic dependency with regex-syntax and replace regex crate with regex-lite #56

Merged
merged 5 commits into from
Jul 7, 2023

Conversation

BurntSushi
Copy link
Owner

This should fully resolve #11.

cc @infinity0. Better late than never right? Lol.

These have been moved to regex-cli and now use regex-automata 0.3:
https://github.com/rust-lang/regex/blob/master/regex-cli/README.md#example-serialize-a-dfa

This also breaks the cyclic dependency where updating to a new Unicode
version for bstr required the following:

* Run ucd-generate to update regex-syntax tables.
* Publish new regex-syntax.
* Update ucd-generate lockfile to bring in new regex-syntax.
* Build new ucd-generate binary.
* Run ucd-generate to update bstr regexes.

Namely, that last step requires updating regex-syntax in order to
propagate the Unicode updates into the regex engine.

The new process is:

* Run ucd-generate to update regex-syntax tables.
* Build regex-cli (also in the regex crate repo).
* Run regex-cli to update bstr regexes.

So now we don't have to do this weird dance where we loop back around to
build a new version of ucd-generate.

ucd-generate does still depend on `regex` at the moment via
`ucd-parse`, but this doesn't need updating when a new version of
Unicode comes out. Still, I'm going to explore breaking that dependency
as well via `regex-lite`.

ucd-generate also still depends on `ucd-util` which also has Unicode
data embedded into it. I'm going to look into fixing that by requiring
the caller to pass in the data tables.

Fixes #11
This breaks a dependency where `ucd-util` dependend on running
ucd-generate to produce the JAMO_SHORT_NAME table. Instead, we now
require the caller to provide the table.

Fixes #11
All of these should only be used in tests/benchmarks.
We also set `rust-version` in `Cargo.toml`.
@BurntSushi BurntSushi merged commit b566a70 into master Jul 7, 2023
@BurntSushi BurntSushi deleted the ag/remove-regex branch July 7, 2023 11:54
@infinity0
Copy link

Thanks! I haven't been very active on Debian rust lately but I'll pass this info onto the rest of the team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cyclic build dependency
2 participants