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

Unwind on exit #940

Merged
merged 5 commits into from
May 26, 2024
Merged

Unwind on exit #940

merged 5 commits into from
May 26, 2024

Conversation

raviqqe
Copy link
Contributor

@raviqqe raviqqe commented Oct 13, 2023

Description

This PR implements the unwinding of dynamic extents on a call to the exit procedure as described in "6.14. System interface" in the R7RS specification using call/cc.

Questions

  • Where can I write tests for the new behaviour with side effects of exit?
  • When I build the library, it emits those warnings. But I don't know why it happens while I'm still using the only predicate in imports.
> make install
...
if type ldconfig >/dev/null 2>/dev/null; then ldconfig; fi
echo "Generating images"
Generating images
[ -z "" ] && LD_LIBRARY_PATH="local/lib:" DYLD_LIBRARY_PATH="local/lib:" CHIBI_MODULE_PATH="local/share/chibi:local/lib/chibi" local/bin/chibi-scheme -mchibi.repl -d local/share/chibi/chibi.img
[ -z "" ] && LD_LIBRARY_PATH="local/lib:" DYLD_LIBRARY_PATH="local/lib:" CHIBI_MODULE_PATH="local/share/chibi:local/lib/chibi" local/bin/chibi-scheme -xscheme.red -mchibi.repl -d local/share/chibi/red.img
[ -z "" ] && LD_LIBRARY_PATH="local/lib:" DYLD_LIBRARY_PATH="local/lib:" CHIBI_MODULE_PATH="local/share/chibi:local/lib/chibi" local/bin/chibi-scheme -mchibi.snow.commands -mchibi.snow.interface -mchibi.snow.package -mchibi.snow.utils -d local/share/chibi/snow.img
WARNING: importing already defined binding: exit
WARNING: importing already defined binding: exit

Thanks ahead!

@ashinn
Copy link
Owner

ashinn commented May 25, 2024

Sorry for the long delay. I believe the warnings are from libraries which import both (chibi proces) and (scheme process-context), which both export exit. Before your change, this was the same binding so there was no warning.

I think the cleaner fix is to move these changes to (chibi process) which can export both exit and emergency-exit and just re-export these from (scheme process-context).

@raviqqe raviqqe marked this pull request as draft May 26, 2024 03:53
@raviqqe raviqqe force-pushed the chore/unwind-on-exit branch 3 times, most recently from c61432f to c30201c Compare May 26, 2024 04:06
@raviqqe raviqqe force-pushed the chore/unwind-on-exit branch from c30201c to 0673eae Compare May 26, 2024 04:07
@raviqqe raviqqe marked this pull request as ready for review May 26, 2024 04:12
@ashinn ashinn merged commit c200ecb into ashinn:master May 26, 2024
3 checks passed
@ashinn
Copy link
Owner

ashinn commented May 26, 2024

Thanks!

@raviqqe
Copy link
Contributor Author

raviqqe commented May 26, 2024

Thank you too!

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 this pull request may close these issues.

2 participants