finitespace / BME280

Provides an Arduino library for reading and interpreting Bosch BME280 data over I2C, SPI or Sw SPI.
GNU General Public License v3.0
212 stars 105 forks source link

non-void-return issue in 3.0.0 #129

Open dhzl84 opened 3 years ago

dhzl84 commented 3 years ago

Expected behavior

Version 3.0.0 should not throw return type errors fixed with #121.

Actual behavior

Eventhough PlatformIO states that it downloaded version 3.0.0, the functions in the downloaded code still have the return type bool.

Builds fail locally as well as on GH Actions.

Steps to reporduce the behavior

I use PlatformIO to get the library.

platformio.ini:

lib_deps = 
    finitespace/BME280 @ ^3.0.0

Library Installation by PlatformIO:

Library Manager: Installing finitespace/BME280 @ ^3.0.0
Downloading...
Unpacking...
Library Manager: BME280 @ 3.0.0 has been installed!

PlatformIO build console:

Dependency Graph
|-- <BME280> 3.0.0
.pio\libdeps\8266_thermostat_debug\BME280\src\BME280.cpp: In member function 'bool BME280::InitializeFilter()':
.pio\libdeps\8266_thermostat_debug\BME280\src\BME280.cpp:85:1: error: no return statement in function returning non-void [-Werror=return-type]
   85 | }
      | ^
.pio\libdeps\8266_thermostat_debug\BME280\src\BME280.cpp: In member function 'bool BME280::WriteSettings()':
.pio\libdeps\8266_thermostat_debug\BME280\src\BME280.cpp:122:1: error: no return statement in function returning non-void [-Werror=return-type]
  122 | }
      | ^

There seems to be an issue in the library registry. Version 3.0.0 has two release dates, maybe same version published twice? I browsed the history of my platformio.ini and already used version 3.0.0 in January 2020.

image

and

image

Hope you find the time to have a look into that?

MacSass commented 3 years ago

I do have the same issue ... re-installed VME280 lib on platform-IO, shows as version 3.0.0, but still has the bool in it as return type ...

MacSass commented 3 years ago

Manual download and install to platformio fixed the issue ... looks like the old version is still on the repository!

villafapd commented 2 years ago

I had the same problem and I solved it by manually downloading the library.

lekimtek commented 2 years ago

The same for me, not working. I tested install by git clone of entire master and not work and it still installing by platfomio. The solution is downloading manually and changing only src directory, this stop install by platformio and uses the library OK, in global mode too.

May be the problem is in how to install library platformio?

lekimtek commented 2 years ago

Update! I installed manually "src" dir from branch 3.0.1-dev and not work, same error like installed by platformio. Aclaration:

This not work and may be 3.0.1-dev version is installed by platformio instead 3.0.0 git clone -b 3.0.1-dev https://github.com/finitespace/BME280.git

This work fine if is installed manually not by platformio. git clone https://github.com/finitespace/BME280.git

Where is the error? May be platformio search latest and install 3.0.1-dev?

Solution: Please reorder library branches and versions, may be like new one version... I dont now...

studiofuga commented 2 years ago

See https://github.com/finitespace/BME280/issues/130#issuecomment-1199143984 on issue #130

Solution: Publish an updated version on platform.io.

Workaround: specify the git URL on platformio.ini:

lib_deps = 
            BME280=https://github.com/finitespace/BME280.git