-
Notifications
You must be signed in to change notification settings - Fork 33
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
add ert bootstrap WIP #87
base: master
Are you sure you want to change the base?
Conversation
Thanks for taking a stab at this! The error is indeed because we are missing fn re_search_backward(
regexp: &str,
bound: usize,
noerror: OptionalFlag,
count: usize,
env: &mut Rt<Env>,
) -> Result<Option<(usize, usize)>> {
let buf = env.current_buffer.get_mut();
let chars = buf.text.cursor().chars();
buf.text.move_gap_out_of(0..chars);
let (text, rest) = buf.text.slice(0..chars);
assert!(rest.is_empty());
let re = Regex::new(&lisp_regex_to_rust(regexp))?;
if let Some(Ok(last_match)) = re.find_iter(&text).last() {
let start = last_match.start();
let end = last_match.end();
// set match data
Ok(Some((start, end)))
} else {
Ok(None)
}
} But at very least we need to add a |
I just pushed a |
For this particular issue, it was part of |
I pulled the elisp again from 29.1 and hit the next issue, seems to be a problem with cl-loop?
|
It looks like it's using the elisp eager internal-macroexpand-for-load function, which I see you've worked around elsewhere in lisp/loadup.el. Is that what it should be using? I'm wondering if it's too restrictive somehow to parse the cl-loop form. I added a println to the rune macroexpand function to confirm it's choking on this form: |
I was able to capture the rust backtrace, I think I don't quite follow how rune decided this has to be a symbol. I wonder if that's only resolved once when the macro is initially called?
|
This will make debug easier until we make this more stable
The backtrace was not much help here because of the After getting a good backtrace I was able to dive down and find out this was due to two bugs in Rune (thank you!). I have pushed fixes to your branch. |
I think we just need to implement more native functions to get this running
fails here: