vim-cmake icon indicating copy to clipboard operation
vim-cmake copied to clipboard

File api

Open marwing opened this issue 3 years ago • 2 comments

fixes #62

marwing avatar Aug 26 '22 18:08 marwing

Apologies for the long radio silence, I was on holiday and then again very busy with work. I'll review your PR in the next few days. A huge thanks in advance.

cdelledonne avatar Sep 26 '22 18:09 cdelledonne

Great. This probably still has some rough edges and is missing docs. Just let me know what you find. I'm quite busy currently so it may take a while until I can address any issues.

marwing avatar Sep 27 '22 20:09 marwing

I think I addressed all your comments by either a change or an explanation. I also rebased on master. I don't think we have to do anything special in s:buildsys.Init(). You already call s:SetCurrentConfig which does the necessary refreshing.

For documentation I think we should at least document the new version requirement and the fact that the file api is used at all. The rest is internals I would say. Also the changelog entry is still missing.

marwing avatar Oct 27 '22 21:10 marwing

Thanks a lot for the quick reaction, back to you with a couple more comments!

cdelledonne avatar Oct 28 '22 08:10 cdelledonne

I think this should be enough for documentation since this is more of an internal change. Let me know if you would reword anything. Otherwise I would say this is ready.

marwing avatar Oct 31 '22 14:10 marwing

Also, given that s:buildsys.GetTargets() is only called once now (from s:GetBuildArgs() in build.vim), we could get rid of that, and always use s:fileapi to retrieve targets.

cdelledonne avatar Nov 02 '22 09:11 cdelledonne

The latest version look great! Could I just ask you to update the docstrings of these functions in fileapi.vim? Where applicable, they should include Params, Returns, and perhaps also Raises for those that can raise exceptions.

  • s:FindIndexFile()
  • s:ParseIndex()
  • s:ParseCodemodel()
  • s:fileapi.Parse()

After that, I'll just merge, if you agree.

cdelledonne avatar Nov 04 '22 09:11 cdelledonne

And by the way, thanks A LOT for taking the time to work on this feature and address my review comments, I appreciate that a lot

cdelledonne avatar Nov 04 '22 09:11 cdelledonne

and perhaps also Raises for those that can raise exceptions.

Does this mean for all those from which a vim-cmake exception can escape or only those with the actual throw statement (does it include s:fileapi.Parse() or only s:ParseIndex()).

After that, I'll just merge, if you agree.

I do.

marwing avatar Nov 04 '22 19:11 marwing

I meant to also document Raises in s:fileapi.Parse(), given that it's a public function, so that if we are to use it in some other places in the future we know how to treat it. It'd be great if you could apply this last one change. Thanks!

cdelledonne avatar Nov 06 '22 13:11 cdelledonne

That was fast! I'm merging

cdelledonne avatar Nov 06 '22 13:11 cdelledonne

That was fast! I'm merging

I may have had this prepared in case this is what you wanted... :)

Anyways, thanks for merging.

marwing avatar Nov 06 '22 13:11 marwing