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
gxc -exe can delete source code #315
Comments
I can reproduce on |
Looking at https://github.com/vyzo/gerbil/blob/master/src/gerbil/compiler/driver.ss, the compiler expects your code in a This will work:
(export main)
(define (main) (display "Hello") (newline)) The code shouldn't overwrite an existing file. |
@vyzo How do you want the driver to handle this? If the file or directory already exists, it should raise. But maybe to avoid confusion the generated extension could be |
Thanks for looking into this @belmarca :) What is the rationale for using |
Do you mean this part in
Unix executables generally have no filename extension, so I guess outputting to an executable called |
Yes a quick fix would probably be to use As I said I will let @vyzo give his opinion since this touches a core part of gerbil. I don't feel comfortable sending a PR before he makes a suggestion. |
I would recommend treating both |
Yes, this is problematic. The compiler generates an |
Actually we might use gsc's |
Would it work to create a subdirectory to store all the generated files? |
Doesn't sound like a great idea. |
I think we can simply use a different extension for the executable stubs -- we can try with |
A different extension is good enough. Unix also has no trouble with multiple extensions like |
#330 fixes by using the |
Sorry for the late turnaround, I finally got around fixing this. |
Thank you! |
The text was updated successfully, but these errors were encountered: