Fix no-onig no-wasm builds#1772
Merged
ArthurZucker merged 1 commit intohuggingface:mainfrom May 27, 2025
Merged
Conversation
Now, you can build with: ``` --no-default-features --features=fancy-regex ``` Which previously didn't work. You had to enable the `unstable_wasm` flag. I think using `fancy_regex` without wasm is a valid use-case, as I've seen extremely slow build times using `onig`. See: huggingface#1730 Onig also breaks, sometimes, with compiler updates. See: huggingface#1771 Closes huggingface#1729
mmoskal
pushed a commit
to guidance-ai/llguidance
that referenced
this pull request
May 6, 2025
The version of Oniguruma used in `onig_sys` doesn't build on GCC 15 and the oniguruma project itself got archived last week, so this PR switches tokenizers to the fancy-regex backend. `fancy-regex` also requires flipping on the `unstable_wasm` feature until huggingface/tokenizers#1772 lands, that flag doesn't have any ill effects though since everything WASM related downstream is behind `target_arch` checks. **tl;dr**: This fixes builds on Linux distros with newer GCC versions like Arch Linux and Fedora.
|
Considering the archiving of the upstream Oniguruma repository and its build problems using GCC 15, I wonder whether the better course of action here isn't to just unconditionally depend on fancy-regex further simplifying the whole setup. |
Contributor
Author
|
@adamreichold yes, I would also be in favour of that. @ArthurZucker can we please get your, or someone else's, eyes on this? |
ArthurZucker
approved these changes
May 27, 2025
Collaborator
ArthurZucker
left a comment
There was a problem hiding this comment.
Sorry late review, thanks!
I'd rather we keep both for now for some weird hardwares
Collaborator
|
This breaks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Now, you can build with:
Which previously didn't work. You had to enable the
unstable_wasmflag.I think using
fancy_regexwithout wasm is a valid use-case, as I've seen extremely slow build times usingonig.See: #1730
Onig also breaks, sometimes, with compiler updates. See: #1771
Closes #1729