Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prometheus: fix compilation with EntityBase #4895

Merged
merged 1 commit into from Jun 1, 2023
Merged

Conversation

mischief
Copy link
Contributor

What does this implement/fix?

prometheus code seems to lack the header for EntityBase, so fix that.

fixes:

In file included from src/esphome/components/prometheus/prometheus_handler.cpp:3:
src/esphome/components/prometheus/prometheus_handler.h:31:21: error: 'EntityBase' has not been declared
   31 |   void add_label_id(EntityBase *obj, const std::string &value) { relabel_map_id_.insert({obj, value}); }
      |                     ^~~~~~~~~~

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other

Related issue or feature (if applicable): fixes

Pull request in esphome-docs with documentation (if applicable): esphome/esphome-docs#

Test Environment

  • ESP32
  • ESP32 IDF
  • ESP8266
  • RP2040

Example entry for config.yaml:

esphome:
  name: d1-mini
  name_add_mac_suffix: true

esp8266:
  board: d1_mini

logger:

api:

ota:

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  fast_connect: true

web_server:
  
prometheus:

Checklist:

  • The code change is tested and works locally.
  • Tests have been added to verify that the new code works (under tests/ folder).

If user exposed functionality or configuration variables are added/changed:

@mischief mischief marked this pull request as ready for review May 26, 2023 19:28
@mischief
Copy link
Contributor Author

in https://github.com/esphome/esphome/actions/runs/5094151566/jobs/9157652024?pr=4895:

INFO Installing earlephilhower/tool-pioasm-rp2040-earlephilhower
Tool Manager: Installing earlephilhower/tool-pioasm-rp2040-earlephilhower
Error: Could not find the package with 'earlephilhower/tool-pioasm-rp2040-earlephilhower' requirements for your system 'linux_x86_64'
ERROR PIO assembly failed
Error: Process completed with exit code 1.

i do not think this CI failure is caused by this PR.

prometheus code seems to lack the header for EntityBase, so fix that.

fixes:

	In file included from src/esphome/components/prometheus/prometheus_handler.cpp:3:
	src/esphome/components/prometheus/prometheus_handler.h:31:21: error: 'EntityBase' has not been declared
	   31 |   void add_label_id(EntityBase *obj, const std::string &value) { relabel_map_id_.insert({obj, value}); }
	      |                     ^~~~~~~~~~
@jesserockz jesserockz added this to the 2023.5.6 milestone Jun 1, 2023
@jesserockz
Copy link
Member

Thanks @mischief

@jesserockz jesserockz merged commit 8bb4c65 into esphome:dev Jun 1, 2023
25 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jun 3, 2023
hostcc added a commit to hostcc/esphome that referenced this pull request Sep 21, 2023
The changes for LibreTiny support (PR esphome#3509) introduced the
regression on RP2040W leading to boot loop connecting to WiFi.
The regression manifests itself as device reboots with last logged
message being `Connecting to WiFi`, and presumably due to extraneous
FreeRTOS dependency.

The fix updates LDF mode from default `chain` (does not support
preprocessor conditional) to `chain+` hopefully being a nearest
equivalent but with support for those conditionals.

Fixes esphome#4895
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants