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

Geyser hotreload doesn't work or seems to be platform specific #33884

Open
segfaultdoc opened this issue Oct 26, 2023 · 3 comments
Open

Geyser hotreload doesn't work or seems to be platform specific #33884

segfaultdoc opened this issue Oct 26, 2023 · 3 comments
Assignees

Comments

@segfaultdoc
Copy link
Contributor

Problem

Geyser hotreload seems to use a cached version of the dll.

Steps to Repro:

  1. Load Geyser plugin
  2. Change and recompile plugin
  3. Reload the plugin
  4. Notice it uses the old compiled version

The workaround is to rename the .so file on each compilation to correctly pull it in.

Proposed Solution

Not sure what the solution is here but here's a related issue:
mitchmindtree/hotlib#5

@segfaultdoc
Copy link
Contributor Author

#[cfg(test)]
mod tests {
    use {super::*, std::fs};

    #[test]
    fn test_load_lib() {
        unsafe {
            let libpath = "/Path/to/some/existing/file.dylib";
            let libpath = PathBuf::from(libpath.clone());
            let _lib = Library::new(libpath.clone()).unwrap();
            drop(_lib);

            fs::remove_file(libpath.clone()).unwrap();
            let libpath = PathBuf::from(libpath);
            let _lib = Library::new(libpath).expect_err("expected an error");

            let libpath = "/Path/to/some/non-existing/file.dylib";
            let libpath = PathBuf::from(libpath);
            let _lib = Library::new(libpath).expect_err("err");
        }
    }
}

this test case fails on my mac. seems like issue with libloader Library

@t-nelson
Copy link
Contributor

sounds like this is the crux, nagisa/rust_libloading#59 (comment)

not sure there's really anything we can do about that. the plugin would have to not link to std

@lijunwangs lijunwangs self-assigned this Oct 27, 2023
@godmodegalactus
Copy link
Contributor

Yes we also faced the same issues with grpc plugins.

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

No branches or pull requests

4 participants