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

Create many temp files when play with crystal mode. #140

Open
zw963 opened this issue May 4, 2022 · 5 comments
Open

Create many temp files when play with crystal mode. #140

zw963 opened this issue May 4, 2022 · 5 comments

Comments

@zw963
Copy link

zw963 commented May 4, 2022

I have one file, named: hello.cr, when i open this file with crystal-mode, and binding quickrun with a hotkey.

it works, but, after i run once quickrun, quickrun create a temp file in same folder as hello.cr

e.g.

 ╰─ $ ls qr*.cr
qr_5imGMw.cr  qr_a02XJv.cr  qr_eqgWuu.cr  qr_HjVkpj.cr  qr_OZz43p.cr  qr_T3xVJc.cr  qr_wk9n08.cr
qr_5JdlDs.cr  qr_a4ej4u.cr  qr_g9N3B3.cr  qr_jKAFzc.cr  qr_PK8jRC.cr  qr_tK5uqf.cr  qr_Zt0obA.cr
qr_6SaFV7.cr  qr_bGX6I7.cr  qr_gpr2xW.cr  qr_kxrdtZ.cr  qr_r8aNnN.cr  qr_VKTS8k.cr

I guess we should clean it up after run done, right?

@zw963
Copy link
Author

zw963 commented Sep 7, 2022

any update?

@zw963
Copy link
Author

zw963 commented Oct 12, 2022

Hi, this issue still not fixed on newest master.

@jcs090218
Copy link
Collaborator

Interesting, every temporary file should get deleted after the execution...

I don't use Crystal, can you test and see if you could give me more information for this issue? Thanks!

@zw963
Copy link
Author

zw963 commented Oct 15, 2022

("crystal" . ((:command . "crystal")
                  (:compile-only . "%c build %s")
                  (:description . "Run Crystal program")))

Hi, @jcs090218 , i have no idea how above config work.

But, for for following example:

 ╰─ $ \cat hello.cr 
puts "hello"

When i run crystal build hello.cr, except /.hello was created, there is no temp file generated in default directory.

In fact, you can crystal run hello.cr, crystal will create a temp file in ~/.cache/crystal/, build then run it.

Anyway, both crystal build hello.cr or crystal run hello.cr, non of them generate temp file like this.

@zw963
Copy link
Author

zw963 commented Oct 15, 2022

I enable debug, and change to this:

("crystal" . ((:command . "crystal")
                  (:tempfile . nil)
                  (:compile-only . "%c build %s")
                  (:exec . "%c run %s")
                  (:description . "Run Crystal program")))

I saw the debug log like this:

Quickrun Execute: crystal  qr_4aIzDY.cr  at /home/common/Git/emacs-quickrun/

Wired, where is the build, run args? can we not create those tmp file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants