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

Old bundle _init function persists #54

Closed
ferm10n opened this issue Jul 29, 2024 · 1 comment · Fixed by #55
Closed

Old bundle _init function persists #54

ferm10n opened this issue Jul 29, 2024 · 1 comment · Fixed by #55

Comments

@ferm10n
Copy link
Contributor

ferm10n commented Jul 29, 2024

I'm running into a couple issues with bundle mode.

  • there was an instance where two functions had the same name collect and esbuild renamed one of them collect2 and the wrong function ended up getting referenced from the sql function. This was easy to fix by renaming one of the functions but it was still a nasty surprise
  • the bigger issue, it seems like the functions stored on globalThis from the _init function continue to hang around even after _init has been replaced and re-run. This probably has something to do with the plv8 session / context persisting. The main issue is that I want a more reliable way to change the contents of _init and have them take effect immediately

I'm still thinking about a potential solution but wanted to start writing down the issue / thoughts here.

@ferm10n
Copy link
Contributor Author

ferm10n commented Jul 29, 2024

I mentioned these two issues because I was thinking that they could be solved by the same technique, making _init return the functions instead of putting them on globalThis, but now I realize that won't work because of how _init is called via plv8.execute

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 a pull request may close this issue.

1 participant