evcc icon indicating copy to clipboard operation
evcc copied to clipboard

Dev container

Open luejoshua opened this issue 1 year ago • 9 comments

Möglichkeit hinzugefügt einen Devcontainer zu starten der die Entwicklung von EVCC auf Windows Systemen erleichtert. Die gitattributes ermöglichen die Nutzung von Git innerhalb des Containers.

luejoshua avatar Aug 08 '24 12:08 luejoshua

I've had a try and couldn't get it to work. It took some 10 minutes to download seemingly a few GB. Starting the container now fails. Not sure how useful this eventually is?

andig avatar Aug 08 '24 17:08 andig

@andig The 10 minute wait is normal when starting for the first time. It is possible to optimise this time by removing the make commands. What error message do you get when starting? Changing the branch when building can also produce errors.

luejoshua avatar Aug 09 '24 08:08 luejoshua

My two cents: For someone who has no idea how to setup a go and node dev env, 10 mins much faster then install all required tools.

StefanSchoof avatar Aug 09 '24 14:08 StefanSchoof

@StefanSchoof did you actually try it? Did it help you? It didn't help me, but happy to merge if there is real demand.

andig avatar Aug 12 '24 16:08 andig

As use case I have something like https://github.com/evcc-io/evcc/pull/15348 or an update to docs in mind. Changing the text is something many can, but for running lint and make docs is a thing that needs time to install all deps.

I did a little testing and found some things

  • I would remove the make commands. I takes much time and maybe someone may not need it, eg to run make docs
  • I think adding the go extension ("golang.go") to the extensions makes sense
  • And the imported things: make docs and make lint are not working inside this

I think to make this useful this command should be able to run. I had no time to investigate if this is something can be fixed quick.

StefanSchoof avatar Aug 13 '24 14:08 StefanSchoof

A make docs works after an make install. So I think having a "postCreateCommand": "make install" makes sense.

StefanSchoof avatar Aug 13 '24 14:08 StefanSchoof

Thank you @StefanSchoof for your addition. Does it work the same way for you now? Then @andig could look into the issue again.

luejoshua avatar Aug 16 '24 12:08 luejoshua

Yes, it worked in my tests.

StefanSchoof avatar Aug 16 '24 16:08 StefanSchoof

Thank you for the work put into this. I do lean to not merging this. Apart from not using dev containers myself (I didn't immediately see how to effectively do so) I do not want to take over responsibility for maintaining the container. It may be a small add-on but as team one that we cannot shoulder. Sorry for not being more supportive in this case.

andig avatar Aug 28 '24 09:08 andig