Closed megalithic closed 4 years ago
@megalithic That's an odd error. That function should be defined even if the NIF portion wasn't loaded correctly, so it makes me think something in either your build process or your environment is the problem.
How you tried cleaning your deps and _build and rebuilding?
Hey, thanks for chiming in @mischov!
I indeed have. Multiple times. Does my config/config.exs or applications def in mix.exs need anything pertaining to Meeseeks (other than just having the deps int he my deps definition)?
Yeah, it's very strange. Everything compiles fine. I am using this with escript, if that has any bearing. :/
@megalithic Ah, it does. https://github.com/mischov/meeseeks/issues/23
It's my understanding that Rustler (and NIFs in general) won't work with escript, which should in turn make it impossible to html5ever to have worked with Floki so I am a bit curious how it did. Maybe it was just falling back to the mochiweb parser?
Well fooey.. Not a big deal, I can run it from iex locally, but would like to have been able to distribute this for a quick CLI tool. Any thoughts around how this could be achieved? I don't expect you to come up with a solution, but if you had heard/seen anyone work around this and continue to use Meeseeks, that'd be fantastic! I'm making things work with Floki, it's just a bit fiddly with their own html_tree struct and i'd rather just deal with Enums of found html nodes. Anyway, thanks again!
I haven't seen any workarounds for Meeseeks in particular, but it would probably be creating a release and calling into commands for it with a shell script. Here is an old Distillery issue describing that- I don't know how that would be different in current Distillery or mix releases but that'd be the route I'd go down.
Alternatively you could go to the source and do it in Rust based on html5ever and some selection library and just distribute a binary.
@megalithic I'm going to go ahead and close this, but go ahead and re-open if you have more questions, and please feel free to follow up with whatever solution you land on for future people who find themselves with this problem.
Elixir 1.9/OTP 0.21 Meeseeks 0.13.1 Meeseeks_html5ever 0.12.1
I continually get this when trying to parse html with
Meeseeks.parse()
from my calling module:I was able to successfully parse with
floki
+html5ever
but would prefer to usemeeseeks
. Any suggestions/thoughts?