cmake-tools.nvim icon indicating copy to clipboard operation
cmake-tools.nvim copied to clipboard

feat: initial testing of lockfile and coroutine onexit implementation

Open khris190 opened this issue 9 months ago • 6 comments

so this is initial version of lockfile on_exit implementation, it seems to work i just want to share the progress TODO:

  • i'll move lock_file functions to utils and parametrize them
  • remove dump from 3rd line
  • remove temporary sleep 5 command
  • remove special treatment of that full_cmd and implement on_exit properly
  • tests

if i'm missing something then please tell me

khris190 avatar Apr 30 '24 22:04 khris190

Seems right to me.

Civitasv avatar May 01 '24 05:05 Civitasv

i added hardcoded 0 to on_exit() in terminal for now, but i'm thinking that we could store command exit code in another file so we could get it after

khris190 avatar May 01 '24 11:05 khris190

also why don't runners have any callbacks?

khris190 avatar May 01 '24 11:05 khris190

Executors are used for cmake-rated commands, including generate, build, install, clean, etc. Runners are used for running executables. Now the end of the progress is Runner, eg, Executor(generate->build)->Runner(execute). So runners do not need callbacks.

Civitasv avatar May 01 '24 11:05 Civitasv

i think it might be complete. i'll use it a bit so i'm sure everything works as intended. i added a few local functions to terminal because i didn't feel like they should be exposed outside and local/private functions are way safer to modify without breaking peoples configs. i'm also wondering if calling those files "tmp" is okay.

khris190 avatar May 01 '24 15:05 khris190

i'm also wondering if calling those files "tmp" is okay.

I think we should call it cmake_tools_lockfile

Civitasv avatar May 02 '24 01:05 Civitasv

LGTM. Thanks for your fantastic work!

Civitasv avatar May 02 '24 12:05 Civitasv