evcc-io / evcc

Solar Charging ☀️🚘
https://evcc.io
MIT License
3.66k stars 684 forks source link

dev-Container go version mismatch #17448

Closed mha1 closed 3 days ago

mha1 commented 3 days ago

Describe the bug

Hi,

I set up the dev environment using the dev-container method. Builds failed with error go 1.23.3 expected, 1.23.2 found.

Screenshot 2024-11-25 183954

After manually deinstalling 1.23.2 and installing 1.23.3 evcc can be built successfully.

Steps to reproduce

  1. Setup dev environment using dev-container
  2. start build

Configuration details

VSCode/docker on W11, cross compiling for arm (Pi4)

Log details

n/a

What type of operating system are you running?

Linux

Nightly build

Version

No response

andig commented 3 days ago

I‘m not maintaining the devcontainer, but the error is strange. Go should be able to download the required toolchain itself. Anybody wants to grab this feel free.

andig commented 3 days ago

I guess the GOTOOLCHAIN breaks it. No idea where that comes from, sorry. Shouldn‘t be there.

StefanSchoof commented 3 days ago

@tfenster Can you help here?

tfenster commented 3 days ago

17451 fixes the problem for me by changing the GOTOOLCHAIN value

tfenster commented 3 days ago

sorry, wrong fix, that only worked initially

tfenster commented 3 days ago

@StefanSchoof now the fix looks better, make doesn't fail at the version. But I got

panic: processing template 'meter/solax-hybrid-cloud.yaml' failed: yaml: line 26: mapping values are not allowed in this context

goroutine 1 [running]:
github.com/evcc-io/evcc/util/templates.load(0x260ede0?)
        github.com/evcc-io/evcc/util/templates/init.go:96 +0x84
github.com/evcc-io/evcc/util/templates.init.0()
        github.com/evcc-io/evcc/util/templates/init.go:36 +0xe0

and

panic: processing template 'meter/solax-inverter-cloud.yaml' failed: yaml: line 25: mapping values are not allowed in this context

goroutine 1 [running]:
github.com/evcc-io/evcc/util/templates.load(0x260ede0?)
        github.com/evcc-io/evcc/util/templates/init.go:96 +0x84
github.com/evcc-io/evcc/util/templates.init.0()
        github.com/evcc-io/evcc/util/templates/init.go:36 +0xe0

I "solved" this by deleting those two files, but I guess that is a different problem, right? After deleting those files, ./evcc works again for me

tfenster commented 3 days ago

Digging a bit deeper, the Beispiel: '...' and Example: '...' parts in https://github.com/evcc-io/evcc/commit/5da0a943bf57a2a6a9af2177fa4055dd806cb9ba break it for me. Removing the : solved that for me